Class: Yelp::Endpoint::PhoneSearch
- Inherits:
-
Object
- Object
- Yelp::Endpoint::PhoneSearch
- Defined in:
- lib/yelp/endpoint/phone_search.rb
Constant Summary collapse
- PATH =
'/v2/phone_search/'
Instance Method Summary collapse
-
#initialize(client) ⇒ PhoneSearch
constructor
A new instance of PhoneSearch.
-
#phone_search(phone, options = {}) ⇒ Response::PhoneSearch
Make a request to the business endpoint on the API.
Constructor Details
#initialize(client) ⇒ PhoneSearch
Returns a new instance of PhoneSearch.
10 11 12 |
# File 'lib/yelp/endpoint/phone_search.rb', line 10 def initialize(client) @client = client end |
Instance Method Details
#phone_search(phone, options = {}) ⇒ Response::PhoneSearch
Make a request to the business endpoint on the API
29 30 31 32 33 34 |
# File 'lib/yelp/endpoint/phone_search.rb', line 29 def phone_search(phone, ={}) params = {phone: phone} params.merge!() Response::PhoneSearch.new(JSON.parse(phone_search_request(params).body)) end |