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:
const groupName = "Friend list 1";
const userIDList = ["user1"];
const friendgroups = await friendshipManager.createFriendGroup(
groupName,
userIDList
);
Deleting a friend list
Call the deleteFriendGroup
API (Details) to delete a friend list. Sample code:
const deleteFriendsgroup = await friendshipManager.deleteFriendGroup(["Friend list 1"]);
Renaming a friend list
Call the renameFriendGroup
API (Details) to rename a friend list. Sample code:
const rename = await friendshipManager.renameFriendGroup("New friend list 1", "Friend list 1");
Getting a friend list
Call the getFriendGroups
API (Details) to get a friend list. Sample code:
const friendGrous = await friendshipManager.getFriendGroups(["Friend list 1"]);
Adding a friend to a list
Call the addFriendsToFriendGroup
API (Details) to add a friend to a list. Sample code:
const groupName = ["Friend list 1"];
const userIDList = ["user1"];
const addToFrindgroups = await friendshipManager.addFriendsToFriendGroup(
groupName,
userIDList
);
Removing a friend from a list
Call deleteFriendsFromFriendGroup
(Details) to remove a friend from a list. Sample code:
const groupName = ["Friend list 1"];
const userIDList = ["user1"];
const deletefromFriendsGrousps =
await friendshipManager.deleteFriendsFromFriendGroup(groupName, userIDList);
Was this page helpful?