public class VKApiPoll extends VKAttachments.VKApiAttachment implements android.os.Parcelable
| Modifier and Type | Class and Description |
|---|---|
static class |
VKApiPoll.Answer
Represents answer for the poll
|
| Modifier and Type | Field and Description |
|---|---|
int |
answer_id
Response ID of the current user(if the current user has not yet posted in this poll, it contains 0)
|
VKList<VKApiPoll.Answer> |
answers
Array of answers for this question.
|
long |
created
Date (in Unix time) the poll was created.
|
static android.os.Parcelable.Creator<VKApiPoll> |
CREATOR |
int |
id
Poll ID to get information about it using polls.getById method;
|
int |
owner_id
ID of the user or community that owns this poll.
|
java.lang.String |
question
Question in the poll.
|
int |
votes
The total number of users answered.
|
fields| Constructor and Description |
|---|
VKApiPoll()
Creates empty Country instance.
|
VKApiPoll(org.json.JSONObject from) |
VKApiPoll(android.os.Parcel in)
Creates a Poll 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() |
VKApiPoll |
parse(org.json.JSONObject source)
Fills a Poll 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 owner_id
public long created
public java.lang.String question
public int votes
public int answer_id
public VKList<VKApiPoll.Answer> answers
public static android.os.Parcelable.Creator<VKApiPoll> CREATOR
public VKApiPoll(org.json.JSONObject from)
throws org.json.JSONException
org.json.JSONExceptionpublic VKApiPoll(android.os.Parcel in)
public VKApiPoll()
public VKApiPoll parse(org.json.JSONObject source)
parse in class VKApiModelsource - server API object.public java.lang.CharSequence toAttachmentString()
VKAttachments.VKApiAttachmenttoAttachmentString in class VKAttachments.VKApiAttachmentpublic java.lang.String getType()
getType in class VKAttachments.VKApiAttachmentpublic int getId()
IdentifiablegetId in interface Identifiablepublic int describeContents()
describeContents in interface android.os.Parcelablepublic void writeToParcel(android.os.Parcel dest,
int flags)
writeToParcel in interface android.os.Parcelable