Table of Contents

Interface DiscussionCommentResources

Namespace
Smartsheet.Api
Assembly
smartsheet-csharp-sdk.dll

This interface provides methods to access Comment resources.

Thread Safety: Implementation of this interface must be thread safe.

public interface DiscussionCommentResources

Methods

AddComment(long, long, Comment)

Adds a Comment to a Discussion.

It mirrors to the following Smartsheet REST API method: POST /sheets/{sheetId}/discussions/{discussionId}/comments

Comment AddComment(long sheetId, long discussionId, Comment comment)

Parameters

sheetId long

the id of the sheet

discussionId long

the id of the discussion

comment Comment

Comment object

Returns

Comment

the created comment

Exceptions

InvalidOperationException

if any argument is null or empty string

InvalidRequestException

if there is any problem with the REST API request

AuthorizationException

if there is any problem with the REST API authorization (access token)

ResourceNotFoundException

if the resource cannot be found

ServiceUnavailableException

if the REST API service is not available (possibly due to rate limiting)

SmartsheetException

if there is any other error during the operation

AddCommentWithAttachment(long, long, Comment, string, string)

Adds a Comment to a Discussion.

It mirrors to the following Smartsheet REST API method: POST /sheets/{sheetId}/discussions/{discussionId}/comments

Comment AddCommentWithAttachment(long sheetId, long discussionId, Comment comment, string file, string fileType)

Parameters

sheetId long

the id of the sheet

discussionId long

the id of the discussion

comment Comment

Comment object

file string

the file path

fileType string

the file type, can be left null

Returns

Comment

the created comment

Exceptions

InvalidOperationException

if any argument is null or empty string

InvalidRequestException

if there is any problem with the REST API request

AuthorizationException

if there is any problem with the REST API authorization (access token)

ResourceNotFoundException

if the resource cannot be found

ServiceUnavailableException

if the REST API service is not available (possibly due to rate limiting)

SmartsheetException

if there is any other error during the operation

UpdateComment(long, Comment)

Update the specified comment.

It mirrors to the following Smartsheet REST API method: PUT /sheets/{sheetId}/comments/{commentId}

Comment UpdateComment(long sheetId, Comment comment)

Parameters

sheetId long

the id of the sheet

comment Comment

Comment object

Returns

Comment

the updated comment

Exceptions

InvalidOperationException

if any argument is null or empty string

InvalidRequestException

if there is any problem with the REST API request

AuthorizationException

if there is any problem with the REST API authorization (access token)

ResourceNotFoundException

if the resource cannot be found

ServiceUnavailableException

if the REST API service is not available (possibly due to rate limiting)

SmartsheetException

if there is any other error during the operation