Class: Hyperpublic::Places
- Extended by:
- Forwardable
- Defined in:
- lib/hyperpublic/places.rb
Instance Attribute Summary collapse
-
#client ⇒ Object
readonly
Returns the value of attribute client.
Instance Method Summary collapse
- #create(options = {}) ⇒ Object
- #find(params) ⇒ Object
-
#initialize(client) ⇒ Places
constructor
A new instance of Places.
Methods inherited from Base
#photos, #search_neighborhoods, #search_tags
Constructor Details
#initialize(client) ⇒ Places
Returns a new instance of Places.
8 9 10 |
# File 'lib/hyperpublic/places.rb', line 8 def initialize(client) @client = client end |
Instance Attribute Details
#client ⇒ Object (readonly)
Returns the value of attribute client.
6 7 8 |
# File 'lib/hyperpublic/places.rb', line 6 def client @client end |
Instance Method Details
#create(options = {}) ⇒ Object
22 23 24 |
# File 'lib/hyperpublic/places.rb', line 22 def create(={}) perform_post("/places", :body => ) end |
#find(params) ⇒ Object
12 13 14 15 16 17 18 19 20 |
# File 'lib/hyperpublic/places.rb', line 12 def find(params) if params.is_a? String perform_get("/places/#{params}") else q = Addressable::URI.new q.query_values = stringify(params) perform_get("/places?#{q.query}") end end |