/// <summary>
 /// <para>List all Workspaces.</para>
 /// <para>It mirrors to the following Smartsheet REST API method: GET /Workspaces</para>
 /// <remarks>This operation supports pagination of results. For more information, see Paging.</remarks>
 /// </summary>
 /// <returns> the list of Workspaces (note that an empty list will be returned if there are none) </returns>
 /// <exception cref="System.InvalidOperationException"> if any argument is null or empty string </exception>
 /// <exception cref="InvalidRequestException"> if there is any problem with the REST API request </exception>
 /// <exception cref="AuthorizationException"> if there is any problem with  the REST API authorization (access token) </exception>
 /// <exception cref="ResourceNotFoundException"> if the resource cannot be found </exception>
 /// <exception cref="ServiceUnavailableException"> if the REST API service is not available (possibly due to rate limiting) </exception>
 /// <exception cref="SmartsheetException"> if there is any other error during the operation </exception>
 public virtual PaginatedResult<Workspace> ListWorkspaces(PaginationParameters paging)
 {
     StringBuilder path = new StringBuilder("workspaces");
     if (paging != null)
     {
         path.Append(paging.ToQueryString());
     }
     return this.ListResourcesWithWrapper<Workspace>(path.ToString());
 }
 /// <summary>
 /// <para>Gets the list of public Templates to which the user has access.</para>
 /// <remarks>This operation supports pagination of results. For more information, see Paging.</remarks>
 /// <para>It mirrors To the following Smartsheet REST API method: GET /templates/public</para>
 /// </summary>
 /// <returns> the list of Templates (note that an empty list will be returned if there are none). </returns>
 /// <exception cref="System.InvalidOperationException"> if any argument is null or empty string </exception>
 /// <exception cref="InvalidRequestException"> if there is any problem with the REST API request </exception>
 /// <exception cref="AuthorizationException"> if there is any problem with  the REST API authorization (access token) </exception>
 /// <exception cref="ResourceNotFoundException"> if the resource cannot be found </exception>
 /// <exception cref="ServiceUnavailableException"> if the REST API service is not available (possibly due To rate limiting) </exception>
 /// <exception cref="SmartsheetException"> if there is any other error during the operation </exception>
 public virtual PaginatedResult<Template> ListPublicTemplates(PaginationParameters paging)
 {
     StringBuilder path = new StringBuilder("templates/public");
     if (paging != null)
     {
         path.Append(paging.ToQueryString());
     }
     return this.ListResourcesWithWrapper<Template>(path.ToString());
 }
Ejemplo n.º 3
0
        /// <summary>
        /// <para>Gets a list of all Attachments that are in the Discussion</para>
        /// <para>It mirrors To the following Smartsheet REST API method: <br />
        /// GET /sheets/{sheetId}/discussions/{discussionId}/attachments</para>
        /// </summary>
        /// <param name="sheetId"> the sheetId </param>
        /// <param name="discussionId"> the discussion Id </param>
        /// <param name="paging"> the paging </param>
        /// <returns> list of all Attachments that are in the Discussion. </returns>
        /// <exception cref="System.InvalidOperationException"> if any argument is null or empty string </exception>
        /// <exception cref="InvalidRequestException"> if there is any problem with the REST API request </exception>
        /// <exception cref="AuthorizationException"> if there is any problem with  the REST API authorization (access token) </exception>
        /// <exception cref="ResourceNotFoundException"> if the resource cannot be found </exception>
        /// <exception cref="ServiceUnavailableException"> if the REST API service is not available (possibly due To rate limiting) </exception>
        /// <exception cref="SmartsheetException"> if there is any other error during the operation </exception>
        public virtual PaginatedResult <Attachment> ListAttachments(long sheetId, long discussionId, PaginationParameters paging)
        {
            StringBuilder path = new StringBuilder("sheets/" + sheetId + "/discussions/" + discussionId + "/attachments");

            if (paging != null)
            {
                path.Append(paging.ToQueryString());
            }
            return(this.ListResourcesWithWrapper <Attachment>(path.ToString()));
        }
        /// <summary>
        /// <para>Gets a list of the top-level child Folders within the specified Folder.</para>
        /// <remarks>This operation supports pagination of results. For more information, see Paging.</remarks>
        /// <para>It mirrors To the following Smartsheet REST API method:<br /> GET /folders/{folderId}/folders</para>
        /// </summary>
        /// <param name="folderId"> the folderId</param>
        /// <param name="paging">the pagination information</param>
        /// <returns>the child Folders (note that an empty list will be returned if no child folder is found), limited to the following attributes:
        /// <list type="bullet">
        /// <item><description>id</description></item>
        /// <item><description>name</description></item>
        /// <item><description>permalink</description></item>
        /// </list>
        /// </returns>
        /// <exception cref="System.InvalidOperationException"> if any argument is null or empty string </exception>
        /// <exception cref="InvalidRequestException"> if there is any problem with the REST API request </exception>
        /// <exception cref="AuthorizationException"> if there is any problem with  the REST API authorization (access token) </exception>
        /// <exception cref="ResourceNotFoundException"> if the resource cannot be found </exception>
        /// <exception cref="ServiceUnavailableException"> if the REST API service is not available (possibly due To rate limiting) </exception>
        /// <exception cref="SmartsheetException"> if there is any other error during the operation </exception>
        public virtual PaginatedResult <Folder> ListFolders(long folderId, PaginationParameters paging)
        {
            StringBuilder path = new StringBuilder("folders/" + folderId + "/folders");

            if (paging != null)
            {
                path.Append(paging.ToQueryString());
            }
            return(this.ListResourcesWithWrapper <Folder>(path.ToString()));
        }
        /// <summary>
        /// <para>List all Sheets in the organization.</para>
        /// <para>It mirrors To the following Smartsheet REST API method: GET /users/sheets</para>
        /// </summary>
        /// <returns> the list of all Sheets (note that an empty list will be returned if there are none) </returns>
        /// <exception cref="System.InvalidOperationException"> if any argument is null or empty string </exception>
        /// <exception cref="InvalidRequestException"> if there is any problem with the REST API request </exception>
        /// <exception cref="AuthorizationException"> if there is any problem with  the REST API authorization (access token) </exception>
        /// <exception cref="ResourceNotFoundException"> if the resource cannot be found </exception>
        /// <exception cref="ServiceUnavailableException"> if the REST API service is not available (possibly due To rate limiting) </exception>
        /// <exception cref="SmartsheetException"> if there is any other error during the operation </exception>
        public virtual PaginatedResult <Sheet> ListOrganizationSheets(PaginationParameters paging)
        {
            StringBuilder path = new StringBuilder("users/sheets");

            if (paging != null)
            {
                path.Append(paging.ToQueryString());
            }
            return(this.ListResourcesWithWrapper <Sheet>(path.ToString()));
        }
