C# Класс Smartsheet.Api.Internal.AttachmentVersioningResourcesImpl

This is the implementation of the AttachmentVersioningResources. Thread Safety: This class is thread safe because it is immutable and its base class is thread safe.
Наследование: AbstractResources, AttachmentVersioningResources
Показать файл Открыть проект

Открытые методы

Метод Описание
AttachNewVersion ( long sheetId, long attachmentId, string file, string fileType ) : Attachment

Uploads a new version of a file to a Sheet or Row. This operation can be performed using a simple upload or a multipart upload. For more information, see Posting an Attachment.

It mirrors To the following Smartsheet REST API method:
POST /sheets/{sheetId}/attachments/{attachmentId}/versions

Uploading new versions is not supported for attachments on Comments or for URL attachments.

This is a resource-intensive operation and incurs 10 additional requests against the rate limit.

AttachmentVersioningResourcesImpl ( SmartsheetImpl smartsheet ) : System

Constructor. Parameters: - Smartsheet : the SmartsheetImpl Exceptions: - IllegalArgumentException : if any argument is null

DeleteAllVersions ( long sheetId, long attachmentId ) : void

Deletes all versions of the attachment corresponding to the specified Attachment ID. For attachments with multiple versions, this will effectively delete the attachment from the object that it’s attached to.

It mirrors To the following Smartsheet REST API method: DELETE /sheets/{sheetId}/attachments/{attachmentId}/versions

ListVersions ( long sheetId, long attachmentId, PaginationParameters paging ) : PaginatedResult

Gets a list of all versions of the given Attachment ID, in order from newest to oldest.

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

To retrieve a download URL for a file attachment, use the Get Attachment operation for the specific version you want to download.

It mirrors To the following Smartsheet REST API method: GET /sheets/{sheetId}/attachments/{attachmentId}/versions

Приватные методы

Метод Описание
AttachFile ( string path, string file, string contentType ) : Attachment

Attach file.

Описание методов

AttachNewVersion() публичный Метод

Uploads a new version of a file to a Sheet or Row. This operation can be performed using a simple upload or a multipart upload. For more information, see Posting an Attachment.

It mirrors To the following Smartsheet REST API method:
POST /sheets/{sheetId}/attachments/{attachmentId}/versions

Uploading new versions is not supported for attachments on Comments or for URL attachments.

This is a resource-intensive operation and incurs 10 additional requests against the rate limit.

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 AttachNewVersion ( long sheetId, long attachmentId, string file, string fileType ) : Attachment
sheetId long the sheet id
attachmentId long the attachment id
file string the file path
fileType string the file type
Результат Smartsheet.Api.Models.Attachment

AttachmentVersioningResourcesImpl() публичный Метод

Constructor. Parameters: - Smartsheet : the SmartsheetImpl Exceptions: - IllegalArgumentException : if any argument is null
public AttachmentVersioningResourcesImpl ( SmartsheetImpl smartsheet ) : System
smartsheet SmartsheetImpl the Smartsheet
Результат System

DeleteAllVersions() публичный Метод

Deletes all versions of the attachment corresponding to the specified Attachment ID. For attachments with multiple versions, this will effectively delete the attachment from the object that it’s attached to.

It mirrors To the following Smartsheet REST API method: DELETE /sheets/{sheetId}/attachments/{attachmentId}/versions

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 DeleteAllVersions ( long sheetId, long attachmentId ) : void
sheetId long the sheetId
attachmentId long the attachment id
Результат void

ListVersions() публичный Метод

Gets a list of all versions of the given Attachment ID, in order from newest to oldest.

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

To retrieve a download URL for a file attachment, use the Get Attachment operation for the specific version you want to download.

It mirrors To the following Smartsheet REST API method: GET /sheets/{sheetId}/attachments/{attachmentId}/versions

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 ListVersions ( long sheetId, long attachmentId, PaginationParameters paging ) : PaginatedResult
sheetId long the sheet id
attachmentId long the attachment id
paging Smartsheet.Api.Models.PaginationParameters the pagination
Результат PaginatedResult