Class: BrickFTP::RESTfulAPI::GetBundleZip
- Inherits:
-
Object
- Object
- BrickFTP::RESTfulAPI::GetBundleZip
- Includes:
- Command
- Defined in:
- lib/brick_ftp/restful_api/get_bundle_zip.rb
Overview
Download entire bundle as ZIP
Params
PARAMETER | TYPE | DESCRIPTION |
---|---|---|
code, | string | Unique code string identifier for the bundle. |
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::BundleZip
Provides a download URL that will enable you to download all the files in a bundle as a single ZIP.
Methods included from Command
Instance Method Details
#call(params) ⇒ BrickFTP::Types::BundleZip
Provides a download URL that will enable you to download all the files in a bundle as a single ZIP.
The download URLs can be downloaded using an HTTP GET to the same hostname providing the download_uri as the URL path. This will be routed by our frontend proxies to our ZIP server that will stream the ZIP. The ZIP download link is valid for 3 minutes.
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.
41 42 43 44 45 |
# File 'lib/brick_ftp/restful_api/get_bundle_zip.rb', line 41 def call(params) res = client.post('/api/rest/v1/bundles/zip.json', params.to_h.compact) BrickFTP::Types::BundleZip.new(**res.symbolize_keys) end |