Class Secure

    • Constructor Detail

      • Secure

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

      • addAppEvent

        public SecureAddAppEventQuery addAppEvent​(ServiceActor actor,
                                                  int userId,
                                                  int activityId)
        Adds user activity information to an application
        Parameters:
        actor - vk actor
        userId - ID of a user to save the data
        activityId - there are 2 default activities: , * 1 - level. Works similar to ,, * 2 - points, saves points amount, Any other value is for saving completed missions
        Returns:
        query
      • checkToken

        public SecureCheckTokenQuery checkToken​(ServiceActor actor)
        Checks the user authentication in 'IFrame' and 'Flash' apps using the 'access_token' parameter.
        Parameters:
        actor - vk actor
        Returns:
        query
      • getAppBalance

        public SecureGetAppBalanceQuery getAppBalance​(ServiceActor actor)
        Returns payment balance of the application in hundredth of a vote.
        Parameters:
        actor - vk actor
        Returns:
        query
      • getSMSHistory

        public SecureGetSMSHistoryQuery getSMSHistory​(ServiceActor actor)
        Shows a list of SMS notifications sent by the application using [vk.com/dev/secure.sendSMSNotification|secure.sendSMSNotification] method.
        Parameters:
        actor - vk actor
        Returns:
        query
      • getTransactionsHistory

        public SecureGetTransactionsHistoryQuery getTransactionsHistory​(ServiceActor actor)
        Shows history of votes transaction between users and the application.
        Parameters:
        actor - vk actor
        Returns:
        query
      • getUserLevel

        public SecureGetUserLevelQuery getUserLevel​(ServiceActor actor,
                                                    java.lang.Integer... userIds)
        Returns one of the previously set game levels of one or more users in the application.
        Parameters:
        actor - vk actor
        userIds -
        Returns:
        query
      • getUserLevel

        public SecureGetUserLevelQuery getUserLevel​(ServiceActor actor,
                                                    java.util.List<java.lang.Integer> userIds)
        Returns one of the previously set game levels of one or more users in the application.
        Parameters:
        actor - vk actor
        userIds -
        Returns:
        query
      • giveEventSticker

        public SecureGiveEventStickerQuery giveEventSticker​(ServiceActor actor,
                                                            int achievementId,
                                                            java.lang.Integer... userIds)
        Opens the game achievement and gives the user a sticker
        Parameters:
        actor - vk actor
        achievementId -
        userIds -
        Returns:
        query
      • giveEventSticker

        public SecureGiveEventStickerQuery giveEventSticker​(ServiceActor actor,
                                                            int achievementId,
                                                            java.util.List<java.lang.Integer> userIds)
        Opens the game achievement and gives the user a sticker
        Parameters:
        actor - vk actor
        achievementId -
        userIds -
        Returns:
        query
      • sendNotification

        public SecureSendNotificationQuery sendNotification​(ServiceActor actor,
                                                            java.lang.String message)
        Sends notification to the user.
        Parameters:
        actor - vk actor
        message - notification text which should be sent in 'UTF-8' encoding ('254' characters maximum).
        Returns:
        query
      • sendSMSNotification

        public SecureSendSMSNotificationQuery sendSMSNotification​(ServiceActor actor,
                                                                  int userId,
                                                                  java.lang.String message)
        Sends 'SMS' notification to a user's mobile device.
        Parameters:
        actor - vk actor
        userId - ID of the user to whom SMS notification is sent. The user shall allow the application to send him/her notifications (, +1).
        message - 'SMS' text to be sent in 'UTF-8' encoding. Only Latin letters and numbers are allowed. Maximum size is '160' characters.
        Returns:
        query
      • setCounter

        public SecureSetCounterQuery setCounter​(ServiceActor actor)
        Sets a counter which is shown to the user in bold in the left menu.
        Parameters:
        actor - vk actor
        Returns:
        query