Interface SheetDiscussionResources
- Namespace
- Smartsheet.Api
- Assembly
- smartsheet-csharp-sdk.dll
This interface provides methods to access discussion resources that are associated to a Sheet object.
Thread Safety: Implementation of this interface must be thread safe.
public interface SheetDiscussionResources
Properties
AttachmentResources
Return the DiscussionAttachmentResources object that provides access to attachment resources associated with discussion resources.
DiscussionAttachmentResources AttachmentResources { get; }
Property Value
- DiscussionAttachmentResources
the DiscussionAttachmentResources object
CommentResources
Returns the DiscussionCommentResources object that provides access to comment resources associated with discussion resources.
DiscussionCommentResources CommentResources { get; }
Property Value
- DiscussionCommentResources
the DiscussionCommentResources object
Methods
CreateDiscussion(long, Discussion)
Creates a new discussion on a sheet.
Mirrors to the following Smartsheet REST API method: POST /sheets/{sheetId}/discussions
Discussion CreateDiscussion(long sheetId, Discussion discussion)
Parameters
sheetId
longthe Id of the sheet
discussion
Discussionthe discussion to add
Returns
- Discussion
the created discussion
Exceptions
- InvalidOperationException
if any argument is null or an 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
CreateDiscussionWithAttachment(long, Discussion, string, string)
Creates a new discussion with an attachment on a sheet.
Mirrors to the following Smartsheet REST API method: POST /sheets/{sheetId}/discussions
Discussion CreateDiscussionWithAttachment(long sheetId, Discussion discussion, string file, string fileType)
Parameters
sheetId
longthe Id of the sheet
discussion
Discussionthe discussion to add
file
stringthe file path
fileType
stringthe file type, can be null
Returns
- Discussion
the created discussion
Exceptions
- InvalidOperationException
if any argument is null or an 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
DeleteDiscussion(long, long)
Deletes a discussion
Mirrors to the following Smartsheet REST API method: DELETE /sheets/{sheetId}/discussions/{discussionId}
void DeleteDiscussion(long sheetId, long discussionId)
Parameters
Exceptions
- InvalidOperationException
if any argument is null or an 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
GetDiscussion(long, long)
Gets the discussion specified in the URL.
Mirrors to the following Smartsheet REST API method: GET /sheets/{sheetId}/discussions/{discussionId}
Discussion GetDiscussion(long sheetId, long discussionId)
Parameters
Returns
- Discussion
the discussion
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
ListDiscussions(long, IEnumerable<DiscussionInclusion>?, PaginationParameters?)
Gets a list of all discussions associated with the specified sheet (both sheet-level discussions and row-level discussions).
Mirrors to the following Smartsheet REST API method: GET /sheets/{sheetId}/discussions
PaginatedResult<Discussion> ListDiscussions(long sheetId, IEnumerable<DiscussionInclusion>? include = null, PaginationParameters? paging = null)
Parameters
sheetId
longthe sheet Id
include
IEnumerable<DiscussionInclusion>elements to include in the response
paging
PaginationParametersthe pagination
Returns
- PaginatedResult<Discussion>
list of all discussions
Exceptions
- InvalidOperationException
if any argument is null or an 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