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
sheetIdlongthe id of the sheet
discussionIdlongthe id of the discussion
commentCommentComment 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
sheetIdlongthe id of the sheet
discussionIdlongthe id of the discussion
commentCommentComment object
filestringthe file path
fileTypestringthe 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
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