Smartsheet.Api.Internal.WorkspaceFolderResourcesImpl.ListFolders C# (CSharp) Method

ListFolders() public method

List Folders of a given workspace.

It mirrors To the following Smartsheet REST API method: GET /workspaces/{workspaceId}/Folders

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 ListFolders ( long workspaceId, PaginationParameters paging ) : PaginatedResult
workspaceId long the workspace Id
paging PaginationParameters the pagination information
return PaginatedResult
        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());
        }

Usage Example

        public virtual void TestListFolders()
        {
            server.setResponseBody("../../../TestSDK/resources/listWorkspaceFolders.json");

            PaginatedResult <Folder> result = workspaceFolderResources.ListFolders(1234L, new PaginationParameters(false, 123, 117));

            Assert.AreEqual(2, result.Data.Count);
            Assert.AreEqual(7116448184188022L, (long)result.Data[1].Id);
            Assert.AreEqual("https://app.smartsheet.com/b/home?lx=9sljohj8jEXqvJIbTrK2Hb", result.Data[0].Permalink);
        }
All Usage Examples Of Smartsheet.Api.Internal.WorkspaceFolderResourcesImpl::ListFolders