Sha256: 8d06f09a1ec0fb2c215fa2cf27c6618b7926a22e5006000498095025c30d0421

Contents?: true

Size: 676 Bytes

Versions: 2

Compression:

Stored size: 676 Bytes

Contents

module DropboxApi::Results
  # Result returned by {Client#copy_batch} or {Client#move_batch} that may
  # either launch an asynchronous job or complete synchronously.
  #
  # The value will be either `:in_progress` or a list of job statuses.
  class RelocationBatchResult < DropboxApi::Results::Base
    def self.new(result_data)
      case result_data[".tag"]
      when "in_progress"
        :in_progress
      when "complete"
        result_data["entries"].map do |entry|
          DropboxApi::Results::RelocationBatchResultEntry.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/relocation_batch_result.rb
dropbox_api-0.1.17 lib/dropbox_api/results/relocation_batch_result.rb