Class: DropboxApi::Endpoints::Files::ListRevisions

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

Constant Summary collapse

Method =
:post
Path =
"/2/files/list_revisions".freeze
ResultType =
DropboxApi::Results::ListRevisionsResult
ErrorType =
DropboxApi::Errors::ListRevisionsError

Instance Method Summary collapse

Methods included from OptionsValidator

#validate_options

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

#list_revisions(path, options = {}) ⇒ Object

Return revisions of a file

Parameters:

  • path (String)

    The path to file you want to see the revisions of.

Options Hash (options):

  • limit (Numeric)

    The maximum number of revision entries returned. The default for this field is 10.


15
16
17
18
19
20
21
22
23
24
# File 'lib/dropbox_api/endpoints/files/list_revisions.rb', line 15

add_endpoint :list_revisions do |path, options = {}|
  validate_options([
    :limit
  ], options)
  options[:limit] ||= 10

  perform_request options.merge({
    :path => path
  })
end