Class: DropboxApi::Endpoints::Files::Restore

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

Constant Summary collapse

Method =
:post
Path =
"/2/files/restore".freeze
ResultType =
DropboxApi::Metadata::File
ErrorType =
DropboxApi::Errors::RestoreError

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

#restore(path, rev) ⇒ Object

Restore a file to a specific revision

Parameters:

  • path (String)

    The path to the file you want to restore.

  • rev (String)

    The revision to restore for the file.



12
13
14
15
16
17
# File 'lib/dropbox_api/endpoints/files/restore.rb', line 12

add_endpoint :restore do |path, rev|
  perform_request({
    :path => path,
    :rev => rev
  })
end