All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.vk.api.sdk.queries.secure.SecureCheckTokenQuery Maven / Gradle / Ivy

Go to download

Java library for VK API interaction, includes OAuth 2.0 authorization and API methods.

The newest version!
// Autogenerated from vk-api-schema. Please don't edit it manually.
package com.vk.api.sdk.queries.secure;

import com.vk.api.sdk.client.AbstractSecureQueryBuilder;
import com.vk.api.sdk.client.VkApiClient;
import com.vk.api.sdk.client.actors.ServiceActor;
import com.vk.api.sdk.objects.annotations.ApiParam;
import com.vk.api.sdk.objects.secure.responses.CheckTokenResponse;
import java.util.Arrays;
import java.util.List;

/**
 * Query for Secure.checkToken method
 */
public class SecureCheckTokenQuery extends AbstractSecureQueryBuilder {
    /**
     * Creates a AbstractQueryBuilder instance that can be used to build service api request with various parameters
     *
     * @param client VK API client
     * @param actor actor with access token
     */
    public SecureCheckTokenQuery(VkApiClient client, ServiceActor actor) {
        super(client, "secure.checkToken", CheckTokenResponse.class);
        accessToken(actor.getAccessToken());
        clientSecret(actor.getClientSecret());
    }

    /**
     * Client 'access_token'
     *
     * @param value value of "token" parameter.
     * @return a reference to this {@code AbstractQueryBuilder} object to fulfill the "Builder" pattern.
     */
    @ApiParam("token")
    public SecureCheckTokenQuery token(String value) {
        return unsafeParam("token", value);
    }

    /**
     * User 'ip address'. Note that user may access using the 'ipv6' address, in this case it is required to transmit the 'ipv6' address. If not transmitted, the address will not be checked.
     *
     * @param value value of "ip" parameter.
     * @return a reference to this {@code AbstractQueryBuilder} object to fulfill the "Builder" pattern.
     */
    @ApiParam("ip")
    public SecureCheckTokenQuery ip(String value) {
        return unsafeParam("ip", value);
    }

    @Override
    protected SecureCheckTokenQuery getThis() {
        return this;
    }

    @Override
    protected List essentialKeys() {
        return Arrays.asList("access_token");
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy