Overview
TheNTQQFriendApi class provides methods for managing friend lists, handling friend requests, and performing friend-related operations.
Friend List
getBuddy
Get the complete friend list.FriendV2[]
Array of friend objects with detailed information
getBuddyV2SimpleInfoMap
Get friend list as a map of UID to user info.Map<string, FriendV2>
Map with UID as key and friend info as value
getBuddyIdMap
Get a map of UIN to UID for friends.LimitedHashTable<string, string>
Hash table mapping UIN to UID
getBuddyV2ExWithCate
Get friend list with category information.Array<CategoryInfo>
Array of friend categories with their members
Friend Management
isBuddy
Check if a user is a friend.string
required
User UID to check
boolean
true if user is a friend, false otherwise
setBuddyRemark
Set remark/note for a friend.string
required
Friend UID
string
required
New remark text
delBuddy
Delete a friend.string
required
Friend UID to delete
boolean
default:"false"
Whether to temporarily block the user
boolean
default:"false"
Whether to delete from both sides
Friend Requests
getBuddyReq
Get list of pending friend requests.FriendRequest[]
Array of friend request objects
handleFriendRequest
Approve or reject a friend request.FriendRequest
required
Friend request object from getBuddyReq()
boolean
required
true to accept, false to reject
clearBuddyReqUnreadCnt
Clear unread count for friend requests.Doubt Friend Requests
“Doubt” friend requests are requests that need additional verification.getDoubtFriendRequest
Get list of doubt friend requests.number
required
Number of requests to retrieve
Array<DoubtRequest>
Array of doubt friend request objects
handleDoubtFriendRequest
Handle a doubt friend request.string
required
Friend UID from doubt request
string
default:"''"
Additional parameter 1
string
default:"''"
Additional parameter 2
Complete Example
Here’s a complete example of handling friend requests:Notes
- Friend operations may require appropriate permissions
- UIDs and UINs are different identifiers - use conversion methods from UserApi if needed
- Friend requests have expiration times and may become invalid
- Some operations may have rate limits imposed by QQ servers
