Class: SelectPdf::AsyncJobClient
- Defined in:
- lib/selectpdf.rb
Overview
Get the result of an asynchronous call.
Instance Attribute Summary
Attributes inherited from ApiClient
#api_async_endpoint, #api_endpoint, #api_web_elements_endpoint, #async_calls_max_pings, #async_calls_ping_interval, #number_of_pages
Instance Method Summary collapse
-
#initialize(api_key, job_id) ⇒ AsyncJobClient
constructor
Construct the async job client.
-
#result ⇒ Object
Get result of the asynchronous job.
Constructor Details
#initialize(api_key, job_id) ⇒ AsyncJobClient
Construct the async job client.
1510 1511 1512 1513 1514 1515 |
# File 'lib/selectpdf.rb', line 1510 def initialize(api_key, job_id) super() @api_endpoint = 'https://selectpdf.com/api2/asyncjob/' @parameters['key'] = api_key @parameters['job_id'] = job_id end |
Instance Method Details
#result ⇒ Object
Get result of the asynchronous job.
1520 1521 1522 1523 1524 1525 1526 |
# File 'lib/selectpdf.rb', line 1520 def result result = perform_post return result if @job_id.nil? || @job_id.empty? return nil end |