Friendship
API References for Friendship Service
Explore the list of API functions available in Unity for friendship service, including detailed descriptions and usage examples.
To use service functions, first ensure that the service is activated before. You can see services by opening "Service Hub" From the game's dashboard header.
Get Users Friends
Retrieves a list of friendships for the current user based on the provided parameters.
var friends = await ServiceHub.Services.Friendship.GetMyFriends(new GetMyFriendsParams
{
Skip = 0,
Limit = 0
});
Get Users Friends Requests
Retrieves a list of friendship requests received by the current user based on the provided parameters.
var requests = await ServiceHub.Services.Friendship.GetMyFriendshipRequests(
new GetMyFriendshipRequestsParams
{
Skip = 0,
Limit = 0
});
Get User's Friends Requesting
Retrieves a list of friendship requesting sent by the current user based on the provided parameters.
var requestings = await ServiceHub.Services.Friendship.GetMyFriendshipRequesting(
new GetMyFriendshipRequestingParams
{
Skip = 0,
Limit = 0
});
Request Friendship
Sends a friendship request to another user based on the provided parameters.
var requests = await ServiceHub.Services.Friendship.RequestFriendship(new RequestFriendshipParams
{
UserId = 0
});
Accept a Request
Accepts a friendship request based on the provided parameters.
var requests = await ServiceHub.Services.Friendship.AcceptRequest(new AcceptRequestParams
{
UserId = 0
});
Reject a Request
Rejects a friendship request based on the provided parameters.
var requests = await ServiceHub.Services.Friendship.RejectRequest(new RejectRequestParams
{
UserId = 0
});
Reject All Requests
Rejects all pending friendship requests based on the provided parameters.
var requests = await ServiceHub.Services.Friendship.RejectAllRequests(new RejectAllRequestsParams());
Delete a Friend
Deletes a friendship with a specified user based on the provided parameters.
await ServiceHub.Services.Friendship.DeleteFriend(new DeleteParams()
Last updated