Class: DropboxApi::Endpoints::Sharing::GetSharedLinkMetadata

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

Constant Summary collapse

Method =
:post
Path =
'/2/sharing/get_shared_link_metadata'.freeze
ResultType =
DropboxApi::Metadata::SharedLinkMetadata
ErrorType =
DropboxApi::Errors::SharedLinkError

Instance Method Summary collapse

Methods included from OptionsValidator

#validate_options

Methods inherited from Rpc

#build_request, #initialize, #request_body

Methods inherited from Base

add_endpoint

Constructor Details

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

Instance Method Details

Get the Metadata for a shared link

If a preview url is given, returns the shared file or folder that is represent by that link.

Options Hash (options):

  • path (String)

    If the shared link is to a folder, this parameter can be used to retrieve the metadata for a specific file or sub-folder in this folder. A relative path should be used.

  • link_password (String)

    If the shared link has a password, this parameter can be used.

Returns:

  • (SharedFileMembers)

22
23
24
25
26
27
28
# File 'lib/dropbox_api/endpoints/sharing/get_shared_link_metadata.rb', line 22

add_endpoint :get_shared_link_metadata do |preview_link, options = {}|
  validate_options([:path, :link_password], options)

  perform_request options.merge(
    :url => preview_link
  )
end