Class Friends

    • Constructor Detail

      • Friends

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

      • add

        public FriendsAddQuery add​(UserActor actor)
        Approves or creates a friend request.
        Parameters:
        actor - vk actor
        Returns:
        query
      • addList

        public FriendsAddListQuery addList​(UserActor actor,
                                           java.lang.String name)
        Creates a new friend list for the current user.
        Parameters:
        actor - vk actor
        name - Name of the friend list.
        Returns:
        query
      • areFriends

        public FriendsAreFriendsQuery areFriends​(UserActor actor,
                                                 java.lang.Integer... userIds)
        Checks the current user's friendship status with other specified users.
        Parameters:
        actor - vk actor
        userIds - IDs of the users whose friendship status to check.
        Returns:
        query
      • areFriends

        public FriendsAreFriendsQuery areFriends​(UserActor actor,
                                                 java.util.List<java.lang.Integer> userIds)
        Checks the current user's friendship status with other specified users.
        Parameters:
        actor - vk actor
        userIds - IDs of the users whose friendship status to check.
        Returns:
        query
      • areFriendsExtended

        public FriendsAreFriendsQueryWithExtended areFriendsExtended​(UserActor actor,
                                                                     java.lang.Integer... userIds)
        Checks the current user's friendship status with other specified users.
        Parameters:
        actor - vk actor
        userIds - IDs of the users whose friendship status to check.
        Returns:
        query
      • areFriendsExtended

        public FriendsAreFriendsQueryWithExtended areFriendsExtended​(UserActor actor,
                                                                     java.util.List<java.lang.Integer> userIds)
        Checks the current user's friendship status with other specified users.
        Parameters:
        actor - vk actor
        userIds - IDs of the users whose friendship status to check.
        Returns:
        query
      • delete

        public FriendsDeleteQuery delete​(UserActor actor)
        Declines a friend request or deletes a user from the current user's friend list.
        Parameters:
        actor - vk actor
        Returns:
        query
      • deleteList

        public FriendsDeleteListQuery deleteList​(UserActor actor,
                                                 int listId)
        Deletes a friend list of the current user.
        Parameters:
        actor - vk actor
        listId - ID of the friend list to delete.
        Returns:
        query
      • edit

        public FriendsEditQuery edit​(UserActor actor,
                                     int userId)
        Edits the friend lists of the selected user.
        Parameters:
        actor - vk actor
        userId - ID of the user whose friend list is to be edited.
        Returns:
        query
      • editList

        public FriendsEditListQuery editList​(UserActor actor,
                                             int listId)
        Edits a friend list of the current user.
        Parameters:
        actor - vk actor
        listId - Friend list ID.
        Returns:
        query
      • get

        public FriendsGetQuery get​(UserActor actor)
        Returns a list of user IDs or detailed information about a user's friends.
        Parameters:
        actor - vk actor
        Returns:
        query
      • get

        public FriendsGetQuery get​(ServiceActor actor)
        Returns a list of user IDs or detailed information about a user's friends.
        Parameters:
        actor - vk actor
        Returns:
        query
      • getWithFields

        public FriendsGetQueryWithFields getWithFields​(UserActor actor,
                                                       Fields... fields)
        Returns a list of user IDs or detailed information about a user's friends.
        Parameters:
        actor - vk actor
        fields - Profile fields to return. Sample values: 'uid', 'first_name', 'last_name', 'nickname', 'sex', 'bdate' (birthdate), 'city', 'country', 'timezone', 'photo', 'photo_medium', 'photo_big', 'domain', 'has_mobile', 'rate', 'contacts', 'education'.
        Returns:
        query
      • getWithFields

        public FriendsGetQueryWithFields getWithFields​(ServiceActor actor,
                                                       Fields... fields)
        Returns a list of user IDs or detailed information about a user's friends.
        Parameters:
        actor - vk actor
        fields - Profile fields to return. Sample values: 'uid', 'first_name', 'last_name', 'nickname', 'sex', 'bdate' (birthdate), 'city', 'country', 'timezone', 'photo', 'photo_medium', 'photo_big', 'domain', 'has_mobile', 'rate', 'contacts', 'education'.
        Returns:
        query
      • getAppUsers

        public FriendsGetAppUsersQuery getAppUsers​(UserActor actor)
        Returns a list of IDs of the current user's friends who installed the application.
        Parameters:
        actor - vk actor
        Returns:
        query
      • getByPhones

        public FriendsGetByPhonesQuery getByPhones​(UserActor actor)
        Returns a list of the current user's friends whose phone numbers, validated or specified in a profile, are in a given list.
        Parameters:
        actor - vk actor
        Returns:
        query
      • getLists

        public FriendsGetListsQuery getLists​(UserActor actor)
        Returns a list of the user's friend lists.
        Parameters:
        actor - vk actor
        Returns:
        query
      • getMutualWithTargetUids

        public FriendsGetMutualQueryWithTargetUids getMutualWithTargetUids​(UserActor actor,
                                                                           java.lang.Integer... targetUids)
        Returns a list of user IDs of the mutual friends of two users.
        Parameters:
        actor - vk actor
        targetUids - IDs of the users whose friends will be checked against the friends of the user specified in 'source_uid'.
        Returns:
        query
      • getMutual

        public FriendsGetMutualQuery getMutual​(UserActor actor)
        Returns a list of user IDs of the mutual friends of two users.
        Parameters:
        actor - vk actor
        Returns:
        query
      • getOnline

        public FriendsGetOnlineQuery getOnline​(UserActor actor)
        Returns a list of user IDs of a user's friends who are online.
        Parameters:
        actor - vk actor
        Returns:
        query
      • getOnlineWithOnlineMobile

        public FriendsGetOnlineQueryWithOnlineMobile getOnlineWithOnlineMobile​(UserActor actor,
                                                                               java.lang.Boolean onlineMobile)
        Returns a list of user IDs of a user's friends who are online.
        Parameters:
        actor - vk actor
        onlineMobile - '1' — to return an additional 'online_mobile' field, '0' — (default),
        Returns:
        query
      • getRecent

        public FriendsGetRecentQuery getRecent​(UserActor actor)
        Returns a list of user IDs of the current user's recently added friends.
        Parameters:
        actor - vk actor
        Returns:
        query
      • getRequestsExtended

        public FriendsGetRequestsQueryWithExtended getRequestsExtended​(UserActor actor)
        Returns information about the current user's incoming and outgoing friend requests.
        Parameters:
        actor - vk actor
        Returns:
        query
      • getRequests

        public FriendsGetRequestsQuery getRequests​(UserActor actor)
        Returns information about the current user's incoming and outgoing friend requests.
        Parameters:
        actor - vk actor
        Returns:
        query
      • getRequestsWithNeedMutual

        public FriendsGetRequestsQueryWithNeedMutual getRequestsWithNeedMutual​(UserActor actor,
                                                                               java.lang.Boolean needMutual)
        Returns information about the current user's incoming and outgoing friend requests.
        Parameters:
        actor - vk actor
        needMutual - '1' — to return a list of mutual friends (up to 20), if any
        Returns:
        query
      • getSuggestions

        public FriendsGetSuggestionsQuery getSuggestions​(UserActor actor)
        Returns a list of profiles of users whom the current user may know.
        Parameters:
        actor - vk actor
        Returns:
        query
      • search

        public FriendsSearchQuery search​(UserActor actor,
                                         int userId)
        Returns a list of friends matching the search criteria.
        Parameters:
        actor - vk actor
        userId - User ID.
        Returns:
        query