Package com.vk.api.sdk.actions
Class Friends
- java.lang.Object
-
- com.vk.api.sdk.client.AbstractAction
-
- com.vk.api.sdk.actions.Friends
-
public class Friends extends AbstractAction
List of Friends methods
-
-
Constructor Summary
Constructors Constructor Description Friends(VkApiClient client)Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description FriendsAddQueryadd(UserActor actor)Approves or creates a friend request.FriendsAddListQueryaddList(UserActor actor, java.lang.String name)Creates a new friend list for the current user.FriendsAreFriendsQueryareFriends(UserActor actor, java.lang.Integer... userIds)Checks the current user's friendship status with other specified users.FriendsAreFriendsQueryareFriends(UserActor actor, java.util.List<java.lang.Integer> userIds)Checks the current user's friendship status with other specified users.FriendsAreFriendsQueryWithExtendedareFriendsExtended(UserActor actor, java.lang.Integer... userIds)Checks the current user's friendship status with other specified users.FriendsAreFriendsQueryWithExtendedareFriendsExtended(UserActor actor, java.util.List<java.lang.Integer> userIds)Checks the current user's friendship status with other specified users.FriendsDeleteQuerydelete(UserActor actor)Declines a friend request or deletes a user from the current user's friend list.FriendsDeleteAllRequestsQuerydeleteAllRequests(UserActor actor)Marks all incoming friend requests as viewed.FriendsDeleteListQuerydeleteList(UserActor actor, int listId)Deletes a friend list of the current user.FriendsEditQueryedit(UserActor actor, int userId)Edits the friend lists of the selected user.FriendsEditListQueryeditList(UserActor actor, int listId)Edits a friend list of the current user.FriendsGetQueryget(ServiceActor actor)Returns a list of user IDs or detailed information about a user's friends.FriendsGetQueryget(UserActor actor)Returns a list of user IDs or detailed information about a user's friends.FriendsGetAppUsersQuerygetAppUsers(UserActor actor)Returns a list of IDs of the current user's friends who installed the application.FriendsGetByPhonesQuerygetByPhones(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.FriendsGetListsQuerygetLists(UserActor actor)Returns a list of the user's friend lists.FriendsGetMutualQuerygetMutual(UserActor actor)Returns a list of user IDs of the mutual friends of two users.FriendsGetMutualQueryWithTargetUidsgetMutualWithTargetUids(UserActor actor, java.lang.Integer... targetUids)Returns a list of user IDs of the mutual friends of two users.FriendsGetOnlineQuerygetOnline(UserActor actor)Returns a list of user IDs of a user's friends who are online.FriendsGetOnlineQueryWithOnlineMobilegetOnlineWithOnlineMobile(UserActor actor, java.lang.Boolean onlineMobile)Returns a list of user IDs of a user's friends who are online.FriendsGetRecentQuerygetRecent(UserActor actor)Returns a list of user IDs of the current user's recently added friends.FriendsGetRequestsQuerygetRequests(UserActor actor)Returns information about the current user's incoming and outgoing friend requests.FriendsGetRequestsQueryWithExtendedgetRequestsExtended(UserActor actor)Returns information about the current user's incoming and outgoing friend requests.FriendsGetRequestsQueryWithNeedMutualgetRequestsWithNeedMutual(UserActor actor, java.lang.Boolean needMutual)Returns information about the current user's incoming and outgoing friend requests.FriendsGetSuggestionsQuerygetSuggestions(UserActor actor)Returns a list of profiles of users whom the current user may know.FriendsGetQueryWithFieldsgetWithFields(ServiceActor actor, Fields... fields)Returns a list of user IDs or detailed information about a user's friends.FriendsGetQueryWithFieldsgetWithFields(UserActor actor, Fields... fields)Returns a list of user IDs or detailed information about a user's friends.FriendsSearchQuerysearch(UserActor actor, int userId)Returns a list of friends matching the search criteria.-
Methods inherited from class com.vk.api.sdk.client.AbstractAction
getClient
-
-
-
-
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 actorname- 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 actoruserIds- 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 actoruserIds- 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 actoruserIds- 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 actoruserIds- 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
-
deleteAllRequests
public FriendsDeleteAllRequestsQuery deleteAllRequests(UserActor actor)
Marks all incoming friend requests as viewed.- 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 actorlistId- 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 actoruserId- 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 actorlistId- 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 actorfields- 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 actorfields- 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 actortargetUids- 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 actoronlineMobile- '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 actorneedMutual- '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 actoruserId- User ID.- Returns:
- query
-
-