Class: Yelp::V1::Review::Request::Base

Inherits:
Yelp::V1::Request show all
Defined in:
lib/yelpster/v1/review/request/base.rb

Direct Known Subclasses

BoundingBox, GeoPoint, Location

Instance Attribute Summary collapse

Attributes inherited from Yelp::V1::Request

#response_format, #yws_id

Instance Method Summary collapse

Methods inherited from Yelp::V1::Request

#initialize, #pull_results

Methods inherited from Record

#initialize

Constructor Details

This class inherits a constructor from Yelp::V1::Request

Instance Attribute Details

#business_countObject (readonly)

specifies the number of businesses to return in the result set. default is 10. minimum value is 1 and maximum value is 20.


10
11
12
# File 'lib/yelpster/v1/review/request/base.rb', line 10

def business_count
  @business_count
end

#categoryObject (readonly)

optionally narrow the results by one or more categories. may be a single string value, or an Array of multiple values.


18
19
20
# File 'lib/yelpster/v1/review/request/base.rb', line 18

def category
  @category
end

#termObject (readonly)

string representing the name of business or search term being requested.


14
15
16
# File 'lib/yelpster/v1/review/request/base.rb', line 14

def term
  @term
end

Instance Method Details

#base_urlObject


20
21
22
# File 'lib/yelpster/v1/review/request/base.rb', line 20

def base_url
  'http://api.yelp.com/business_review_search'
end

#to_yelp_paramsObject


24
25
26
27
28
# File 'lib/yelpster/v1/review/request/base.rb', line 24

def to_yelp_params
  super.merge(:term => term,
              :num_biz_requested => business_count,
              :category => category)
end