Friendship Plugins Functions
Get Users Friends
Retrieves a list of friendships for the current user based on the provided parameters.
- Unity3D
- API
- TypeScript
var friends = await ServiceHub.Services.Friendship.GetMyFriends(new GetMyFriendsParams
{
Skip = 0,
Limit = 0
});
curl --location 'https://link.dynamicpixels.dev/game/[CLIENT_ID]/api/table/services/friendship?skip=[SKIP]&limit=[LIMIT]' \
--header 'Authorization: Bearer [TOKEN FROM AUTH LEVEL]
DynamicPixels.Services.Friendship.GetMyFriends(input: GetMyFriendsParams): Promise<Friendship[]>
Get Users Friends Requests
Retrieves a list of friendship requests received by the current user based on the provided parameters.
- Unity3D
- API
- TypeScript
var requests = await ServiceHub.Services.Friendship.GetMyFriendshipRequests(
new GetMyFriendshipRequestsParams
{
Skip = 0,
Limit = 0
});
curl --location 'https://link.dynamicpixels.dev/game/[CLIENT_ID]/api/table/services/friendship/request?skip=[SKIP]&limit=[LIMIT]' \
--header 'Authorization: Bearer [TOKEN FROM AUTH LEVEL]
DynamicPixels.Services.Friendship.GetMyFriendshipRequests(input: GetMyFriendshipRequestParams): Promise<object[]>
Get Users Friends Requesting
Retrieves a list of friendship requesting sent by the current user based on the provided parameters.
- Unity3D
- API
- TypeScript
var requestings = await ServiceHub.Services.Friendship.GetMyFriendshipRequesting(
new GetMyFriendshipRequestingParams
{
Skip = 0,
Limit = 0
});
curl --location 'https://link.dynamicpixels.dev/game/[CLIENT_ID]/api/table/services/friendship/requesting?skip=[SKIP]&limit=[LIMIT]' \
--header 'Authorization: Bearer [TOKEN FROM AUTH LEVEL]
DynamicPixels.Services.Friendship.GetMyFriendshipRequesting(input: GetMyFriendshipRequestParams): Promise<object[]>
Request Friendship
Sends a friendship request to another user based on the provided parameters.
- Unity3D
- API
- TypeScript
var requests = await ServiceHub.Services.Friendship.RequestFriendship(new RequestFriendshipParams
{
UserId = 0
});
curl --location 'https://link.dynamicpixels.dev/game/[CLIENT_ID]/api/table/services/friendship/request?skip=[SKIP]&limit=[LIMIT]' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer [TOKEN FROM AUTH LEVEL]
--data '{
"target_user_id": [USER ID]
}'
DynamicPixels.Services.Friendship.RequestFriendship(input: RequestFriendshipParams): Promise<object>
Accept a Request
Accepts a friendship request based on the provided parameters.
- Unity3D
- API
- TypeScript
var requests = await ServiceHub.Services.Friendship.AcceptRequest(new AcceptRequestParams
{
UserId = 0
});
curl --location --request POST 'https://link.dynamicpixels.dev/game/[CLIENT_ID]/api/table/services/friendship/request/[USER ID]' \
--header 'Authorization: Bearer [TOKEN FROM AUTH LEVEL]
DynamicPixels.Services.Friendship.AcceptRequest(input: AcceptRequestParams): Promise<object>
Reject a Request
Rejects a friendship request based on the provided parameters.
- Unity3D
- API
- TypeScript
var requests = await ServiceHub.Services.Friendship.RejectRequest(new RejectRequestParams
{
UserId = 0
});
curl --location --request DELETE 'https://link.dynamicpixels.dev/game/[CLIENT_ID]/api/table/services/friendship/request/[USER ID]' \
--header 'Authorization: Bearer [TOKEN FROM AUTH LEVEL]
DynamicPixels.Services.Friendship.RejectRequest(input: RejectRequestParams): Promise<object>
Reject All Requests
Rejects all pending friendship requests based on the provided parameters.
- Unity3D
- API
- TypeScript
var requests = await ServiceHub.Services.Friendship.RejectAllRequests(new RejectAllRequestsParams());
curl --location --request DELETE 'https://link.dynamicpixels.dev/game/[CLIENT_ID]/api/table/services/friendship/request' \
--header 'Authorization: Bearer [TOKEN FROM AUTH LEVEL]
DynamicPixels.Services.Friendship.RejectAllRequests(): void
Delete a Friend
Deletes a friendship with a specified user based on the provided parameters.
- Unity3D
- API
- TypeScript
await ServiceHub.Services.Friendship.DeleteFriend(new DeleteParams()
curl --location --request DELETE 'https://link.dynamicpixels.dev/game/[CLIENT_ID]/api/table/services/friendship/[USER ID]' \
--header 'Authorization: Bearer [TOKEN FROM AUTH LEVEL]
DynamicPixels.Services.Friendship.DeleteFriend(input: RequestFriendshipParams): Promise<boolean>