Class: DropboxApi::Endpoints::Files::GetMetadata

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

Constant Summary collapse

Method =
:post
Path =
"/2/files/get_metadata".freeze
ResultType =
DropboxApi::Metadata::Resource
ErrorType =
DropboxApi::Errors::GetMetadataError

Instance Method Summary collapse

Methods included from OptionsValidator

#validate_options

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

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

Returns the metadata for a file or folder.

Note: Metadata for the root folder is unsupported.

Parameters:

  • path (String)

    The path of a file or folder on Dropbox.



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

add_endpoint :get_metadata do |path, options = {}|
  validate_options([:include_media_info, :include_deleted], options)

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