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

com.vk.api.sdk.actions.GroupsLongPoll Maven / Gradle / Ivy

Go to download

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

The newest version!
package com.vk.api.sdk.actions;

import com.vk.api.sdk.client.AbstractAction;
import com.vk.api.sdk.client.VkApiClient;
import com.vk.api.sdk.client.actors.GroupActor;
import com.vk.api.sdk.client.actors.ServiceActor;
import com.vk.api.sdk.client.actors.UserActor;
import com.vk.api.sdk.objects.users.Fields;
import com.vk.api.sdk.queries.groups.*;

/**
 * List of Groups methods
 */
public class GroupsLongPoll extends Groups {

    /**
     * Constructor
     *
     * @param client vk api client
     */
    public GroupsLongPoll(VkApiClient client) {
        super(client);
    }

    /**
     * Retrieves server info needed to use long polling.
     */
    public GroupsGetLongPollServerQuery getLongPollServer(UserActor actor, int groupId) {
        return new GroupsGetLongPollServerQuery(getClient(), actor, groupId);
    }

    /**
     * Retrieves server info needed to use long polling.
     */
    public GroupsGetLongPollServerQuery getLongPollServer(GroupActor actor) {
        return new GroupsGetLongPollServerQuery(getClient(), actor);
    }

    /**
     * Retrieves group longpoll settings
     */
    public GroupsGetLongPollSettingsQuery getLongPollSettings(UserActor actor, int groupId) {
        return new GroupsGetLongPollSettingsQuery(getClient(), actor, groupId);
    }

    /**
     * Retrieves group longpoll settings
     */
    public GroupsGetLongPollSettingsQuery getLongPollSettings(GroupActor actor) {
        return new GroupsGetLongPollSettingsQuery(getClient(), actor);
    }

    /**
     * Sets group longpoll settings
     */
    public GroupsSetLongPollSettingsQuery setLongPollSettings(UserActor actor, int groupId) {
        return new GroupsSetLongPollSettingsQuery(getClient(), actor, groupId);
    }

    /**
     * Sets group longpoll settings
     */
    public GroupsSetLongPollSettingsQuery setLongPollSettings(GroupActor actor) {
        return new GroupsSetLongPollSettingsQuery(getClient(), actor, actor.getGroupId());
    }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy