C# Class Smartsheet.Api.Internal.ShareResourcesImpl

This is the implementation of the ShareResources. Thread Safety: This class is thread safe because it is immutable and its base class is thread safe.
Inheritance: AbstractAssociatedResources, ShareResources
Mostrar archivo Open project: smartsheet-platform/smartsheet-csharp-sdk Class Usage Examples

Public Methods

Method Description
DeleteShare ( long objectId, string shareId ) : void

Delete a share.

It mirrors To the following Smartsheet REST API method:
DELETE /workspaces/{workspaceId}/shares/{shareId}
DELETE /sheets/{sheetId}/shares/{shareId}
DELETE /sight/{sightId}/shares/{shareId}
DELETE /reports/{reportId}/shares/{shareId}

GetShare ( long objectId, string shareId ) : Api.Models.Share

Get a Share.

It mirrors To the following Smartsheet REST API method:
GET /workspaces/{workspaceId}/shares/{shareId}
GET /sheets/{sheetId}/shares/{shareId}
GET /sights/{sightId}/shares/{shareId}
GET /reports/{reportId}/shares/{shareId}

ListShares ( long objectId, PaginationParameters paging, ShareScope shareScope ) : PaginatedResult

List shares of a given object.

It mirrors To the following Smartsheet REST API method:
GET /workspaces/{workspaceId}/shares
GET /sheets/{sheetId}/shares
GET /sights/{sightId}/shares
GET /reports/{reportId}/shares

ShareResourcesImpl ( SmartsheetImpl smartsheet, string masterResourceType ) : System.Collections.Generic

Constructor. Exceptions: - IllegalArgumentException : if any argument is null or empty string

ShareTo ( long objectId, IEnumerable shares, bool sendEmail ) : IList

Shares a Sheet with the specified Users and Groups.

It mirrors To the following Smartsheet REST API method:
POST /workspaces/{workspaceId}/shares
POST /sheets/{sheetId}/shares
POST /sights/{sightsId}/shares
POST /reports/{reportId}/shares

UpdateShare ( long objectId, Api.Models.Share share ) : Api.Models.Share

Updates the access level of a User or Group for the specified Object.

It mirrors To the following Smartsheet REST API method:
PUT /workspaces/{workspaceId}/shares/{shareId}
PUT /sheets/{sheetId}/shares/{shareId}
PUT /sights/{sightId}/shares/{shareId}
PUT /reports/{reportId}/shares/{shareId}

Method Details

DeleteShare() public method

Delete a share.

It mirrors To the following Smartsheet REST API method:
DELETE /workspaces/{workspaceId}/shares/{shareId}
DELETE /sheets/{sheetId}/shares/{shareId}
DELETE /sight/{sightId}/shares/{shareId}
DELETE /reports/{reportId}/shares/{shareId}

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 DeleteShare ( long objectId, string shareId ) : void
objectId long the ID of the object To share
shareId string the ID of the user To whome the object is shared
return void

GetShare() public method

Get a Share.

It mirrors To the following Smartsheet REST API method:
GET /workspaces/{workspaceId}/shares/{shareId}
GET /sheets/{sheetId}/shares/{shareId}
GET /sights/{sightId}/shares/{shareId}
GET /reports/{reportId}/shares/{shareId}

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 GetShare ( long objectId, string shareId ) : Api.Models.Share
objectId long the ID of the object To share
shareId string the ID of the share instance
return Api.Models.Share

ListShares() public method

List shares of a given object.

It mirrors To the following Smartsheet REST API method:
GET /workspaces/{workspaceId}/shares
GET /sheets/{sheetId}/shares
GET /sights/{sightId}/shares
GET /reports/{reportId}/shares

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 ListShares ( long objectId, PaginationParameters paging, ShareScope shareScope ) : PaginatedResult
objectId long the object Id
paging Smartsheet.Api.Models.PaginationParameters the pagination request
shareScope Smartsheet.Api.Models.ShareScope when specified with a value of , the response will contain both item-level shares (scope=‘ITEM’) and workspace-level shares (scope='WORKSPACE’).
return PaginatedResult

ShareResourcesImpl() public method

Constructor. Exceptions: - IllegalArgumentException : if any argument is null or empty string
public ShareResourcesImpl ( SmartsheetImpl smartsheet, string masterResourceType ) : System.Collections.Generic
smartsheet SmartsheetImpl the Smartsheet
masterResourceType string the master resource Type (e.g. "sheets", "workspaces", "reports")
return System.Collections.Generic

ShareTo() public method

Shares a Sheet with the specified Users and Groups.

It mirrors To the following Smartsheet REST API method:
POST /workspaces/{workspaceId}/shares
POST /sheets/{sheetId}/shares
POST /sights/{sightsId}/shares
POST /reports/{reportId}/shares

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 ShareTo ( long objectId, IEnumerable shares, bool sendEmail ) : IList
objectId long the Id of the object
shares IEnumerable the share objects
sendEmail bool (optional): Either true or false to indicate whether or not /// to notify the user by email. Default is false.
return IList

UpdateShare() public method

Updates the access level of a User or Group for the specified Object.

It mirrors To the following Smartsheet REST API method:
PUT /workspaces/{workspaceId}/shares/{shareId}
PUT /sheets/{sheetId}/shares/{shareId}
PUT /sights/{sightId}/shares/{shareId}
PUT /reports/{reportId}/shares/{shareId}

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 UpdateShare ( long objectId, Api.Models.Share share ) : Api.Models.Share
objectId long the ID of the object To share
share Api.Models.Share the share
return Api.Models.Share