Package com.vk.api.sdk.queries.wall
Class WallPostQuery
- java.lang.Object
-
- com.vk.api.sdk.client.ApiRequest<R>
-
- com.vk.api.sdk.client.AbstractQueryBuilder<WallPostQuery,PostResponse>
-
- com.vk.api.sdk.queries.wall.WallPostQuery
-
public class WallPostQuery extends AbstractQueryBuilder<WallPostQuery,PostResponse>
Query for Wall.post method
-
-
Constructor Summary
Constructors Constructor Description WallPostQuery(VkApiClient client, UserActor actor)Creates a AbstractQueryBuilder instance that can be used to build api request with various parameters
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description WallPostQueryattachments(java.lang.String... value)attachments (Required if 'message' is not set.) List of objects attached to the post, in the following format: "_ , _ ", ' — Type of media attachment: 'photo' — photo, 'video' — video, 'audio' — audio, 'doc' — document, 'page' — wiki-page, 'note' — note, 'poll' — poll, 'album' — photo album, ' ' — ID of the media application owner. WallPostQueryattachments(java.util.List<java.lang.String> value)(Required if 'message' is not set.) List of objects attached to the post, in the following format: "_ , _ ", ' — Type of media attachment: 'photo' — photo, 'video' — video, 'audio' — audio, 'doc' — document, 'page' — wiki-page, 'note' — note, 'poll' — poll, 'album' — photo album, ' ' — ID of the media application owner. WallPostQuerycloseComments(java.lang.Boolean value)Set close commentsWallPostQuerycopyright(java.lang.String value)Set copyrightWallPostQuerydonutPaidDuration(java.lang.Integer value)Set donut paid durationprotected java.util.List<java.lang.String>essentialKeys()Get list of required parameter namesWallPostQueryfriendsOnly(java.lang.Boolean value)'1' — post will be available to friends only, '0' — post will be available to all users (default)WallPostQueryfromGroup(java.lang.Boolean value)For a community: '1' — post will be published by the community, '0' — post will be published by the user (default)protected WallPostQuerygetThis()Get reference to this objectWallPostQueryguid(java.lang.String value)Set guidWallPostQuerylat(java.lang.Number value)Geographical latitude of a check-in, in degrees (from -90 to 90).WallPostQuerylng(java.lang.Number value)Geographical longitude of a check-in, in degrees (from -180 to 180).WallPostQuerymarkAsAds(java.lang.Boolean value)Set mark as adsWallPostQuerymessage(java.lang.String value)(Required if 'attachments' is not set.) Text of the post.WallPostQuerymuteNotifications(java.lang.Boolean value)Set mute notificationsWallPostQueryownerId(java.lang.Integer value)User ID or community ID.WallPostQueryplaceId(java.lang.Integer value)ID of the location where the user was tagged.WallPostQuerypostId(java.lang.Integer value)Post ID.WallPostQuerypublishDate(java.lang.Integer value)Publication date (in Unix time).WallPostQueryservices(java.lang.String value)List of services or websites the update will be exported to, if the user has so requested.WallPostQuerysigned(java.lang.Boolean value)Only for posts in communities with 'from_group' set to '1': '1' — post will be signed with the name of the posting user, '0' — post will not be signed (default)WallPostQuerytopicId(PostTopicId value)Topic ID.-
Methods inherited from class com.vk.api.sdk.client.AbstractQueryBuilder
accessToken, build, captchaKey, captchaSid, clientSecret, confirm, getBody, getMethod, getParams, lang, toString, unsafeParam, unsafeParam, unsafeParam, unsafeParam, unsafeParam, unsafeParam, unsafeParam, unsafeParam, unsafeParam, unsafeParam, unsafeParam, version
-
Methods inherited from class com.vk.api.sdk.client.ApiRequest
execute, executeAsRaw, executeAsString, getClient, getGson, getHeaders, getResponseClass, getUrl, setHeaders
-
-
-
-
Constructor Detail
-
WallPostQuery
public WallPostQuery(VkApiClient client, UserActor actor)
Creates a AbstractQueryBuilder instance that can be used to build api request with various parameters- Parameters:
client- VK API clientactor- actor with access token
-
-
Method Detail
-
ownerId
public WallPostQuery ownerId(java.lang.Integer value)
User ID or community ID. Use a negative value to designate a community ID.- Parameters:
value- value of "owner id" parameter.- Returns:
- a reference to this
AbstractQueryBuilderobject to fulfill the "Builder" pattern.
-
friendsOnly
public WallPostQuery friendsOnly(java.lang.Boolean value)
'1' — post will be available to friends only, '0' — post will be available to all users (default)- Parameters:
value- value of "friends only" parameter.- Returns:
- a reference to this
AbstractQueryBuilderobject to fulfill the "Builder" pattern.
-
fromGroup
public WallPostQuery fromGroup(java.lang.Boolean value)
For a community: '1' — post will be published by the community, '0' — post will be published by the user (default)- Parameters:
value- value of "from group" parameter.- Returns:
- a reference to this
AbstractQueryBuilderobject to fulfill the "Builder" pattern.
-
message
public WallPostQuery message(java.lang.String value)
(Required if 'attachments' is not set.) Text of the post.- Parameters:
value- value of "message" parameter.- Returns:
- a reference to this
AbstractQueryBuilderobject to fulfill the "Builder" pattern.
-
services
public WallPostQuery services(java.lang.String value)
List of services or websites the update will be exported to, if the user has so requested. Sample values: 'twitter', 'facebook'.- Parameters:
value- value of "services" parameter.- Returns:
- a reference to this
AbstractQueryBuilderobject to fulfill the "Builder" pattern.
-
signed
public WallPostQuery signed(java.lang.Boolean value)
Only for posts in communities with 'from_group' set to '1': '1' — post will be signed with the name of the posting user, '0' — post will not be signed (default)- Parameters:
value- value of "signed" parameter.- Returns:
- a reference to this
AbstractQueryBuilderobject to fulfill the "Builder" pattern.
-
publishDate
public WallPostQuery publishDate(java.lang.Integer value)
Publication date (in Unix time). If used, posting will be delayed until the set time.- Parameters:
value- value of "publish date" parameter. Minimum is 0.- Returns:
- a reference to this
AbstractQueryBuilderobject to fulfill the "Builder" pattern.
-
lat
public WallPostQuery lat(java.lang.Number value)
Geographical latitude of a check-in, in degrees (from -90 to 90).- Parameters:
value- value of "lat" parameter.- Returns:
- a reference to this
AbstractQueryBuilderobject to fulfill the "Builder" pattern.
-
lng
public WallPostQuery lng(java.lang.Number value)
Geographical longitude of a check-in, in degrees (from -180 to 180).- Parameters:
value- value of "long" parameter.- Returns:
- a reference to this
AbstractQueryBuilderobject to fulfill the "Builder" pattern.
-
placeId
public WallPostQuery placeId(java.lang.Integer value)
ID of the location where the user was tagged.- Parameters:
value- value of "place id" parameter. Minimum is 0.- Returns:
- a reference to this
AbstractQueryBuilderobject to fulfill the "Builder" pattern.
-
postId
public WallPostQuery postId(java.lang.Integer value)
Post ID. Used for publishing of scheduled and suggested posts.- Parameters:
value- value of "post id" parameter. Minimum is 0.- Returns:
- a reference to this
AbstractQueryBuilderobject to fulfill the "Builder" pattern.
-
guid
public WallPostQuery guid(java.lang.String value)
Set guid- Parameters:
value- value of "guid" parameter.- Returns:
- a reference to this
AbstractQueryBuilderobject to fulfill the "Builder" pattern.
-
markAsAds
public WallPostQuery markAsAds(java.lang.Boolean value)
Set mark as ads- Parameters:
value- value of "mark as ads" parameter. By default false.- Returns:
- a reference to this
AbstractQueryBuilderobject to fulfill the "Builder" pattern.
-
closeComments
public WallPostQuery closeComments(java.lang.Boolean value)
Set close comments- Parameters:
value- value of "close comments" parameter.- Returns:
- a reference to this
AbstractQueryBuilderobject to fulfill the "Builder" pattern.
-
donutPaidDuration
public WallPostQuery donutPaidDuration(java.lang.Integer value)
Set donut paid duration- Parameters:
value- value of "donut paid duration" parameter.- Returns:
- a reference to this
AbstractQueryBuilderobject to fulfill the "Builder" pattern.
-
muteNotifications
public WallPostQuery muteNotifications(java.lang.Boolean value)
Set mute notifications- Parameters:
value- value of "mute notifications" parameter.- Returns:
- a reference to this
AbstractQueryBuilderobject to fulfill the "Builder" pattern.
-
copyright
public WallPostQuery copyright(java.lang.String value)
Set copyright- Parameters:
value- value of "copyright" parameter.- Returns:
- a reference to this
AbstractQueryBuilderobject to fulfill the "Builder" pattern.
-
topicId
public WallPostQuery topicId(PostTopicId value)
Topic ID. Allowed values can be obtained from newsfeed.getPostTopics method- Parameters:
value- value of "topic id" parameter. Minimum is 0.- Returns:
- a reference to this
AbstractQueryBuilderobject to fulfill the "Builder" pattern.
-
attachments
public WallPostQuery attachments(java.lang.String... value)
attachments (Required if 'message' is not set.) List of objects attached to the post, in the following format: "_ , _ ", ' — Type of media attachment: 'photo' — photo, 'video' — video, 'audio' — audio, 'doc' — document, 'page' — wiki-page, 'note' — note, 'poll' — poll, 'album' — photo album, ' ' — ID of the media application owner. ' ' — Media application ID. Example: "photo100172_166443618,photo66748_265827614", May contain a link to an external page to include in the post. Example: "photo66748_265827614,http://habrahabr.ru", "NOTE: If more than one link is being attached, an error will be thrown." - Parameters:
value- value of "attachments" parameter.- Returns:
- a reference to this
AbstractQueryBuilderobject to fulfill the "Builder" pattern.
-
attachments
public WallPostQuery attachments(java.util.List<java.lang.String> value)
(Required if 'message' is not set.) List of objects attached to the post, in the following format: "_ , _ ", ' — Type of media attachment: 'photo' — photo, 'video' — video, 'audio' — audio, 'doc' — document, 'page' — wiki-page, 'note' — note, 'poll' — poll, 'album' — photo album, ' ' — ID of the media application owner. ' ' — Media application ID. Example: "photo100172_166443618,photo66748_265827614", May contain a link to an external page to include in the post. Example: "photo66748_265827614,http://habrahabr.ru", "NOTE: If more than one link is being attached, an error will be thrown." - Parameters:
value- value of "attachments" parameter.- Returns:
- a reference to this
AbstractQueryBuilderobject to fulfill the "Builder" pattern.
-
getThis
protected WallPostQuery getThis()
Description copied from class:AbstractQueryBuilderGet reference to this object- Specified by:
getThisin classAbstractQueryBuilder<WallPostQuery,PostResponse>- Returns:
- a reference to this
AbstractQueryBuilderobject to fulfill the "Builder" pattern.
-
essentialKeys
protected java.util.List<java.lang.String> essentialKeys()
Description copied from class:AbstractQueryBuilderGet list of required parameter names- Specified by:
essentialKeysin classAbstractQueryBuilder<WallPostQuery,PostResponse>- Returns:
- list of names
-
-