Class: Datashake::ReviewScraper::V2::Profiles::Job
- Inherits:
-
Object
- Object
- Datashake::ReviewScraper::V2::Profiles::Job
- Defined in:
- lib/datashake-ruby-sdk/review_scraper/v2/profiles/job.rb
Constant Summary collapse
- PATH =
"api/v2/profiles/jobs"
Instance Method Summary collapse
- #fetch ⇒ Object
-
#initialize(version) ⇒ Job
constructor
A new instance of Job.
- #job_id(job_id) ⇒ Object
Constructor Details
#initialize(version) ⇒ Job
Returns a new instance of Job.
10 11 12 13 |
# File 'lib/datashake-ruby-sdk/review_scraper/v2/profiles/job.rb', line 10 def initialize(version) @version = version @params = {} end |
Instance Method Details
#fetch ⇒ Object
21 22 23 24 25 26 |
# File 'lib/datashake-ruby-sdk/review_scraper/v2/profiles/job.rb', line 21 def fetch path = "#{PATH}/#{params[:job_id]}" response = version.fetch(method: :get, path: path) Datashake::ReviewScraper::V2::JobInstance.new(response) end |
#job_id(job_id) ⇒ Object
15 16 17 18 19 |
# File 'lib/datashake-ruby-sdk/review_scraper/v2/profiles/job.rb', line 15 def job_id(job_id) @params[:job_id] = job_id self end |