Class: DropboxApi::Endpoints::Files::Delete
- Includes:
- OptionsValidator
- Defined in:
- lib/dropbox_api/endpoints/files/delete.rb
Constant Summary collapse
- Method =
:post
- Path =
"/2/files/delete".freeze
- ResultType =
DropboxApi::Metadata::Resource
- ErrorType =
DropboxApi::Errors::DeleteError
Instance Method Summary collapse
-
#delete(path, options = {}) ⇒ Object
Delete the file or folder at a given path.
Methods included from OptionsValidator
Methods inherited from Rpc
#build_request, #initialize, #request_body
Methods inherited from Base
Constructor Details
This class inherits a constructor from DropboxApi::Endpoints::Rpc
Instance Method Details
#delete(path, options = {}) ⇒ Object
Delete the file or folder at a given path.
If the path is a folder, all its contents will be deleted too.
A successful response indicates that the file or folder was deleted. The returned metadata will be the corresponding Metadata::File or Metadata::Folder for the item at time of deletion, and not a Metadata::Deleted object.
24 25 26 27 28 29 30 |
# File 'lib/dropbox_api/endpoints/files/delete.rb', line 24 add_endpoint :delete do |path, = {}| ([:parent_rev], ) perform_request .merge({ :path => path }) end |