Class: DropboxApi::Endpoints::Files::PermanentlyDelete

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

Constant Summary collapse

Method =
:post
Path =
"/2/files/permanently_delete".freeze
ResultType =
DropboxApi::Results::VoidResult
ErrorType =
DropboxApi::Errors::DeleteError

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

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

Permanently delete the file or folder at a given path.

See https://www.dropbox.com/en/help/40

Note: This endpoint is only available for Dropbox Business apps.

Parameters:

  • path (String)

    Path in the user's Dropbox to delete.

Options Hash (options):

  • parent_rev (String)

    Perform delete if given "rev" matches the existing file's latest "rev". This field does not support deleting a folder.


20
21
22
23
24
25
26
# File 'lib/dropbox_api/endpoints/files/permanently_delete.rb', line 20

add_endpoint :permanently_delete do |path, options = {}|
  validate_options([:parent_rev], options)

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