Friendship

AV. Friendship

new Friendship()

Source:
Contains functions to deal with Friendship in LeanCloud.

Methods

(static) acceptRequest(options, authOptionsopt) → {Promise.<void>}

Source:
Since:
  • 4.8.0
Accept a friendship request.
Parameters:
Name Type Attributes Description
options AV.Object | string | Object if an AV.Object or string is given, it will be used as the request in _FriendshipRequest.
Properties
Name Type Attributes Description
request AV.Object The request (or it's objectId) to be accepted.
attributes Object <optional>
key-value attributes dictionary to be used as conditions of AV#followeeQuery.
authOptions AuthOptions <optional>
Returns:
Type
Promise.<void>

(static) declineRequest(request, authOptionsopt) → {Promise.<void>}

Source:
Decline a friendship request.
Parameters:
Name Type Attributes Description
request AV.Object | string The request (or it's objectId) to be declined.
authOptions AuthOptions <optional>
Returns:
Type
Promise.<void>

(static) request(options, authOptionsopt) → {Promise.<void>}

Source:
Since:
  • 4.8.0
Request friendship.
Parameters:
Name Type Attributes Description
options String | AV.User | Object if an AV.User or string is given, it will be used as the friend.
Properties
Name Type Attributes Description
friend AV.User | string The friend (or friend's objectId) to follow.
attributes Object <optional>
key-value attributes dictionary to be used as conditions of followeeQuery.
authOptions AuthOptions <optional>
Returns:
Type
Promise.<void>