Class: DropboxApi::Endpoints::Files::DeleteBatch

Inherits:
Rpc
  • Object
show all
Defined in:
lib/dropbox_api/endpoints/files/delete_batch.rb

Constant Summary collapse

Method =
:post
Path =
"/2/files/delete_batch".freeze
ResultType =
DropboxApi::Results::DeleteBatchResult

Instance Method Summary collapse

Methods inherited from Rpc

#build_request, #initialize, #request_body

Methods inherited from Base

add_endpoint

Constructor Details

This class inherits a constructor from DropboxApi::Endpoints::Rpc

Instance Method Details

#delete_batch(entries) ⇒ String, Array

Delete multiple files/folders at once.

This route is asynchronous, which returns a job ID immediately and runs the delete batch asynchronously. Use Client#delete_batch_check to check the job status.

Parameters:

  • entries (Array)

    List of entries, each entry is a Hash with these fields: path (mandatory) & parent_rev (optional).

Returns:

  • (String, Array)

    Either the job id or the list of job statuses.



16
17
18
19
20
# File 'lib/dropbox_api/endpoints/files/delete_batch.rb', line 16

add_endpoint :delete_batch do |entries|
  perform_request({
    :entries => entries
  })
end