Class: Barrio::Client
- Inherits:
-
RocketPants::Client
- Object
- RocketPants::Client
- Barrio::Client
show all
- Defined in:
- lib/barrio-client.rb
Defined Under Namespace
Classes: Category, City, ContactInfo, Location, LocationRating, Neighborhood, PhysicalLocation, Picture, PictureInformation, PictureSizes, User
Instance Attribute Summary collapse
Instance Method Summary
collapse
Constructor Details
#initialize(client_id) ⇒ Client
Returns a new instance of Client.
12
13
14
|
# File 'lib/barrio-client.rb', line 12
def initialize(client_id)
@client_id = client_id
end
|
Instance Attribute Details
#client_id ⇒ Object
Returns the value of attribute client_id.
10
11
12
|
# File 'lib/barrio-client.rb', line 10
def client_id
@client_id
end
|
Instance Method Details
#location(id, options = {}) ⇒ Object
95
96
97
|
# File 'lib/barrio-client.rb', line 95
def location(id, options = {})
get "locations/#{id}", :transformer => Location, :extra_query => options.merge(:client_id => client_id)
end
|
#location_picture(location_id, picture_id, options = {}) ⇒ Object
103
104
105
|
# File 'lib/barrio-client.rb', line 103
def location_picture(location_id, picture_id, options = {})
get "locations/#{location_id}/pictures/#{picture_id}", :transformer => Picture, :extra_query => options.merge(:client_id => client_id)
end
|
#location_pictures(location_id, options = {}) ⇒ Object
99
100
101
|
# File 'lib/barrio-client.rb', line 99
def location_pictures(location_id, options = {})
get "locations/#{location_id}/pictures", :transformer => Picture, :extra_query => options.merge(:client_id => client_id)
end
|
#locations(options = {}) ⇒ Object
91
92
93
|
# File 'lib/barrio-client.rb', line 91
def locations(options = {})
get 'locations', :transformer => Location, :extra_query => options.merge(:client_id => client_id)
end
|