CreateFolder() public méthode

Create a folder in home.

It mirrors To the following Smartsheet REST API method:
POST /home/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 CreateFolder ( Folder folder ) : Folder
folder Folder the folder To create
Résultat Folder
        public virtual void TestCreateFolder()
        {
            server.setResponseBody("../../../TestSDK/resources/createFolder.json");

            Folder folder = new Folder.CreateFolderBuilder("New folder").Build();

            Folder newFolder = homeFolderResources.CreateFolder(folder);

            Assert.True(1486948649985924L == newFolder.Id);
            Assert.AreEqual(folder.Name, newFolder.Name);
        }
Exemple #2
0
        public virtual void TestCreateFolder()
        {
            server.setResponseBody("../../../TestSDK/resources/createFolders.json");

            Folder folder = new Folder();

            folder.Name = "Hello World";

            Folder newFolder = homeFolderResources.CreateFolder(folder);

            Assert.True(6821399500220292L == newFolder.ID);
            Assert.AreEqual("hello world", newFolder.Name);
        }