tencent cloud


Last updated: 2024-02-06 18:08:20

    Feature Description

    To group friends into categories such as "Classmates at university" and "Coworkers", call the following APIs.

    Friend List

    Creating a friend list

    Call the createFriendGroup API (Details) to create a friend list.
    Sample code:
    // Create a friend list and add a friend to the list
    V2TimValueCallback<List<V2TimFriendOperationResult>> friendgroups = await friendshipManager.createFriendGroup(groupName: "Friend list 1",userIDList: ['user1']);

    Deleting a friend list

    Call the deleteFriendGroup API (Details) to delete a friend list.
    Sample code:
    // Delete a friend list
    V2TimCallback deleteFriendsgroup = await friendshipManager.deleteFriendGroup(groupNameList: ['Friend list 1']);

    Renaming a friend list

    Call the renameFriendGroup API (Details) to rename a friend list.
    Sample code:
    // Rename a friend list
    V2TimCallback rename = await friendshipManager.renameFriendGroup(newName: "New friend list 1",oldName: 'Friend list 1');

    Getting a friend list

    Call the getFriendGroups API (Details) to get a friend list.
    Sample code:
    // Get the information of a friend list by list name
    V2TimValueCallback<List<V2TimFriendGroup>> friendGrous = await friendshipManager.getFriendGroups(groupNameList: ['Friend list 1']);

    Adding a friend to a list

    Call the addFriendsToFriendGroup API (Details) to add a friend to a list.
    Sample code:
    // Add a friend to a friend list
    V2TimValueCallback<List<V2TimFriendOperationResult>> addToFrindgroups = await friendshipManager.addFriendsToFriendGroup(groupName: "Friend list 1",userIDList: ['user1']);

    Removing a friend from a list

    Call deleteFriendsFromFriendGroup (Details) to remove a friend from a list.
    Sample code:
    // Remove a friend from a list
    V2TimValueCallback<List<V2TimFriendOperationResult>> deletefromFriendsGrousps = await friendshipManager.deleteFriendsFromFriendGroup(groupName: "Friend list 1", userIDList: ['user1']);
    Contact Us

    Contact our sales team or business advisors to help your business.

    Technical Support

    Open a ticket if you're looking for further assistance. Our Ticket is 7x24 avaliable.

    7x24 Phone Support