Class: Yelpify::Client
- Inherits:
-
Object
- Object
- Yelpify::Client
- Defined in:
- lib/yelpify/client.rb
Instance Attribute Summary collapse
-
#access_token ⇒ Object
readonly
Returns the value of attribute access_token.
Instance Method Summary collapse
- #business(id, data = nil) ⇒ Object
-
#initialize(access_token, search, business) ⇒ Client
constructor
A new instance of Client.
- #search(data) ⇒ Object
Constructor Details
#initialize(access_token, search, business) ⇒ Client
5 6 7 8 9 |
# File 'lib/yelpify/client.rb', line 5 def initialize(access_token, search, business) @search = search @business = business @access_token = access_token end |
Instance Attribute Details
#access_token ⇒ Object (readonly)
Returns the value of attribute access_token.
3 4 5 |
# File 'lib/yelpify/client.rb', line 3 def access_token @access_token end |
Instance Method Details
#business(id, data = nil) ⇒ Object
16 17 18 19 |
# File 'lib/yelpify/client.rb', line 16 def business(id, data=nil) url = @business.build_url(id, data) get(url) end |
#search(data) ⇒ Object
11 12 13 14 |
# File 'lib/yelpify/client.rb', line 11 def search(data) url = @search.build_url(data) get(url) end |