Package com.smartsheet.api
Interface DiscussionCommentResources
-
public interface DiscussionCommentResources
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Comment
addComment(long sheetId, long discussionId, Comment comment)
Add a comment to a discussion.Comment
addCommentWithAttachment(long sheetId, long discussionId, Comment comment, java.io.File file, java.lang.String contentType)
Add a comment to a discussion with an attachment.Comment
updateComment(long sheetId, Comment comment)
Update the specified comment
-
-
-
Method Detail
-
addComment
Comment addComment(long sheetId, long discussionId, Comment comment) throws SmartsheetException
Add a comment to a discussion.
It mirrors to the following Smartsheet REST API method: POST /discussion/{discussionId}/comments
- Parameters:
sheetId
- the sheet iddiscussionId
- the dicussion idcomment
- the comment to add- Returns:
- the created comment
- Throws:
java.lang.IllegalArgumentException
- if any argument is null or empty stringInvalidRequestException
- if there is any problem with the REST API requestAuthorizationException
- if there is any problem with the REST API authorization (access token)ResourceNotFoundException
- if the resource cannot be foundServiceUnavailableException
- if the REST API service is not available (possibly due to rate limiting)SmartsheetException
- if there is any other error during the operation
-
addCommentWithAttachment
Comment addCommentWithAttachment(long sheetId, long discussionId, Comment comment, java.io.File file, java.lang.String contentType) throws SmartsheetException, java.io.IOException
Add a comment to a discussion with an attachment.
It mirrors to the following Smartsheet REST API method: POST /discussion/{discussionId}/comments
- Parameters:
sheetId
- the sheet iddiscussionId
- the dicussion idcomment
- the comment to addfile
- the file to be attachedcontentType
- the type of file- Returns:
- the created comment
- Throws:
java.lang.IllegalArgumentException
- if any argument is null or empty stringInvalidRequestException
- if there is any problem with the REST API requestAuthorizationException
- if there is any problem with the REST API authorization (access token)ResourceNotFoundException
- if the resource cannot be foundServiceUnavailableException
- if the REST API service is not available (possibly due to rate limiting)SmartsheetException
- if there is any other error during the operationjava.io.IOException
- is there is any error with file
-
updateComment
Comment updateComment(long sheetId, Comment comment) throws SmartsheetException
Update the specified comment
It mirrors to the following Smartsheet REST API method: PUT PUT /sheets/{sheetId}/comments/{commentId}
- Parameters:
sheetId
- the sheet idcomment
- the new comment object- Returns:
- the updated comment
- Throws:
java.lang.IllegalArgumentException
- if any argument is null or empty stringInvalidRequestException
- if there is any problem with the REST API requestAuthorizationException
- if there is any problem with the REST API authorization (access token)ResourceNotFoundException
- if the resource cannot be foundServiceUnavailableException
- if the REST API service is not available (possibly due to rate limiting)SmartsheetException
- if there is any other error during the operation
-
-