C# Class Smartsheet.Api.Internal.ReportResourcesImpl

This is the implementation of the ReportResources. Thread Safety: This class is thread safe because it is immutable and its base class is thread safe.
Inheritance: AbstractResources, ReportResources
Exibir arquivo Open project: smartsheet-platform/smartsheet-csharp-sdk Class Usage Examples

Public Methods

Method Description
GetPublishStatus ( long reportId ) : ReportPublish

Get the publish status of a report.

It mirrors to the following Smartsheet REST API method: GET /reports/{id}/publish

GetReport ( long reportId, IEnumerable includes, int pageSize, int page ) : Report

Gets the Report, including one page of Rows, and optionally populated with Discussions, Attachments, and source Sheets.

It mirrors To the following Smartsheet REST API method: GET /reports/{reportId}

This method returns the top 100 rows. To get more or less rows please use the other overloaded versions of this method

GetReportAsCSV ( long reportId, BinaryWriter outputStream ) : void

Get a report as a CSV file.

It mirrors To the following Smartsheet REST API method:
GET /reports/{reportId} with "text/csv" Accept HTTP header

GetReportAsExcel ( long reportId, BinaryWriter outputStream ) : void

Gets the Report in the format specified, based on the Report ID.

It mirrors To the following Smartsheet REST API method:
GET /reports/{reportId} with "application/vnd.ms-excel" Accept HTTP header

ListReports ( PaginationParameters paging, System.DateTime modifiedSince ) : PaginatedResult

Gets the list of all Reports that the User has access to, in alphabetical order, by name.

It mirrors To the following Smartsheet REST API method: GET /reports

ReportResourcesImpl ( SmartsheetImpl smartsheet ) : System

Constructor. Exceptions: - IllegalArgumentException : if any argument is null

SendReport ( long reportId, SheetEmail email ) : void

Send a report as a PDF attachment via Email To the designated recipients.

It mirrors To the following Smartsheet REST API method: POST /reports/{reportId}/emails

UpdatePublishStatus ( long reportId, ReportPublish reportPublish ) : ReportPublish

Sets the publish status of a report and returns the new status, including the URLs of any enabled publishing.

It mirrors to the following Smartsheet REST API method: PUT /reports/{id}/publish

Private Methods

Method Description
GetReportAsFile ( string path, BinaryWriter outputStream, string contentType ) : void

Get a sheet as a file.

It mirrors To the following Smartsheet REST API method:
GET /reports/{reportId} with "application/pdf", "application/vnd.ms-excel", or "text/csv" as Accept HTTP header

Method Details

GetPublishStatus() public method

Get the publish status of a report.

It mirrors to the following Smartsheet REST API method: GET /reports/{id}/publish

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 GetPublishStatus ( long reportId ) : ReportPublish
reportId long the reportId
return Smartsheet.Api.Models.ReportPublish

GetReport() public method

Gets the Report, including one page of Rows, and optionally populated with Discussions, Attachments, and source Sheets.

It mirrors To the following Smartsheet REST API method: GET /reports/{reportId}

This method returns the top 100 rows. To get more or less rows please use the other overloaded versions of this method
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 GetReport ( long reportId, IEnumerable includes, int pageSize, int page ) : Report
reportId long the Id of the report
includes IEnumerable used To specify the optional objects To include.
pageSize int (optional): Number of rows per page. If not specified, the default value is 100. /// This operation can return a maximum of 500 rows per page.
page int (optional): Which page number (1-based) to return. /// If not specified, the default value is 1. If a page number is specified that is greater than the number of total pages, the last page will be returned.
return Report

GetReportAsCSV() public method

Get a report as a CSV file.

It mirrors To the following Smartsheet REST API method:
GET /reports/{reportId} with "text/csv" Accept HTTP header

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 GetReportAsCSV ( long reportId, BinaryWriter outputStream ) : void
reportId long the Id of the report
outputStream System.IO.BinaryWriter the output stream To which the Excel file will be written.
return void

GetReportAsExcel() public method

Gets the Report in the format specified, based on the Report ID.

It mirrors To the following Smartsheet REST API method:
GET /reports/{reportId} with "application/vnd.ms-excel" Accept HTTP header

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 GetReportAsExcel ( long reportId, BinaryWriter outputStream ) : void
reportId long the Id of the report
outputStream System.IO.BinaryWriter the output stream To which the Excel file will be written.
return void

ListReports() public method

Gets the list of all Reports that the User has access to, in alphabetical order, by name.

It mirrors To the following Smartsheet REST API method: GET /reports

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 ListReports ( PaginationParameters paging, System.DateTime modifiedSince ) : PaginatedResult
paging Smartsheet.Api.Models.PaginationParameters the pagination
modifiedSince System.DateTime
return PaginatedResult

ReportResourcesImpl() public method

Constructor. Exceptions: - IllegalArgumentException : if any argument is null
public ReportResourcesImpl ( SmartsheetImpl smartsheet ) : System
smartsheet SmartsheetImpl the Smartsheet
return System

SendReport() public method

Send a report as a PDF attachment via Email To the designated recipients.

It mirrors To the following Smartsheet REST API method: POST /reports/{reportId}/emails

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 SendReport ( long reportId, SheetEmail email ) : void
reportId long the reportId
email Smartsheet.Api.Models.SheetEmail the Email
return void

UpdatePublishStatus() public method

Sets the publish status of a report and returns the new status, including the URLs of any enabled publishing.

It mirrors to the following Smartsheet REST API method: PUT /reports/{id}/publish

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 UpdatePublishStatus ( long reportId, ReportPublish reportPublish ) : ReportPublish
reportId long the reportId
reportPublish Smartsheet.Api.Models.ReportPublish the ReportPublish object
return Smartsheet.Api.Models.ReportPublish