public interface FriendService
Modifier and Type | Method and Description |
---|---|
InvocationFuture<java.lang.Void> |
ackAddFriendRequest(java.lang.String account,
boolean agree)
Accept or reject a friend request
|
InvocationFuture<java.lang.Void> |
addFriend(AddFriendData data)
Friend request
|
InvocationFuture<java.lang.Void> |
addToBlackList(java.lang.String account)
Add an account to the blacklist
|
InvocationFuture<java.lang.Void> |
deleteFriend(java.lang.String account)
Delete a friend without delete the alias by default
|
InvocationFuture<java.lang.Void> |
deleteFriend(java.lang.String account,
boolean deleteAlias)
Delete a friend and alias.
|
java.util.List<java.lang.String> |
getBlackList()
Get the accounts in the blacklist
|
java.util.List<java.lang.String> |
getFriendAccounts()
Get the accounts of friends
|
Friend |
getFriendByAccount(java.lang.String account)
Get friends by accounts
|
java.util.List<Friend> |
getFriends()
Get the list of friends
|
java.util.List<java.lang.String> |
getMuteList()
Get the accounts whose alert setting is muted
|
boolean |
isInBlackList(java.lang.String account)
Check if the peer account is included in the blacklist
|
boolean |
isMyFriend(java.lang.String account)
Check if the peer account is in the friend list of the current account
|
boolean |
isNeedMessageNotify(java.lang.String account)
Chech if the account needs alert
|
InvocationFuture<java.lang.Void> |
removeFromBlackList(java.lang.String account)
Remove an account from the blacklist
|
InvocationFuture<java.util.List<java.lang.String>> |
searchAccountByAlias(java.lang.String alias)
Search accounts using alias
|
InvocationFuture<java.util.List<Friend>> |
searchFriendsByKeyword(java.lang.String keyword)
Search accounts for friends that match keywords
|
InvocationFuture<java.lang.Void> |
setMessageNotify(java.lang.String account,
boolean notify)
Set notification alert or mute the alert
|
InvocationFuture<java.lang.Void> |
updateFriendFields(java.lang.String friendAccount,
java.util.Map<FriendFieldEnum,java.lang.Object> fields)
Update the friendship
|
InvocationFuture<java.lang.Void> addFriend(AddFriendData data)
data
- Friend request data, such as peer account, request verification type, and added messages.InvocationFuture<java.lang.Void> ackAddFriendRequest(java.lang.String account, boolean agree)
account
- Peer accountagree
- true: accept the friend request; false: reject the friend request.InvocationFuture<java.lang.Void> deleteFriend(java.lang.String account)
account
- The account from which the friendship is disassociatedInvocationFuture<java.lang.Void> deleteFriend(java.lang.String account, boolean deleteAlias)
account
- The account from which the friendship is disassociatedjava.util.List<Friend> getFriends()
java.util.List<java.lang.String> getFriendAccounts()
Friend getFriendByAccount(java.lang.String account)
account
- User accountboolean isMyFriend(java.lang.String account)
account
- Peer accountInvocationFuture<java.lang.Void> updateFriendFields(java.lang.String friendAccount, java.util.Map<FriendFieldEnum,java.lang.Object> fields)
friendAccount
- The friend accountfields
- Fields to be updated. Alias and extension fields are supported.
Note: The alias can contain up to 128 characters. Extension fields require Maps whose key must be String and value is Object. SDK converts maps into JSON string and the maps can contain 256 characters long.InvocationFuture<java.lang.Void> addToBlackList(java.lang.String account)
account
- The account to be removedInvocationFuture<java.lang.Void> removeFromBlackList(java.lang.String account)
account
- The account to be removedboolean isInBlackList(java.lang.String account)
account
- User accountjava.util.List<java.lang.String> getBlackList()
InvocationFuture<java.lang.Void> setMessageNotify(java.lang.String account, boolean notify)
account
- The account for which the alert is setnotify
- Specify whether to alert new notifications. False: mute the alert.boolean isNeedMessageNotify(java.lang.String account)
account
- The account to be removedjava.util.List<java.lang.String> getMuteList()
InvocationFuture<java.util.List<Friend>> searchFriendsByKeyword(java.lang.String keyword)
InvocationFuture<java.util.List<java.lang.String>> searchAccountByAlias(java.lang.String alias)
alias
- The alias