GetHome() public method

Get a nested list of all Home objects, including Sheets, Workspaces and Folders, and optionally reports and/or Templates, as shown on the Home tab..

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

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 can not be found if the REST API service is not available (possibly due To rate limiting) if there is any other REST API related error occurred during the operation if there is any other error occurred during the operation
public GetHome ( IEnumerable includes ) : Api.Models.Home
includes IEnumerable used To specify the optional objects To include, currently TEMPLATES is supported.
return Api.Models.Home
Example #1
0
        public virtual void TestGetHome()
        {
            server.setResponseBody("../../../TestSDK/resources/getHome.json");

            IList <Home> homes = new List <Home>();

            homes.Add(homeResources.GetHome(new ObjectInclusion[] { ObjectInclusion.TEMPLATES }));
            homes.Add(homeResources.GetHome(null));
            foreach (Home home in homes)
            {
                Assert.NotNull(home.Sheets);
                Assert.True(home.Sheets.Count == 7);
                Assert.NotNull(home.Folders);
                Assert.True(home.Folders.Count == 5);
                Assert.NotNull(home.Workspaces);
                Assert.True(home.Workspaces.Count == 7);
                Assert.Null(home.Templates);
                home.Templates = new List <Template>();
            }
        }