Sha256: b7cad2a07e0e1200a1b068b73bc183487e3205fa5f8a772351113dbf576328c5

Contents?: true

Size: 641 Bytes

Versions: 2

Compression:

Stored size: 641 Bytes

Contents

module DropboxApi::Results
  # 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.
  class DeleteBatchResult < DropboxApi::Results::Base
    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
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
dropbox_api-0.1.18 lib/dropbox_api/results/delete_batch_result.rb
dropbox_api-0.1.17 lib/dropbox_api/results/delete_batch_result.rb