Class: Hyperpublic::Categories

Inherits:
Base
  • Object
show all
Extended by:
Forwardable
Defined in:
lib/hyperpublic/categories.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Base

#photos, #search_neighborhoods, #search_tags

Constructor Details

#initialize(client) ⇒ Categories

Returns a new instance of Categories.



8
9
10
# File 'lib/hyperpublic/categories.rb', line 8

def initialize(client)
  @client = client
end

Instance Attribute Details

#clientObject (readonly)

Returns the value of attribute client.



6
7
8
# File 'lib/hyperpublic/categories.rb', line 6

def client
  @client
end

Instance Method Details

#find(params = {}) ⇒ Object



12
13
14
15
16
# File 'lib/hyperpublic/categories.rb', line 12

def find(params={})
  q = Addressable::URI.new
  q.query_values = stringify(params)
  perform_get("/categories#{("?" + q.query) unless q.query.empty?}")
end