Interface ILabelsApiClient<TContent>
Interface for listing or updating labels of content items.
Namespace: Tableau.Migration.Api.Labels
Assembly: Tableau.Migration.dll
Syntax
public interface ILabelsApiClient<TContent> where TContent : IContentReference, IWithLabels
Type Parameters
Name | Description |
---|---|
TContent |
Methods
GetLabelsAsync(Guid, CancellationToken, IEnumerable<string>?)
Get the labels for the content item.
Declaration
Task<IResult<ImmutableList<ILabel>>> GetLabelsAsync(Guid contentItemId, CancellationToken cancel, IEnumerable<string>? categories = null)
Parameters
Type | Name | Description |
---|---|---|
Guid | contentItemId | The ID of the content item. |
CancellationToken | cancel | The cancellation token to obey. |
IEnumerable<string> | categories | A list of label categories to filter by. See LabelCategories for built-in categories. |
Returns
Type | Description |
---|---|
Task<IResult<ImmutableList<ILabel>>> |
UpdateLabelsAsync(Guid, IEnumerable<ILabelUpdateOptions>, CancellationToken)
Creates or updates the labels for the content item.
Declaration
Task<IResult<ImmutableList<ILabel>>> UpdateLabelsAsync(Guid contentItemId, IEnumerable<ILabelUpdateOptions> labels, CancellationToken cancel)
Parameters
Type | Name | Description |
---|---|---|
Guid | contentItemId | The ID of the content item. |
IEnumerable<ILabelUpdateOptions> | labels | The create or update or update options for labels. |
CancellationToken | cancel | The cancellation token to obey. |
Returns
Type | Description |
---|---|
Task<IResult<ImmutableList<ILabel>>> |