Class: Yelp::V2::Search::Request::Base
- Defined in:
- lib/yelped/v2/search/request/base.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#category_filter ⇒ Object
readonly
string specifying which business category to search in see www.yelp.com/developers/documentation/category_list for list of categories.
-
#cc ⇒ Object
readonly
————————— Locale Params ——————— string representing default country to use while parsing location field.
-
#claimed_filter ⇒ Object
readonly
boolean representing if business has claimed location not implemented by yelp as of 13-8-2011.
-
#lang ⇒ Object
readonly
string representing which language of reviews to return.
-
#limit ⇒ Object
readonly
integer representing number of business results to return.
-
#offset ⇒ Object
readonly
integer representing number of results to skip (for pagination).
-
#radius_filter ⇒ Object
readonly
integer specifying the search radius in meters.
-
#sort ⇒ Object
readonly
integer for specifying how to sort results Sort Mode: 0 = Best matched (default) 1 = Distance 2 = Highest rated see www.yelp.com/developers/documentation/v2/search_api for more info.
-
#term ⇒ Object
readonly
requested.
Attributes inherited from Request
#compress_response, #consumer_key, #consumer_secret, #response_format, #token, #token_secret
Instance Method Summary collapse
-
#base_url ⇒ Object
—————————————————————.
- #to_yelp_params ⇒ Object
Methods inherited from Request
Methods inherited from Record
Constructor Details
This class inherits a constructor from Yelp::V2::Request
Instance Attribute Details
#category_filter ⇒ Object (readonly)
string specifying which business category to search in see www.yelp.com/developers/documentation/category_list for list of categories
30 31 32 |
# File 'lib/yelped/v2/search/request/base.rb', line 30 def category_filter @category_filter end |
#cc ⇒ Object (readonly)
————————— Locale Params ——————— string representing default country to use while parsing location field
42 43 44 |
# File 'lib/yelped/v2/search/request/base.rb', line 42 def cc @cc end |
#claimed_filter ⇒ Object (readonly)
boolean representing if business has claimed location not implemented by yelp as of 13-8-2011
37 38 39 |
# File 'lib/yelped/v2/search/request/base.rb', line 37 def claimed_filter @claimed_filter end |
#lang ⇒ Object (readonly)
string representing which language of reviews to return
45 46 47 |
# File 'lib/yelped/v2/search/request/base.rb', line 45 def lang @lang end |
#limit ⇒ Object (readonly)
integer representing number of business results to return
14 15 16 |
# File 'lib/yelped/v2/search/request/base.rb', line 14 def limit @limit end |
#offset ⇒ Object (readonly)
integer representing number of results to skip (for pagination)
17 18 19 |
# File 'lib/yelped/v2/search/request/base.rb', line 17 def offset @offset end |
#radius_filter ⇒ Object (readonly)
integer specifying the search radius in meters
33 34 35 |
# File 'lib/yelped/v2/search/request/base.rb', line 33 def radius_filter @radius_filter end |
#sort ⇒ Object (readonly)
integer for specifying how to sort results Sort Mode:
0 = Best matched (default)
1 = Distance
2 = Highest rated
see www.yelp.com/developers/documentation/v2/search_api for more info
25 26 27 |
# File 'lib/yelped/v2/search/request/base.rb', line 25 def sort @sort end |
#term ⇒ Object (readonly)
requested.
11 12 13 |
# File 'lib/yelped/v2/search/request/base.rb', line 11 def term @term end |
Instance Method Details
#base_url ⇒ Object
48 49 50 |
# File 'lib/yelped/v2/search/request/base.rb', line 48 def base_url 'http://api.yelp.com/v2/search' end |
#to_yelp_params ⇒ Object
52 53 54 55 56 57 58 59 60 61 62 63 |
# File 'lib/yelped/v2/search/request/base.rb', line 52 def to_yelp_params super.merge(:term => term, :limit => limit, :offset => offset, :sort => sort, :category_filter => category_filter, :radius_filter => radius_filter, :claimed_filter => claimed_filter, :cc => cc, :lang => lang) end |