Friendship
Send, receive friend request, and friend confirmation events.
Friendship
Send, receive friend request, and friend confirmation events.
send request
receive request(in friend event)
confirmation friendship(friend event)
Kind: global class
instance
.accept() ⇒
Promise <void>
.hello() ⇒
string
.contact() ⇒
Contact
.type() ⇒
FriendshipType
static
.add(contact, hello) ⇒
Promise <void>
friendship.accept() ⇒ Promise <void>
Promise <void>
Accept Friend Request
Kind: instance method of Friendship
Example
friendship.hello() ⇒ string
string
Get verify message from
Kind: instance method of Friendship
Example (If request content is `ding`, then accept the friendship)
friendship.contact() ⇒ Contact
Contact
Get the contact from friendship
Kind: instance method of Friendship
Example
friendship.type() ⇒ FriendshipType
FriendshipType
Return the Friendship Type
Tips: FriendshipType is enum here. </br>
FriendshipType.Unknown
FriendshipType.Confirm
FriendshipType.Receive
FriendshipType.Verify
Kind: instance method of Friendship
Example (If request content is `ding`, then accept the friendship)
Friendship.send()
Deprecated
use Friendship#add instead
Kind: static method of Friendship
Friendship.add(contact, hello) ⇒ Promise <void>
Promise <void>
Send a Friend Request to a contact
with message hello
.
The best practice is to send friend request once per minute. Remeber not to do this too frequently, or your account may be blocked.
Kind: static method of Friendship
Example
Last updated