Class: DropboxApi::Endpoints::Files::CreateFolderBatch
- Includes:
- OptionsValidator
- Defined in:
- lib/dropbox_api/endpoints/files/create_folder_batch.rb
Constant Summary collapse
- Method =
:post
- Path =
'/2/files/create_folder_batch'
- ResultType =
DropboxApi::Results::CreateFolderBatchResult
Instance Method Summary collapse
-
#create_folder_batch(paths, options = {}) ⇒ String, Array
Create multiple folders at once.
Methods included from OptionsValidator
Methods inherited from Rpc
#build_connection, #build_request, #request_body
Methods inherited from Base
Constructor Details
This class inherits a constructor from DropboxApi::Endpoints::Base
Instance Method Details
#create_folder_batch(paths, options = {}) ⇒ String, Array
Create multiple folders at once.
This route is asynchronous for large batches, which returns a job ID
immediately and runs the create folder batch asynchronously. Otherwise,
creates the folders and returns the result synchronously for smaller
inputs. You can force asynchronous behaviour by using the :force_async
flag. Use Client#create_folder_batch_check to check the job status.
Note: No errors are returned by this endpoint.
28 29 30 31 32 33 34 35 36 37 38 39 |
# File 'lib/dropbox_api/endpoints/files/create_folder_batch.rb', line 28 add_endpoint :create_folder_batch do |paths, = {}| ([ :autorename, :force_async ], ) [:autorename] ||= false [:force_async] ||= false perform_request(.merge({ paths: paths })) end |