Class UGCSubscriptionApi
Represents a collection of functions to interact with the API endpoints
Inherited Members
Namespace: Unity.Services.Apis.UGC
Assembly: solution.dll
Syntax
public class UGCSubscriptionApi : IUGCSubscriptionApi, IApiAccessor
Constructors
UGCSubscriptionApi(IApiClient)
Initializes a new instance of the UGCSubscription
Declaration
public UGCSubscriptionApi(IApiClient apiClient)
Parameters
Type | Name | Description |
---|---|---|
IApi |
apiClient | The client interface for synchronous API access. |
UGCSubscriptionApi(IApiClient, IApiConfiguration)
Initializes a new instance of the UGCSubscription
Declaration
public UGCSubscriptionApi(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
CreateSubscription(NewSubscriptionRequest, CancellationToken)
Create a new subscription
Declaration
public ApiOperation<SubscriptionDTO> CreateSubscription(NewSubscriptionRequest newSubscriptionRequest = null, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
New |
newSubscriptionRequest | The content identifier for the current user to subscribe to (optional) |
Cancellation |
cancellationToken | Cancellation Token to cancel the request. |
Returns
Type | Description |
---|---|
Api |
The operation |
DeleteSubscription(string, string, string, CancellationToken)
Deletes a subscription from the current user
Declaration
public ApiOperation DeleteSubscription(string projectId, string environmentId, string contentId, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
string | projectId | The content's project id |
string | environmentId | The content's environment id |
string | contentId | The content's id |
Cancellation |
cancellationToken | Cancellation Token to cancel the request. |
Returns
Type | Description |
---|---|
Api |
The operation |
GetBasePath()
Gets the base path of the API client.
Declaration
public string GetBasePath()
Returns
Type | Description |
---|---|
string | The base path |
GetSubscription(string, string, string, CancellationToken)
Check if a certain piece of content is subscribed by the current user
Declaration
public ApiOperation<SubscriptionDTO> GetSubscription(string projectId, string environmentId, string contentId, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
string | projectId | The content's project id |
string | environmentId | The content's environment id |
string | contentId | The content's id |
Cancellation |
cancellationToken | Cancellation Token to cancel the request. |
Returns
Type | Description |
---|---|
Api |
The operation |
SearchSubscriptions(int?, int?, List<string>, string, List<string>, bool?, CancellationToken)
Search the current users subscriptions
Declaration
public ApiOperation<SubscriptionDTOPagedResult> SearchSubscriptions(int? offset = null, int? limit = null, List<string> sortBys = null, string search = null, List<string> filters = null, bool? includeTotal = null, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
int? | offset | The amount of results to skip (optional) |
int? | limit | The amount of results to take (optional) |
List<string> | sortBys | The fields to use to sort by in order, prefix - for descending (optional) |
string | search | Only return results with this search term in their name (optional) |
List<string> | filters | You can filter on any field in the DTO<br /> Syntax for filters is: {field},{operator},{value}<br /> The operators are: eq (equal to), neq (not equal to), gt (greater than), gte (greater than or equal), lt (less than), lte (less than or equal)<br /> The field can be nested up to two levels. Ex: "field.nestedField.nestedNestedField"<br /> filters="deletedAt,eq,null" will only return entities that have not been deleted<br /> (optional) |
bool? | includeTotal | Should the result include the total count of objects available to page (optional) |
Cancellation |
cancellationToken | Cancellation Token to cancel the request. |
Returns
Type | Description |
---|---|
Api |
The operation |