Class: Yelp::Endpoint::Business
- Inherits:
-
Object
- Object
- Yelp::Endpoint::Business
- Defined in:
- lib/yelp/endpoint/business.rb
Constant Summary collapse
- PATH =
'/v2/business/'
Instance Method Summary collapse
-
#business(id, locale = {}) ⇒ Response::Business
Make a request to the business endpoint on the API.
-
#initialize(client) ⇒ Business
constructor
A new instance of Business.
Constructor Details
#initialize(client) ⇒ Business
Returns a new instance of Business.
11 12 13 |
# File 'lib/yelp/endpoint/business.rb', line 11 def initialize(client) @client = client end |
Instance Method Details
#business(id, locale = {}) ⇒ Response::Business
Make a request to the business endpoint on the API
25 26 27 |
# File 'lib/yelp/endpoint/business.rb', line 25 def business(id, locale = {}) Response::Business.new(JSON.parse(business_request(id, locale).body)) end |