Class: Enigma::Export
- Defined in:
- lib/enigma/endpoints/export.rb
Overview
The export endpoint has no filtering, but it returns a URL where the download will eventually be available. This client will return a ‘Download` object which can be asked to go get the file
Instance Attribute Summary collapse
-
#download ⇒ Object
Returns the value of attribute download.
-
#unzip ⇒ Object
Returns the value of attribute unzip.
Attributes inherited from Endpoint
Instance Method Summary collapse
-
#request ⇒ Download
The API request responds with a URL to poll until it’s ready.
Methods inherited from Endpoint
descendants, #initialize, #path, #serialize_search, #serialize_select, #serialize_where, url_chunk, #url_chunk
Constructor Details
This class inherits a constructor from Enigma::Endpoint
Instance Attribute Details
#download ⇒ Object
Returns the value of attribute download.
8 9 10 |
# File 'lib/enigma/endpoints/export.rb', line 8 def download @download end |
#unzip ⇒ Object
Returns the value of attribute unzip.
8 9 10 |
# File 'lib/enigma/endpoints/export.rb', line 8 def unzip @unzip end |
Instance Method Details
#request ⇒ Download
The API request responds with a URL to poll until it’s ready. Create a new download object with that URL and return it
15 16 17 18 19 20 |
# File 'lib/enigma/endpoints/export.rb', line 15 def request req = Typhoeus::Request.new(url, method: :get, params: params).run Enigma.logger.info req.body res = Response.parse(req) Download.new(res) end |