Smartsheet.Api.Internal.SheetResourcesImpl.ListSheets C# (CSharp) Method

ListSheets() public method

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

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

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 ListSheets ( IEnumerable includes, PaginationParameters paging, System.DateTime modifiedSince ) : PaginatedResult
includes IEnumerable
paging Smartsheet.Api.Models.PaginationParameters
modifiedSince System.DateTime
return PaginatedResult
        public virtual PaginatedResult<Sheet> ListSheets(IEnumerable<SheetInclusion> includes, PaginationParameters paging, DateTime? modifiedSince)
        {
            IDictionary<string, string> parameters = new Dictionary<string, string>();
            if (paging != null)
            {
                parameters = paging.toDictionary();
            }
            if (includes != null)
            {
                parameters.Add("include", QueryUtil.GenerateCommaSeparatedList(includes));
            }
            if (modifiedSince != null)
            {
                parameters.Add("modifiedSince", ((DateTime)modifiedSince).ToUniversalTime().ToString("o"));
            }

            return this.ListResourcesWithWrapper<Sheet>("sheets" + QueryUtil.GenerateUrl(null, parameters));
        }

Usage Example

        public virtual void TestListSheets()
        {
            server.setResponseBody("../../../TestSDK/resources/listSheets.json");

            PaginatedResult <Sheet> result = sheetResource.ListSheets(null, null);

            Assert.AreEqual(2, result.Data.Count);
        }
All Usage Examples Of Smartsheet.Api.Internal.SheetResourcesImpl::ListSheets