Interface IUGCContentApi
Represents a collection of functions to interact with the API endpoints
Namespace: Unity.Services.Apis.UGC
Assembly: solution.dll
Syntax
public interface IUGCContentApi : IApiAccessor
Methods
CreateContent(string, string, NewContentRequest, CancellationToken)
Create new content item
Declaration
ApiOperation<UploadContentResponse> CreateContent(string projectId, string environmentId, NewContentRequest newContentRequest = null, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
string | projectId | Project that this content belongs to |
string | environmentId | Environment that this content belongs to |
New |
newContentRequest | Request information for content (optional) |
Cancellation |
cancellationToken | Cancellation Token to cancel the request. |
Returns
Type | Description |
---|---|
Api |
The operation |
CreateContentVersion(string, string, string, AddVersionRequest, CancellationToken)
Creates a new version of the content item asset and image
Declaration
ApiOperation<UploadContentResponse> CreateContentVersion(string projectId, string environmentId, string contentId, AddVersionRequest addVersionRequest = null, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
string | projectId | Project that this content belongs to |
string | environmentId | Environment that this content belongs to |
string | contentId | Content id |
Add |
addVersionRequest | The AddVersionRequest request sent by the client (optional) |
Cancellation |
cancellationToken | Cancellation Token to cancel the request. |
Returns
Type | Description |
---|---|
Api |
The operation |
CreateUserRating(string, string, string, ContentRatingRequest, CancellationToken)
Add a new user rating for content
Declaration
ApiOperation<ContentUserRatingDTO> CreateUserRating(string projectId, string environmentId, string contentId, ContentRatingRequest contentRatingRequest = null, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
string | projectId | Project that this content belongs to |
string | environmentId | Environment that this content belongs to |
string | contentId | Content id |
Content |
contentRatingRequest | Request information for content rating (optional) |
Cancellation |
cancellationToken | Cancellation Token to cancel the request. |
Returns
Type | Description |
---|---|
Api |
The operation |
DeleteContent(string, string, string, CancellationToken)
Soft delete a content item
Declaration
ApiOperation DeleteContent(string projectId, string environmentId, string contentId, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
string | projectId | Project that this content belongs to |
string | environmentId | Environment that this content belongs to |
string | contentId | Content id |
Cancellation |
cancellationToken | Cancellation Token to cancel the request. |
Returns
Type | Description |
---|---|
Api |
The operation |
GetContent(string, string, string, bool?, CancellationToken)
Get details about a content item
Declaration
ApiOperation<ContentDTO> GetContent(string projectId, string environmentId, string contentId, bool? includeStatistics = null, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
string | projectId | Project that this content belongs to |
string | environmentId | Environment that this content belongs to |
string | contentId | Content id |
bool? | includeStatistics | If content stats should be included in the query (optional, default to false) |
Cancellation |
cancellationToken | Cancellation Token to cancel the request. |
Returns
Type | Description |
---|---|
Api |
The operation |
GetContentDownloads(string, string, string, CancellationToken)
Get content statistics
Declaration
ApiOperation<ContentDownloadStats> GetContentDownloads(string projectId, string environmentId, string contentId, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
string | projectId | Project that this content belongs to |
string | environmentId | Environment that this content belongs to |
string | contentId | Content id |
Cancellation |
cancellationToken | Cancellation Token to cancel the request. |
Returns
Type | Description |
---|---|
Api |
The operation |
GetContentTrendsList(string, string, string, int?, int?, string, bool?, CancellationToken)
Get content trends
Declaration
ApiOperation<ContentDTOPagedResult> GetContentTrendsList(string projectId, string environmentId, string trendType, int? offset = null, int? limit = null, string sortBy = null, bool? includeTotal = null, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
string | projectId | Project to query content trends |
string | environmentId | Environment to query content trends |
string | trendType | Trend type: TopRated, MostDownloaded, Newest, Popular, Trending, Engaging |
int? | offset | The amount of results to skip (optional) |
int? | limit | The amount of results to take (optional) |
string | sortBy | The field to use to sort by in order, prefix - for descending (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 |
GetUserRating(string, string, string, CancellationToken)
Get content rating for user
Declaration
ApiOperation<ContentUserRatingDTO> GetUserRating(string projectId, string environmentId, string contentId, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
string | projectId | Project that this content belongs to |
string | environmentId | Environment that this content belongs to |
string | contentId | Content id |
Cancellation |
cancellationToken | Cancellation Token to cancel the request. |
Returns
Type | Description |
---|---|
Api |
The operation |
SearchContent(string, string, int?, int?, List<string>, string, List<string>, List<string>, bool?, bool?, CancellationToken)
Search all content items in a given project and environment
Declaration
ApiOperation<ContentDTOPagedResult> SearchContent(string projectId, string environmentId, int? offset = null, int? limit = null, List<string> sortBys = null, string search = null, List<string> tags = null, List<string> filters = null, bool? includeTotal = null, bool? includeStatistics = null, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
string | projectId | Content that belongs to this project |
string | environmentId | Content that belongs to this environment |
int? | offset | The amount of results to skip (optional) |
int? | limit | The amount of results to take (optional) |
List<string> | sortBys | The field to use to sort by in ascending order, prefix - for descending (optional) |
string | search | Only return results with this search term in their name (optional) |
List<string> | tags | Only return results with these tags (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) |
bool? | includeStatistics | If content stats should be included in the content DTO (optional, default to false) |
Cancellation |
cancellationToken | Cancellation Token to cancel the request. |
Returns
Type | Description |
---|---|
Api |
The operation |
SearchPlayerContent(int?, int?, List<string>, string, List<string>, bool?, bool?, CancellationToken)
Search all player content items
Declaration
ApiOperation<ContentDTOPagedResult> SearchPlayerContent(int? offset = null, int? limit = null, List<string> sortBys = null, string search = null, List<string> filters = null, bool? includeTotal = null, bool? includeStatistics = 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 field to use to sort by in ascending 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) |
bool? | includeStatistics | If content stats should be included in the content DTO (optional, default to false) |
Cancellation |
cancellationToken | Cancellation Token to cancel the request. |
Returns
Type | Description |
---|---|
Api |
The operation |
UpdateContentVisibility(string, string, string, UpdateContentVisibilityRequest, CancellationToken)
Update content visibility
Declaration
ApiOperation<ContentDTO> UpdateContentVisibility(string projectId, string environmentId, string contentId, UpdateContentVisibilityRequest updateContentVisibilityRequest = null, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
string | projectId | Project that this content belongs to |
string | environmentId | Environment that this content belongs to |
string | contentId | Content id |
Update |
updateContentVisibilityRequest | Request information for content (optional) |
Cancellation |
cancellationToken | Cancellation Token to cancel the request. |
Returns
Type | Description |
---|---|
Api |
The operation |
UpdateDetails(string, string, string, UpdateContentRequest, CancellationToken)
Update details about a content item
Declaration
ApiOperation<ContentDTO> UpdateDetails(string projectId, string environmentId, string contentId, UpdateContentRequest updateContentRequest = null, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
string | projectId | Project that this content belongs to |
string | environmentId | Environment that this content belongs to |
string | contentId | Content id |
Update |
updateContentRequest | Request information for content (optional) |
Cancellation |
cancellationToken | Cancellation Token to cancel the request. |
Returns
Type | Description |
---|---|
Api |
The operation |