Class: DropboxApi::Endpoints::Files::Delete

Inherits:
Rpc
  • Object
show all
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

Methods inherited from Rpc

#build_request, #initialize

Methods inherited from Base

add_endpoint

Constructor Details

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

Instance Method Details

#delete(path) ⇒ 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 FileMetadata or FolderMetadata for the item at time of deletion, and not a DeletedMetadata object.

Parameters:

  • path (String)

    Path in the user’s Dropbox to delete.



18
19
20
21
22
# File 'lib/dropbox_api/endpoints/files/delete.rb', line 18

add_endpoint :delete do |path|
  perform_request({
    :path => path
  })
end