CreateFolder() public method

Create a folder in the workspace.

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

            Folder folder    = new Folder.CreateFolderBuilder("New folder").Build();
            Folder newFolder = workspaceFolderResources.CreateFolder(1234L, folder);

            Assert.AreEqual(1486948649985924L, (long)newFolder.Id);
            Assert.AreEqual("New folder", newFolder.Name);
        }
Example #2
0
        public virtual void TestCreateFolder()
        {
            server.setResponseBody("../../../TestSDK/resources/newWorkspaceFolder.json");

            Folder folder = new Folder();

            folder.Name = "New Folder";
            Folder newFolder = workspaceFolderResources.CreateFolder(1234L, folder);

            Assert.AreEqual(8121709439018884L, (long)newFolder.ID);
            Assert.AreEqual("New Folder", newFolder.Name);
        }