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) |
Add |
addRelationshipRequest | (optional) |
Cancellation |
cancellationToken | Cancellation Token to cancel the request. |
Returns
Type | Description |
---|---|
Api |
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. |
Cancellation |
cancellationToken | Cancellation Token to cancel the request. |
Returns
Type | Description |
---|---|
Api |
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<Relationship |
type | The type of the relationship (optional) |
Cancellation |
cancellationToken | Cancellation Token to cancel the request. |
Returns
Type | Description |
---|---|
Api |
The operation |