Class: DropboxApi::Endpoints::Files::GetTemporaryLink

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

Constant Summary collapse

Method =
:post
Path =
"/2/files/get_temporary_link".freeze
ResultType =
DropboxApi::Results::GetTemporaryLinkResult
ErrorType =
DropboxApi::Errors::GetMetadataError

Instance Method Summary collapse

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 a temporary link to stream content of a file. This link will expire in four hours and afterwards you will get 410 Gone. Content-Type of the link is determined automatically by the file's mime type.

Parameters:

  • path (String)

    The path to the file you want a temporary link to.



13
14
15
# File 'lib/dropbox_api/endpoints/files/get_temporary_link.rb', line 13

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