Ejemplo n.º 6
0
        /// <summary>
        /// <para>Gets a list of the user’s Smartsheet Contacts.</para>
        /// <para>It mirrors To the following Smartsheet REST API method:
        /// POST GET /contacts</para>
        /// </summary>
        /// <param name="paging"> the pagination info </param>
        /// <returns> The list of Contact objects </returns>
        /// <exception cref="System.InvalidOperationException"> if any argument is null or empty string </exception>
        /// <exception cref="InvalidRequestException"> if there is any problem with the REST API request </exception>
        /// <exception cref="AuthorizationException"> if there is any problem with  the REST API authorization (access token) </exception>
        /// <exception cref="ResourceNotFoundException"> if the resource cannot be found </exception>
        /// <exception cref="ServiceUnavailableException"> if the REST API service is not available (possibly due To rate limiting) </exception>
        /// <exception cref="SmartsheetException"> if there is any other error during the operation </exception>
        public virtual PaginatedResult <Contact> ListContacts(PaginationParameters paging)
        {
            StringBuilder path = new StringBuilder("contacts");

            if (paging != null)
            {
                path.Append(paging.ToQueryString());
            }
            return(ListResourcesWithWrapper <Contact>(path.ToString()));
        }
        /// <summary>
        /// <para>Gets the list of user-created Templates to which the user has access.</para>
        /// <remarks>This operation supports pagination of results. For more information, see Paging.</remarks>
        /// <para>It mirrors To the following Smartsheet REST API method: GET /templates</para>
        /// </summary>
        /// <returns> the list of Templates (note that an empty list will be returned if there are none). </returns>
        /// <exception cref="System.InvalidOperationException"> if any argument is null or empty string </exception>
        /// <exception cref="InvalidRequestException"> if there is any problem with the REST API request </exception>
        /// <exception cref="AuthorizationException"> if there is any problem with  the REST API authorization (access token) </exception>
        /// <exception cref="ResourceNotFoundException"> if the resource cannot be found </exception>
        /// <exception cref="ServiceUnavailableException"> if the REST API service is not available (possibly due To rate limiting) </exception>
        /// <exception cref="SmartsheetException"> if there is any other error during the operation </exception>
        public virtual PaginatedResult <Template> ListUserCreatedTemplates(PaginationParameters paging)
        {
            StringBuilder path = new StringBuilder("templates");

            if (paging != null)
            {
                path.Append(paging.ToQueryString());
            }
            return(this.ListResourcesWithWrapper <Template>(path.ToString()));
        }
Ejemplo n.º 8
0
        /// <summary>
        /// <para>List all Users.</para>
        /// <para>It mirrors to the following Smartsheet REST API method: GET /groups</para>
        /// <remarks>This operation supports pagination of results. For more information, see Paging.</remarks>
        /// </summary>
        /// <param name="paging"> the pagination</param>
        /// <returns> the list of all Users </returns>
        /// <exception cref="System.InvalidOperationException"> if any argument is null or empty string </exception>
        /// <exception cref="InvalidRequestException"> if there is any problem with the REST API request </exception>
        /// <exception cref="AuthorizationException"> if there is any problem with  the REST API authorization (access token) </exception>
        /// <exception cref="ResourceNotFoundException"> if the resource cannot be found </exception>
        /// <exception cref="ServiceUnavailableException"> if the REST API service is not available (possibly due to rate limiting) </exception>
        /// <exception cref="SmartsheetException"> if there is any other error during the operation </exception>
        public virtual PaginatedResult <Group> ListGroups(PaginationParameters paging)
        {
            StringBuilder path = new StringBuilder("groups");

            if (paging != null)
            {
                path.Append(paging.ToQueryString());
            }
            return(this.ListResourcesWithWrapper <Group>(path.ToString()));
        }
