Class Account

    • Constructor Detail

      • Account

        public Account​(VkApiClient client)
        Constructor
        Parameters:
        client - vk api client
    • Method Detail

      • changePassword

        public AccountChangePasswordQuery changePassword​(UserActor actor,
                                                         java.lang.String newPassword)
        Changes a user password after access is successfully restored with the [vk.com/dev/auth.restore|auth.restore] method.
        Parameters:
        actor - vk actor
        newPassword - New password that will be set as a current
        Returns:
        query
      • getActiveOffers

        public AccountGetActiveOffersQuery getActiveOffers​(UserActor actor)
        Returns a list of active ads (offers) which executed by the user will bring him/her respective number of votes to his balance in the application.
        Parameters:
        actor - vk actor
        Returns:
        query
      • getAppPermissions

        public AccountGetAppPermissionsQuery getAppPermissions​(UserActor actor,
                                                               int userId)
        Gets settings of the user in this application.
        Parameters:
        actor - vk actor
        userId - User ID whose settings information shall be got. By default: current user.
        Returns:
        query
      • getCounters

        public AccountGetCountersQuery getCounters​(UserActor actor)
        Returns non-null values of user counters.
        Parameters:
        actor - vk actor
        Returns:
        query
      • getInfo

        public AccountGetInfoQuery getInfo​(UserActor actor)
        Returns current account info.
        Parameters:
        actor - vk actor
        Returns:
        query
      • registerDevice

        public AccountRegisterDeviceQuery registerDevice​(UserActor actor,
                                                         java.lang.String token,
                                                         java.lang.String deviceId)
        Subscribes an iOS/Android/Windows Phone-based device to receive push notifications
        Parameters:
        actor - vk actor
        token - Device token used to send notifications. (for mpns, the token shall be URL for sending of notifications)
        deviceId - Unique device ID.
        Returns:
        query
      • setInfo

        public AccountSetInfoQuery setInfo​(UserActor actor)
        Allows to edit the current account info.
        Parameters:
        actor - vk actor
        Returns:
        query
      • setNameInMenu

        public AccountSetNameInMenuQuery setNameInMenu​(UserActor actor,
                                                       int userId)
        Sets an application screen name (up to 17 characters), that is shown to the user in the left menu.
        Parameters:
        actor - vk actor
        userId - User ID.
        Returns:
        query
      • setOnline

        public AccountSetOnlineQuery setOnline​(UserActor actor)
        Marks the current user as online for 15 minutes.
        Parameters:
        actor - vk actor
        Returns:
        query
      • setPushSettings

        public AccountSetPushSettingsQuery setPushSettings​(UserActor actor,
                                                           java.lang.String deviceId)
        Change push settings.
        Parameters:
        actor - vk actor
        deviceId - Unique device ID.
        Returns:
        query
      • setSilenceMode

        public AccountSetSilenceModeQuery setSilenceMode​(UserActor actor)
        Mutes push notifications for the set period of time.
        Parameters:
        actor - vk actor
        Returns:
        query
      • unregisterDevice

        public AccountUnregisterDeviceQuery unregisterDevice​(UserActor actor)
        Unsubscribes a device from push notifications.
        Parameters:
        actor - vk actor
        Returns:
        query