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'
ResultType =
DropboxApi::Metadata::File
ErrorType =
DropboxApi::Errors::RestoreError

Instance Method Summary collapse

Methods inherited from Rpc

#build_connection, #build_request, #request_body

Methods inherited from Base

add_endpoint, #initialize

Constructor Details

This class inherits a constructor from DropboxApi::Endpoints::Base

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.



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

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