Class FriendsNotificationsApi
Represents a collection of functions to interact with the API endpoints
Inherited Members
Namespace: Unity.Services.Apis.Friends
Assembly: Unity.Services.Apis.dll
Syntax
public class FriendsNotificationsApi : IFriendsNotificationsApi, IApiAccessor
Constructors
FriendsNotificationsApi(IApiClient)
Initializes a new instance of the Friends
Declaration
public FriendsNotificationsApi(IApiClient apiClient)
Parameters
Type | Name | Description |
---|---|---|
IApi |
apiClient | The client interface for synchronous API access. |
FriendsNotificationsApi(IApiClient, IApiConfiguration)
Initializes a new instance of the Friends
Declaration
public FriendsNotificationsApi(IApiClient apiClient, IApiConfiguration apiConfiguration)
Parameters
Type | Name | Description |
---|---|---|
IApi |
apiClient | The client interface for synchronous API access. |
IApi |
apiConfiguration | The configuration object. |
Properties
Client
The client for accessing this underlying API asynchronously.
Declaration
public IApiClient Client { get; }
Property Value
Type | Description |
---|---|
IApi |
Configuration
Gets the configuration object
Declaration
public IApiConfiguration Configuration { get; }
Property Value
Type | Description |
---|---|
IApi |
An instance of the Configuration |
Methods
GetBasePath()
Gets the base path of the API client.
Declaration
public string GetBasePath()
Returns
Type | Description |
---|---|
string | The base path |
GetNotificationsAuth(CancellationToken)
Get notification auth details. Retrieves both a subscription token and a channel name that the user should use to subscribe to notifications. The Relationship Service updates the notifications channel as changes to the user's relationships occur. This includes updates to the presence state of any friends, new friend requests (i.e. FRIEND_REQUEST
relationships created), etc. In general, the client should not depend on repeatedly polling the entire list of relationships to monitor for changes, but should instead fetch the entire list once and then register for notifications of any updates. This allows the client to keep the list up to date while minimizing overhead. ## Notification format: TBD - Provide details on the notification format when it is available.
Declaration
public ApiOperation<NotificationAuth> GetNotificationsAuth(CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
Cancellation |
cancellationToken | Cancellation Token to cancel the request. |
Returns
Type | Description |
---|---|
Api |
The operation |