Class: DropboxApi::Endpoints::Files::GetMetadata
- Includes:
- OptionsValidator
- Defined in:
- lib/dropbox_api/endpoints/files/get_metadata.rb
Constant Summary collapse
- Method =
:post
- Path =
'/2/files/get_metadata'
- ResultType =
DropboxApi::Metadata::Resource
- ErrorType =
DropboxApi::Errors::GetMetadataError
Instance Method Summary collapse
-
#get_metadata(path, options = {}) ⇒ Object
Returns the metadata for a file or folder.
Methods included from OptionsValidator
Methods inherited from Rpc
#build_connection, #build_request, #request_body
Methods inherited from Base
Constructor Details
This class inherits a constructor from DropboxApi::Endpoints::Base
Instance Method Details
#get_metadata(path, options = {}) ⇒ Object
Returns the metadata for a file or folder.
Note: Metadata for the root folder is unsupported.
If you request the media_info
attribute, note that it could be set to
:pending
or nil
.
30 31 32 33 34 35 36 37 38 39 40 |
# File 'lib/dropbox_api/endpoints/files/get_metadata.rb', line 30 add_endpoint :get_metadata do |path, = {}| ([ :include_media_info, :include_deleted, :include_has_explicit_shared_members ], ) perform_request(.merge({ path: path })) end |