Interface IUgcClient
Namespace: Unity.Services.Ugc.Bridge
Assembly: Unity.Services.Ugc.Bridge.Editor.dll
Syntax
public interface IUgcClient
Methods
ApproveContentAsync(string)
Approve content that needed moderation.
Declaration
Task<Content> ApproveContentAsync(string contentId)
Parameters
| Type | Name | Description |
|---|---|---|
| string | contentId | The content identifier |
Returns
| Type | Description |
|---|---|
| Task<Content> | The approved content |
CreateContentAsync(CreateContentArgs)
Create a new content in a project environment
Declaration
Task<Content> CreateContentAsync(CreateContentArgs createContentArgs)
Parameters
| Type | Name | Description |
|---|---|---|
| CreateContentArgs | createContentArgs | Contains all the parameters of the request |
Returns
| Type | Description |
|---|---|
| Task<Content> | The content that will be eventually available once the upload has been uploaded. |
CreateContentVersionAsync(string, Stream, Stream)
Create a new version of a content.
Declaration
Task<Content> CreateContentVersionAsync(string contentId, Stream asset, Stream thumbnail = null)
Parameters
| Type | Name | Description |
|---|---|---|
| string | contentId | The content identifier |
| Stream | asset | The stream containing the binary payload of the content |
| Stream | thumbnail | The stream containing the image representing the content |
Returns
| Type | Description |
|---|---|
| Task<Content> | The content that will be eventually available once the upload has been uploaded. |
CreateRepresentationAsync(CreateRepresentationArgs)
Create a new representation of a content
Declaration
Task<Representation> CreateRepresentationAsync(CreateRepresentationArgs createRepresentationArgs)
Parameters
| Type | Name | Description |
|---|---|---|
| CreateRepresentationArgs | createRepresentationArgs | Contains all the parameters of the request |
Returns
| Type | Description |
|---|---|
| Task<Representation> | The created representation |
CreateRepresentationVersionAsync(string, string, Stream)
Create a representation version.
Declaration
Task<RepresentationVersion> CreateRepresentationVersionAsync(string contentId, string representationId, Stream asset)
Parameters
| Type | Name | Description |
|---|---|---|
| string | contentId | The content identifier |
| string | representationId | The representation identifier |
| Stream | asset | The stream containing the binary payload of the representation version |
Returns
| Type | Description |
|---|---|
| Task<RepresentationVersion> | The representation. |
CreateSubscriptionAsync(string)
Subscribe to the content for the current user
Declaration
Task<Subscription> CreateSubscriptionAsync(string contentId)
Parameters
| Type | Name | Description |
|---|---|---|
| string | contentId | The content identifier |
Returns
| Type | Description |
|---|---|
| Task<Subscription> | The created subscription |
DeleteContentAsync(string)
Delete a content
Declaration
Task DeleteContentAsync(string contentId)
Parameters
| Type | Name | Description |
|---|---|---|
| string | contentId | The content identifier |
Returns
| Type | Description |
|---|---|
| Task | A task |
DeleteRepresentationAsync(DeleteRepresentationArgs)
Delete representation
Declaration
Task DeleteRepresentationAsync(DeleteRepresentationArgs deleteRepresentationArgs)
Parameters
| Type | Name | Description |
|---|---|---|
| DeleteRepresentationArgs | deleteRepresentationArgs | The id of the representation to delete |
Returns
| Type | Description |
|---|---|
| Task | A task |
DeleteSubscriptionAsync(string)
Unsubscribe to the content for the current user
Declaration
Task DeleteSubscriptionAsync(string contentId)
Parameters
| Type | Name | Description |
|---|---|---|
| string | contentId | The content identifier |
Returns
| Type | Description |
|---|---|
| Task | A task |
DownloadContentDataAsync(Content, bool, bool)
Download data and/or thumbnail of a content
Declaration
Task DownloadContentDataAsync(Content content, bool downloadContent, bool downloadThumbnail)
Parameters
| Type | Name | Description |
|---|---|---|
| Content | content | The content that will have its data downloaded |
| bool | downloadContent | True if we want to download the content's data |
| bool | downloadThumbnail | True if we want to download the content's thumbnail |
Returns
| Type | Description |
|---|---|
| Task | The downloaded data will be put in the |
GetContentAsync(GetContentArgs)
Get a specific content.
Declaration
Task<Content> GetContentAsync(GetContentArgs getContentArgs)
Parameters
| Type | Name | Description |
|---|---|---|
| GetContentArgs | getContentArgs | Contains all the parameters of the request |
Returns
| Type | Description |
|---|---|
| Task<Content> | The requested content |
GetContentTrendsAsync(GetContentTrendsArgs)
Get content by ContentTrendType
Declaration
Task<PagedResults<Content>> GetContentTrendsAsync(GetContentTrendsArgs getContentTrendsArgs = null)
Parameters
| Type | Name | Description |
|---|---|---|
| GetContentTrendsArgs | getContentTrendsArgs | The details of the search request |
Returns
| Type | Description |
|---|---|
| Task<PagedResults<Content>> | A list of contents of this trend type, with pagination information |
GetContentVersionsAsync(GetContentVersionsArgs)
Get content versions of a content.
Declaration
Task<PagedResults<ContentVersion>> GetContentVersionsAsync(GetContentVersionsArgs getContentVersionsArgs)
Parameters
| Type | Name | Description |
|---|---|---|
| GetContentVersionsArgs | getContentVersionsArgs | Contains all the parameters of the request |
Returns
| Type | Description |
|---|---|
| Task<PagedResults<ContentVersion>> | The list of versions associated with the content with pagination information |
GetContentsAsync(GetContentsArgs)
Get all content from a project specific environment. Content with visibility set to Hidden or with ModerationStatus different from Approved won't be returned. Deleted contents and ones that haven't finished uploading won't be returned either.
Declaration
Task<PagedResults<Content>> GetContentsAsync(GetContentsArgs getContentsArgs = null)
Parameters
| Type | Name | Description |
|---|---|---|
| GetContentsArgs | getContentsArgs | The details of the search request |
Returns
| Type | Description |
|---|---|
| Task<PagedResults<Content>> | A list of contents from the environment with pagination information |
GetPlayerContentsAsync(GetPlayerContentsArgs)
Get all content created by the current signed in player
Declaration
Task<PagedResults<Content>> GetPlayerContentsAsync(GetPlayerContentsArgs getPlayerContentsArgs = null)
Parameters
| Type | Name | Description |
|---|---|---|
| GetPlayerContentsArgs | getPlayerContentsArgs | The details of the search request |
Returns
| Type | Description |
|---|---|
| Task<PagedResults<Content>> | A list of contents from the environment with pagination information |
GetProjectAsync()
Declaration
Task<Project> GetProjectAsync()
Returns
| Type | Description |
|---|---|
| Task<Project> |
GetProjectEnvironmentsAsync()
Declaration
Task<List<Environment>> GetProjectEnvironmentsAsync()
Returns
| Type | Description |
|---|---|
| Task<List<Environment>> |
GetRepresentationAsync(GetRepresentationArgs)
Get a specific representation of a content
Declaration
Task<Representation> GetRepresentationAsync(GetRepresentationArgs getRepresentationArgs)
Parameters
| Type | Name | Description |
|---|---|---|
| GetRepresentationArgs | getRepresentationArgs | Contains all the parameters of the request |
Returns
| Type | Description |
|---|---|
| Task<Representation> | The representation |
GetRepresentationVersionsAsync(GetRepresentationVersionsArgs)
Get versions of a representation
Declaration
Task<PagedResults<RepresentationVersion>> GetRepresentationVersionsAsync(GetRepresentationVersionsArgs getRepresentationVersionsArgs)
Parameters
| Type | Name | Description |
|---|---|---|
| GetRepresentationVersionsArgs | getRepresentationVersionsArgs | The details of the search request |
Returns
| Type | Description |
|---|---|
| Task<PagedResults<RepresentationVersion>> | A list of versions of a specific representation with pagination information |
GetRepresentationsAsync(GetRepresentationsArgs)
Get representations of a content
Declaration
Task<PagedResults<Representation>> GetRepresentationsAsync(GetRepresentationsArgs getRepresentationsArgs)
Parameters
| Type | Name | Description |
|---|---|---|
| GetRepresentationsArgs | getRepresentationsArgs | The details of the search request |
Returns
| Type | Description |
|---|---|
| Task<PagedResults<Representation>> | A list of representations of specific content with pagination information |
GetSubscriptionsAsync(GetSubscriptionsArgs)
Get all subscriptions of the current user
Declaration
Task<PagedResults<Subscription>> GetSubscriptionsAsync(GetSubscriptionsArgs getSubscriptionsArgs)
Parameters
| Type | Name | Description |
|---|---|---|
| GetSubscriptionsArgs | getSubscriptionsArgs | The details of the search request |
Returns
| Type | Description |
|---|---|
| Task<PagedResults<Subscription>> | A list of subscriptions of the current user with pagination information |
GetTagsAsync()
Get a list of tags associated with the project
Declaration
Task<List<Tag>> GetTagsAsync()
Returns
| Type | Description |
|---|---|
| Task<List<Tag>> | A list of tags |
GetUserContentRatingAsync(string)
Get the rating of a content.
Declaration
Task<ContentUserRating> GetUserContentRatingAsync(string contentId)
Parameters
| Type | Name | Description |
|---|---|---|
| string | contentId | The content identifier |
Returns
| Type | Description |
|---|---|
| Task<ContentUserRating> | The rating of the content |
IsSubscribedToAsync(string)
Check if the current user is subscribed to the content
Declaration
Task<bool> IsSubscribedToAsync(string contentId)
Parameters
| Type | Name | Description |
|---|---|---|
| string | contentId | The content identifier |
Returns
| Type | Description |
|---|---|
| Task<bool> | true if the content is subscribed to, false otherwise |
RejectContentAsync(string)
Reject content that needed moderation.
Declaration
Task<Content> RejectContentAsync(string contentId)
Parameters
| Type | Name | Description |
|---|---|---|
| string | contentId | The content identifier |
Returns
| Type | Description |
|---|---|
| Task<Content> | The rejected content |
ReportContentAsync(ReportContentArgs)
Report a content
Declaration
Task<Content> ReportContentAsync(ReportContentArgs reportContentArgs)
Parameters
| Type | Name | Description |
|---|---|---|
| ReportContentArgs | reportContentArgs | The details of the report request |
Returns
| Type | Description |
|---|---|
| Task<Content> | The reported content |
SearchContentModerationAsync(SearchContentModerationArgs)
Search for content that needs moderation in the project.
Declaration
Task<PagedResults<Content>> SearchContentModerationAsync(SearchContentModerationArgs searchContentModerationArgs)
Parameters
| Type | Name | Description |
|---|---|---|
| SearchContentModerationArgs | searchContentModerationArgs | The details of the search request |
Returns
| Type | Description |
|---|---|
| Task<PagedResults<Content>> | A list of contents requiring moderation with pagination information |
SearchRepresentationsAsync(SearchRepresentationsArgs)
Search representations within a project
Declaration
Task<PagedResults<Representation>> SearchRepresentationsAsync(SearchRepresentationsArgs searchRepresentationsArgs)
Parameters
| Type | Name | Description |
|---|---|---|
| SearchRepresentationsArgs | searchRepresentationsArgs | The details of the search request |
Returns
| Type | Description |
|---|---|
| Task<PagedResults<Representation>> | A list of representations within a project with pagination information |
SubmitUserContentRatingAsync(string, float)
Submit a user rating of a content
Declaration
Task<ContentUserRating> SubmitUserContentRatingAsync(string contentId, float rating)
Parameters
| Type | Name | Description |
|---|---|---|
| string | contentId | The content identifier |
| float | rating | The rating value |
Returns
| Type | Description |
|---|---|
| Task<ContentUserRating> | The rating |
UpdateContentDetailsAsync(UpdateContentDetailsArgs)
Update a specific content details.
Declaration
Task<Content> UpdateContentDetailsAsync(UpdateContentDetailsArgs updateContentDetailsArgs)
Parameters
| Type | Name | Description |
|---|---|---|
| UpdateContentDetailsArgs | updateContentDetailsArgs | The details of the update request |
Returns
| Type | Description |
|---|---|
| Task<Content> | The updated content |
UpdateRepresentationAsync(UpdateRepresentationArgs)
Update a specific representation.
Declaration
Task<Representation> UpdateRepresentationAsync(UpdateRepresentationArgs updateRepresentationArgs)
Parameters
| Type | Name | Description |
|---|---|---|
| UpdateRepresentationArgs | updateRepresentationArgs | The details of the update request |
Returns
| Type | Description |
|---|---|
| Task<Representation> | The updated representation |