Class: Datashake::ReviewScraper::V2::Profiles::Jobs

Inherits:
Object
  • Object
show all
Defined in:
lib/datashake-ruby-sdk/review_scraper/v2/profiles/jobs.rb

Constant Summary collapse

PATH =
"api/v2/profiles/jobs"

Instance Method Summary collapse

Constructor Details

#initialize(version) ⇒ Jobs

Returns a new instance of Jobs.



10
11
12
13
# File 'lib/datashake-ruby-sdk/review_scraper/v2/profiles/jobs.rb', line 10

def initialize(version)
  @version = version
  @params = {}
end

Instance Method Details

#crawl_status(crawl_status) ⇒ Object



21
22
23
24
25
# File 'lib/datashake-ruby-sdk/review_scraper/v2/profiles/jobs.rb', line 21

def crawl_status(crawl_status)
  @params[:crawl_status] = crawl_status

  self
end

#fetchObject



39
40
41
42
43
# File 'lib/datashake-ruby-sdk/review_scraper/v2/profiles/jobs.rb', line 39

def fetch
  response = version.fetch(method: :get, path: PATH, params: params)

  Datashake::ReviewScraper::V2::JobsInstance.new(response)
end

#from_created_at(from_created_at) ⇒ Object



15
16
17
18
19
# File 'lib/datashake-ruby-sdk/review_scraper/v2/profiles/jobs.rb', line 15

def from_created_at(from_created_at)
  @params[:from_created_at] = from_created_at

  self
end

#page(page) ⇒ Object



27
28
29
30
31
# File 'lib/datashake-ruby-sdk/review_scraper/v2/profiles/jobs.rb', line 27

def page(page)
  @params[:page] = page

  self
end

#per_page(per_page) ⇒ Object



33
34
35
36
37
# File 'lib/datashake-ruby-sdk/review_scraper/v2/profiles/jobs.rb', line 33

def per_page(per_page)
  @params[:per_page] = per_page

  self
end