public class VKApiPost extends VKAttachments.VKApiAttachment implements Identifiable, android.os.Parcelable
| Modifier and Type | Field and Description |
|---|---|
VKAttachments |
attachments
Information about attachments to the post (photos, links, etc.), if any;
|
boolean |
can_like
Whether the user can like the post (false — cannot, true — can).
|
boolean |
can_post_comment
Whether the current user can leave comments to the post (false — cannot, true — can)
|
boolean |
can_publish
Whether the user can repost (false — cannot, true — can).
|
int |
comments_count
Number of comments.
|
VKList<VKApiPost> |
copy_history
List of history of the reposts.
|
static android.os.Parcelable.Creator<VKApiPost> |
CREATOR |
long |
date
Date (in Unix time) the post was added.
|
boolean |
friends_only
True, if the post was created with "Friends only" option.
|
int |
from_id
ID of the user who posted.
|
VKApiPlace |
geo
Information about location.
|
int |
id
Post ID on the wall, positive number
|
int |
likes_count
Number of users who liked the post.
|
java.lang.String |
post_type
Type of the post, can be: post, copy, reply, postpone, suggest.
|
int |
reply_owner_id
ID of the wall owner the post to which the reply is addressed (if the post is a reply to another wall post).
|
int |
reply_post_id
ID of the wall post to which the reply is addressed (if the post is a reply to another wall post).
|
int |
reposts_count
Number of users who copied the post.
|
int |
signer_id
ID of the author (if the post was published by a community and signed by a user).
|
java.lang.String |
text
Text of the post.
|
int |
to_id
Wall owner ID.
|
boolean |
user_likes
Whether the user liked the post (false — not liked, true — liked)
|
boolean |
user_reposted
Whether the user reposted the post (false — not reposted, true — reposted).
|
fields| Constructor and Description |
|---|
VKApiPost()
Creates empty Post instance.
|
VKApiPost(org.json.JSONObject from) |
VKApiPost(android.os.Parcel in)
Creates a Post instance from Parcel.
|
| Modifier and Type | Method and Description |
|---|---|
int |
describeContents() |
int |
getId()
Returns unique identifier of this object(usually it's value of JSON field "id").
|
java.lang.String |
getType() |
VKApiPost |
parse(org.json.JSONObject source)
Fills a Post instance from JSONObject.
|
java.lang.CharSequence |
toAttachmentString()
Convert attachment to special string to attach it to the post, message or comment.
|
void |
writeToParcel(android.os.Parcel dest,
int flags) |
getTag, getTag, setTag, setTagpublic int id
public int to_id
public int from_id
public long date
public java.lang.String text
public int reply_owner_id
public int reply_post_id
public boolean friends_only
public int comments_count
public boolean can_post_comment
public int likes_count
public boolean user_likes
public boolean can_like
public boolean can_publish
public int reposts_count
public boolean user_reposted
public java.lang.String post_type
public VKAttachments attachments
public VKApiPlace geo
public int signer_id
public static android.os.Parcelable.Creator<VKApiPost> CREATOR
public VKApiPost(org.json.JSONObject from)
throws org.json.JSONException
org.json.JSONExceptionpublic VKApiPost(android.os.Parcel in)
public VKApiPost()
public VKApiPost parse(org.json.JSONObject source) throws org.json.JSONException
parse in class VKApiModelsource - server API object.org.json.JSONException - if any critical error occurred while parsing.public int getId()
IdentifiablegetId in interface Identifiablepublic java.lang.CharSequence toAttachmentString()
VKAttachments.VKApiAttachmenttoAttachmentString in class VKAttachments.VKApiAttachmentpublic java.lang.String getType()
getType in class VKAttachments.VKApiAttachmentpublic int describeContents()
describeContents in interface android.os.Parcelablepublic void writeToParcel(android.os.Parcel dest,
int flags)
writeToParcel in interface android.os.Parcelable