Ejemplo n.º 9
0
        public void testToQueryString()
        {
            PaginationParameters parameters1 = new PaginationParameters(true, null, null);

            Assert.AreEqual("?includeAll=true", parameters1.ToQueryString());

            PaginationParameters parameters2 = new PaginationParameters(true, 1, 1);

            Assert.AreEqual("?includeAll=true", parameters2.ToQueryString());

            PaginationParameters parameters3 = new PaginationParameters(false, 1, 1);

            Assert.AreEqual("?includeAll=false&pageSize=1&page=1", parameters3.ToQueryString());
        }
 /// <summary>
 /// <para>List Folders under home.</para>
 /// 
 /// <para>It mirrors To the following Smartsheet REST API method:<br />
 /// GET /home/Folders</para>
 /// </summary>
 /// <returns>the list of Folders (note that an empty list will be returned if no child folder is found), limited to the following attributes:
 /// <list type="bullet">
 /// <item><description>id</description></item>
 /// <item><description>name</description></item>
 /// <item><description>permalink</description></item>
 /// </list>
 /// </returns>
 /// <exception cref="System.InvalidOperationException"> if any argument is null or empty string </exception>
 /// <exception cref="InvalidRequestException"> if there is any problem with the REST API request </exception>
 /// <exception cref="AuthorizationException"> if there is any problem with  the REST API authorization (access token) </exception>
 /// <exception cref="ResourceNotFoundException"> if the resource cannot be found </exception>
 /// <exception cref="ServiceUnavailableException"> if the REST API service is not available (possibly due To rate limiting) </exception>
 /// <exception cref="SmartsheetException"> if there is any other error during the operation </exception>
 public virtual PaginatedResult<Folder> ListFolders(PaginationParameters paging)
 {
     StringBuilder path = new StringBuilder("home/folders");
     if (paging != null)
     {
         path.Append(paging.ToQueryString());
     }
     return ListResourcesWithWrapper<Folder>(path.ToString());
 }
 /// <summary>
 /// <para>List Folders of a given workspace.</para>
 /// 
 /// <para>It mirrors To the following Smartsheet REST API method: GET /workspaces/{workspaceId}/Folders</para>
 /// </summary>
 /// <param name="workspaceId">the workspace Id</param>
 /// <param name="paging">the pagination information</param>
 /// <returns>the list of Folders (note that an empty list will be returned if no child folder is found), limited to the following attributes:
 /// <list type="bullet">
 /// <item><description>id</description></item>
 /// <item><description>name</description></item>
 /// <item><description>permalink</description></item>
 /// </list>
 /// </returns>
 /// <exception cref="System.InvalidOperationException"> if any argument is null or empty string </exception>
 /// <exception cref="InvalidRequestException"> if there is any problem with the REST API request </exception>
 /// <exception cref="AuthorizationException"> if there is any problem with  the REST API authorization (access token) </exception>
 /// <exception cref="ResourceNotFoundException"> if the resource cannot be found </exception>
 /// <exception cref="ServiceUnavailableException"> if the REST API service is not available (possibly due To rate limiting) </exception>
 /// <exception cref="SmartsheetException"> if there is any other error during the operation </exception>
 public virtual PaginatedResult<Folder> ListFolders(long workspaceId, PaginationParameters paging)
 {
     StringBuilder path = new StringBuilder("workspaces/" + workspaceId + "/folders");
     if (paging != null)
     {
         path.Append(paging.ToQueryString());
     }
     return this.ListResourcesWithWrapper<Folder>(path.ToString());
 }
 /// <summary>
 /// <para>List all Users.</para>
 /// <para>It mirrors To the following Smartsheet REST API method: GET /groups</para>
 /// <remarks>This operation supports pagination of results. For more information, see Paging.</remarks>
 /// </summary>
 /// <param name="paging"> the pagination</param>
 /// <returns> the list of all Users </returns>
 /// <exception cref="System.InvalidOperationException"> if any argument is null or empty string </exception>
 /// <exception cref="InvalidRequestException"> if there is any problem with the REST API request </exception>
 /// <exception cref="AuthorizationException"> if there is any problem with  the REST API authorization (access token) </exception>
 /// <exception cref="ResourceNotFoundException"> if the resource cannot be found </exception>
 /// <exception cref="ServiceUnavailableException"> if the REST API service is not available (possibly due To rate limiting) </exception>
 /// <exception cref="SmartsheetException"> if there is any other error during the operation </exception>
 public virtual PaginatedResult<Group> ListGroups(PaginationParameters paging)
 {
     StringBuilder path = new StringBuilder("groups");
     if (paging != null)
     {
         path.Append(paging.ToQueryString());
     }
     return this.ListResourcesWithWrapper<Group>(path.ToString());
 }