public class VKApiPhoto extends VKAttachments.VKApiAttachment implements android.os.Parcelable, Identifiable
| Modifier and Type | Field and Description |
|---|---|
java.lang.String |
access_key
An access key using for get information about hidden objects.
|
int |
album_id
Photo album ID.
|
boolean |
can_comment
Whether the current user can comment on the photo
|
int |
comments
Number of comments on the photo.
|
static android.os.Parcelable.Creator<VKApiPhoto> |
CREATOR |
long |
date
Date (in Unix time) the photo was added.
|
int |
height
Height (in pixels) of the original photo.
|
int |
id
Photo ID, positive number
|
int |
likes
Number of likes on the photo.
|
int |
owner_id
ID of the user or community that owns the photo.
|
java.lang.String |
photo_1280
URL of image with maximum size 1280x1024px.
|
java.lang.String |
photo_130
URL of image with maximum size 130x130px.
|
java.lang.String |
photo_2560
URL of image with maximum size 2560x2048px.
|
java.lang.String |
photo_604
URL of image with maximum size 604x604px.
|
java.lang.String |
photo_75
URL of image with maximum size 75x75px.
|
java.lang.String |
photo_807
URL of image with maximum size 807x807px.
|
VKPhotoSizes |
src
All photo thumbs in photo sizes.
|
int |
tags
Number of tags on the photo.
|
java.lang.String |
text
Text describing the photo.
|
boolean |
user_likes
Information whether the current user liked the photo.
|
int |
width
Width (in pixels) of the original photo.
|
fields| Constructor and Description |
|---|
VKApiPhoto()
Creates empty Photo instance.
|
VKApiPhoto(org.json.JSONObject from) |
VKApiPhoto(android.os.Parcel in)
Creates a Photo instance from Parcel.
|
VKApiPhoto(java.lang.String photoAttachmentString)
Init photo object with attachment string like photo45898586_334180483
|
| 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() |
VKApiPhoto |
parse(org.json.JSONObject from)
Fills a Photo 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 album_id
public int owner_id
public int width
public int height
public java.lang.String text
public long date
public java.lang.String photo_75
public java.lang.String photo_130
public java.lang.String photo_604
public java.lang.String photo_807
public java.lang.String photo_1280
public java.lang.String photo_2560
public VKPhotoSizes src
PhotoSizes format.public boolean user_likes
public boolean can_comment
public int likes
public int comments
public int tags
public java.lang.String access_key
public static android.os.Parcelable.Creator<VKApiPhoto> CREATOR
public VKApiPhoto(org.json.JSONObject from)
throws org.json.JSONException
org.json.JSONExceptionpublic VKApiPhoto(android.os.Parcel in)
public VKApiPhoto(java.lang.String photoAttachmentString)
photoAttachmentString - string of format photo[OWNER_ID]_[PHOTO_ID]public VKApiPhoto()
public VKApiPhoto parse(org.json.JSONObject from)
parse in class VKApiModelfrom - server API object.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