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'
ResultType =
DropboxApi::Results::VoidResult
ErrorType =
DropboxApi::Errors::DeleteError

Instance Method Summary collapse

Methods included from OptionsValidator

#validate_options

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

#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.



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

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

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