Interface IFavoritesApiClient
Interface for API client favorites operations.
Inherited Members
Namespace: Tableau.Migration.Api
Assembly: Tableau.Migration.dll
Syntax
public interface IFavoritesApiClient : IContentApiClient, IPagedListApiClient<IFavorite>, IPublishApiClient<IFavorite>, IPublishApiClient<IFavorite, IFavorite>
Methods
AddFavoriteAsync(IContentReference, string, FavoriteContentType, Guid, CancellationToken)
Adds a favorite.
Declaration
Task<IResult<IImmutableList<IFavorite>>> AddFavoriteAsync(IContentReference user, string label, FavoriteContentType contentType, Guid contentItemId, CancellationToken cancel)
Parameters
Type | Name | Description |
---|---|---|
IContentReference | user | The user. |
string | label | The favorite label. |
FavoriteContentType | contentType | The content reference type. |
Guid | contentItemId | The content reference ID. |
CancellationToken | cancel | The cancellation token to obey. |
Returns
Type | Description |
---|---|
Task<IResult<IImmutableList<IFavorite>>> | A list of favorites for the given user. |
DeleteFavoriteAsync(Guid, FavoriteContentType, Guid, CancellationToken)
Deletes a favorite.
Declaration
Task<IResult> DeleteFavoriteAsync(Guid userId, FavoriteContentType contentType, Guid contentItemId, CancellationToken cancel)
Parameters
Type | Name | Description |
---|---|---|
Guid | userId | The user's ID. |
FavoriteContentType | contentType | The content reference type. |
Guid | contentItemId | The content reference ID. |
CancellationToken | cancel | The cancellation token to obey. |
Returns
Type | Description |
---|---|
Task<IResult> | The result. |
GetFavoritesForUserAsync(IContentReference, int, int, CancellationToken)
Gets the favorites for a user.
Declaration
Task<IPagedResult<IFavorite>> GetFavoritesForUserAsync(IContentReference user, int pageNumber, int pageSize, CancellationToken cancel)
Parameters
Type | Name | Description |
---|---|---|
IContentReference | user | The user. |
int | pageNumber | The 1-indexed page number. |
int | pageSize | The size of the page. |
CancellationToken | cancel | The cancellation token to obey. |
Returns
Type | Description |
---|---|
Task<IPagedResult<IFavorite>> | A list of favorites for the given user. |
GetPagerForUser(IContentReference, int)
Gets a pager to list all the favorites a user has access to.
Declaration
IPager<IFavorite> GetPagerForUser(IContentReference user, int pageSize)
Parameters
Type | Name | Description |
---|---|---|
IContentReference | user | The user. |
int | pageSize | The page size to use. |
Returns
Type | Description |
---|---|
IPager<IFavorite> | A pager to list favorites with. |