class DropboxApi::Results::DeleteBatchResult

Result returned by {Client#delete_batch} that may either launch an asynchronous job or complete synchronously.

The value will be either a job id or a list of job statuses.

Public Class Methods

new(result_data) click to toggle source
# File lib/dropbox_api/results/delete_batch_result.rb, line 8
def self.new(result_data)
  case result_data['.tag']
  when 'async_job_id'
    result_data
  when 'complete'
    result_data['entries'].map do |entry|
      DropboxApi::Results::DeleteBatchResultEntry.new(entry)
    end
  else
    raise NotImplementedError, "Unknown result type: #{result_data[".tag"]}"
  end
end