C# Class Smartsheet.Api.Internal.FavoriteResourcesImpl

This is the implementation of the FavoriteResources. Thread Safety: This class is thread safe because it is immutable and its base class is thread safe.
Inheritance: AbstractResources, FavoriteResources
Show file Open project: smartsheet-platform/smartsheet-csharp-sdk Class Usage Examples

Public Methods

Method Description
AddFavorites ( IEnumerable favorites ) : IList

Adds one or more items to the user’s list of Favorite items.

It mirrors To the following Smartsheet REST API method: POST /favorites

If called with a single Favorite object, and that favorite already exists, error code 1129 will be returned. If called with an array of Favorite objects, any objects specified in the array that are already marked as favorites will be ignored and omitted from the response.

FavoriteResourcesImpl ( SmartsheetImpl smartsheet ) : System

Constructor. Exceptions: - IllegalArgumentException : if any argument is null

ListFavorites ( PaginationParameters paging ) : PaginatedResult

Gets a list of all of the user’s Favorite items.

It mirrors To the following Smartsheet REST API method: GET /favorites

This operation supports pagination of results. For more information, see Paging.

RemoveFavorites ( ObjectType type, IList objectIds ) : void

Removes one or multiple objects from the user’s list of Favorite items.

objectIds must not be null or empty.

It mirrors To the following Smartsheet REST API methods: DELETE /favorites/folder DELETE /favorites/report DELETE /favorites/sheet DELETE /favorites/sight DELETE /favorites/template DELETE /favorites/workspace

Method Details

AddFavorites() public method

Adds one or more items to the user’s list of Favorite items.

It mirrors To the following Smartsheet REST API method: POST /favorites

If called with a single Favorite object, and that favorite already exists, error code 1129 will be returned. If called with an array of Favorite objects, any objects specified in the array that are already marked as favorites will be ignored and omitted from the response.

if any argument is null or empty string if there is any problem with the REST API request if there is any problem with the REST API authorization (access token) if the resource cannot be found if the REST API service is not available (possibly due To rate limiting) if there is any other error during the operation
public AddFavorites ( IEnumerable favorites ) : IList
favorites IEnumerable list of favorite objects
return IList

FavoriteResourcesImpl() public method

Constructor. Exceptions: - IllegalArgumentException : if any argument is null
public FavoriteResourcesImpl ( SmartsheetImpl smartsheet ) : System
smartsheet SmartsheetImpl the Smartsheet
return System

ListFavorites() public method

Gets a list of all of the user’s Favorite items.

It mirrors To the following Smartsheet REST API method: GET /favorites

This operation supports pagination of results. For more information, see Paging.
if any argument is null or empty string if there is any problem with the REST API request if there is any problem with the REST API authorization (access token) if the resource cannot be found if the REST API service is not available (possibly due To rate limiting) if there is any other error during the operation
public ListFavorites ( PaginationParameters paging ) : PaginatedResult
paging Smartsheet.Api.Models.PaginationParameters the pagination
return PaginatedResult

RemoveFavorites() public method

Removes one or multiple objects from the user’s list of Favorite items.

objectIds must not be null or empty.

It mirrors To the following Smartsheet REST API methods: DELETE /favorites/folder DELETE /favorites/report DELETE /favorites/sheet DELETE /favorites/sight DELETE /favorites/template DELETE /favorites/workspace

if any argument is null or empty string if there is any problem with the REST API request if there is any problem with the REST API authorization (access token) if the resource cannot be found if the REST API service is not available (possibly due To rate limiting) if there is any other error during the operation
public RemoveFavorites ( ObjectType type, IList objectIds ) : void
type ObjectType the object type to remove
objectIds IList (required): a comma-separated list of object IDs representing the items to remove from Favorites
return void