public class VKApiLink extends VKAttachments.VKApiAttachment implements android.os.Parcelable
| Modifier and Type | Field and Description |
|---|---|
static android.os.Parcelable.Creator<VKApiLink> |
CREATOR |
java.lang.String |
description
Link description;
|
java.lang.String |
image_src
Image preview URL for the link (if any).
|
java.lang.String |
preview_page
ID wiki page with content for the preview of the page contents
ID is returned as "ownerid_pageid".
|
java.lang.String |
title
Link title
|
java.lang.String |
url
Link URL
|
fields| Constructor and Description |
|---|
VKApiLink()
Creates empty Link instance.
|
VKApiLink(org.json.JSONObject from) |
VKApiLink(java.lang.String url)
Creates link attachment to attach it to the post
|
| 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() |
VKApiLink |
parse(org.json.JSONObject source)
Fills a Link 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 java.lang.String url
public java.lang.String title
public java.lang.String description
public java.lang.String image_src
public java.lang.String preview_page
public static android.os.Parcelable.Creator<VKApiLink> CREATOR
public VKApiLink(java.lang.String url)
url - full URL of linkpublic VKApiLink(org.json.JSONObject from)
throws org.json.JSONException
org.json.JSONExceptionpublic VKApiLink()
public VKApiLink 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 describeContents()
describeContents in interface android.os.Parcelablepublic void writeToParcel(android.os.Parcel dest,
int flags)
writeToParcel in interface android.os.Parcelablepublic int getId()
IdentifiablegetId in interface Identifiable