com.vk.api.sdk.queries.messages.MessagesSetChatPhotoQuery Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of sdk Show documentation
Show all versions of sdk Show documentation
Java library for VK API interaction, includes OAuth 2.0 authorization and API methods.
// Autogenerated from vk-api-schema. Please don't edit it manually.
package com.vk.api.sdk.queries.messages;
import com.vk.api.sdk.client.AbstractQueryBuilder;
import com.vk.api.sdk.client.VkApiClient;
import com.vk.api.sdk.client.actors.GroupActor;
import com.vk.api.sdk.client.actors.UserActor;
import com.vk.api.sdk.objects.messages.responses.SetChatPhotoResponse;
import java.util.Arrays;
import java.util.List;
/**
* Query for Messages.setChatPhoto method
*/
public class MessagesSetChatPhotoQuery extends AbstractQueryBuilder {
/**
* Creates a AbstractQueryBuilder instance that can be used to build api request with various parameters
*
* @param client VK API client
* @param actor actor with access token
* @param file value of "file" parameter.
*/
public MessagesSetChatPhotoQuery(VkApiClient client, UserActor actor, String file) {
super(client, "messages.setChatPhoto", SetChatPhotoResponse.class);
accessToken(actor.getAccessToken());
file(file);
}
/**
* Creates a AbstractQueryBuilder instance that can be used to build api request with various parameters
*
* @param client VK API client
* @param actor actor with access token
* @param file value of "file" parameter.
*/
public MessagesSetChatPhotoQuery(VkApiClient client, GroupActor actor, String file) {
super(client, "messages.setChatPhoto", SetChatPhotoResponse.class);
accessToken(actor.getAccessToken());
file(file);
}
/**
* Upload URL from the 'response' field returned by the [vk.com/dev/photos.getChatUploadServer|photos.getChatUploadServer] method upon successfully uploading an image.
*
* @param value value of "file" parameter.
* @return a reference to this {@code AbstractQueryBuilder} object to fulfill the "Builder" pattern.
*/
protected MessagesSetChatPhotoQuery file(String value) {
return unsafeParam("file", value);
}
@Override
protected MessagesSetChatPhotoQuery getThis() {
return this;
}
@Override
protected List essentialKeys() {
return Arrays.asList("file", "access_token");
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy