Class: Datashake::ReviewScraper::V2::Profiles::Add

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

Constant Summary collapse

PATH =
"api/v2/profiles/add"

Instance Method Summary collapse

Constructor Details

#initialize(version) ⇒ Add

Returns a new instance of Add.



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

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

Instance Method Details

#blocks(blocks) ⇒ Object



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

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

  self
end

#callback(callback) ⇒ Object



51
52
53
54
55
# File 'lib/datashake-ruby-sdk/review_scraper/v2/profiles/add.rb', line 51

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

  self
end

#diff(diff) ⇒ Object



45
46
47
48
49
# File 'lib/datashake-ruby-sdk/review_scraper/v2/profiles/add.rb', line 45

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

  self
end

#external_identifier(id) ⇒ Object



57
58
59
60
61
# File 'lib/datashake-ruby-sdk/review_scraper/v2/profiles/add.rb', line 57

def external_identifier(id)
  @params[:external_identifier] = id

  self
end

#fetchObject



69
70
71
72
73
# File 'lib/datashake-ruby-sdk/review_scraper/v2/profiles/add.rb', line 69

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

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

#from_date(date) ⇒ Object



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

def from_date(date)
  @params[:from_date] = date

  self
end

#place_id(place_id) ⇒ Object



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

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

  self
end

#priority_job(bool) ⇒ Object



63
64
65
66
67
# File 'lib/datashake-ruby-sdk/review_scraper/v2/profiles/add.rb', line 63

def priority_job(bool)
  @params[:priority_job] = bool

  self
end

#query(query) ⇒ Object



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

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

  self
end

#url(url) ⇒ Object



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

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

  self
end