Interface IFriendsRelationshipsApi
Represents a collection of functions to interact with the API endpoints
Namespace: Unity.Services.Apis.Friends
Assembly: Unity.Services.Apis.dll
Syntax
public interface IFriendsRelationshipsApi : IApiAccessor
Methods
CreateRelationship(bool?, bool?, AddRelationshipRequest, CancellationToken)
Create a new relationship.
Declaration
ApiOperation<Relationship> CreateRelationship(bool? withPresence = null, bool? withProfile = null, AddRelationshipRequest addRelationshipRequest = null, CancellationToken cancellationToken = default)
Parameters
| Type | Name | Description |
|---|---|---|
| bool? | withPresence | Whether the response should return presence data. (optional, default to true) |
| bool? | withProfile | Whether the response should return profiles data. (optional, default to true) |
| AddRelationshipRequest | addRelationshipRequest | (optional) |
| CancellationToken | cancellationToken | Cancellation Token to cancel the request. |
Returns
| Type | Description |
|---|---|
| ApiOperation<Relationship> | The operation |
DeleteRelationship(string, CancellationToken)
Delete a relationship.
Declaration
ApiOperation DeleteRelationship(string relationshipId, CancellationToken cancellationToken = default)
Parameters
| Type | Name | Description |
|---|---|---|
| string | relationshipId | The relationship ID. |
| CancellationToken | cancellationToken | Cancellation Token to cancel the request. |
Returns
| Type | Description |
|---|---|
| ApiOperation | The operation |
GetRelationships(int?, int?, bool?, bool?, List<RelationshipType>, CancellationToken)
Retrieve a list of relationships.
Declaration
ApiOperation<List<Relationship>> GetRelationships(int? limit = null, int? offset = null, bool? withPresence = null, bool? withProfile = null, List<RelationshipType> type = null, CancellationToken cancellationToken = default)
Parameters
| Type | Name | Description |
|---|---|---|
| int? | limit | Maximum records to return per pagination. The default value is 25. (optional, default to 25) |
| int? | offset | Maximum offset for pagination. The default value is 0. (optional, default to 0) |
| bool? | withPresence | Whether the response should return presence data. (optional, default to true) |
| bool? | withProfile | Whether the response should return profiles data. (optional, default to true) |
| List<RelationshipType> | type | The type of the relationship (optional) |
| CancellationToken | cancellationToken | Cancellation Token to cancel the request. |
Returns
| Type | Description |
|---|---|
| ApiOperation<List<Relationship>> | The operation |