Class: BrickFTP::RESTfulAPI::GetFileInBundle
- Inherits:
-
Object
- Object
- BrickFTP::RESTfulAPI::GetFileInBundle
- Includes:
- Command
- Defined in:
- lib/brick_ftp/restful_api/get_file_in_bundle.rb
Overview
Download one file in a bundle
Params
PARAMETER | TYPE | DESCRIPTION |
---|---|---|
code | string | Unique code string identifier for the bundle. |
path | string | |
password | string | Optional password to password-protect the bundle. This property is write-only. It cannot be retrieved via the API. |
Defined Under Namespace
Classes: Params
Instance Method Summary collapse
-
#call(params) ⇒ BrickFTP::Types::FileInBundle
Provides a download URL to download a single file in the bundle.
Methods included from Command
Instance Method Details
#call(params) ⇒ BrickFTP::Types::FileInBundle
Provides a download URL to download a single file in the bundle.
The download URL is a direct URL to Amazon S3 that has been signed by BrickFTP to provide temporary access to the file. The download links are valid for 3 minutes. For details on the attributes in the response body from this endpoint, please see The file object.
The password parameter is required only for bundles that are password-protected. If a bundle is password-protected and the password is missing or incorrect, an error message will specify that the correct password is required.
42 43 44 45 46 |
# File 'lib/brick_ftp/restful_api/get_file_in_bundle.rb', line 42 def call(params) res = client.post('/api/rest/v1/bundles/download.json', params.to_h.compact) BrickFTP::Types::FileInBundle.new(**res.symbolize_keys) end |