Module: Foursquare2::Photos
- Included in:
- Client
- Defined in:
- lib/foursquare2/photos.rb
Instance Method Summary collapse
-
#add_photo(options = {}) ⇒ Object
Add a photo.
-
#photo(photo_id, options = {}) ⇒ Object
Retrieve a photo.
-
#venue_photos(venue_id, options = {:group => 'venue'}) ⇒ Object
Retrieve photos for a venue.
Instance Method Details
#add_photo(options = {}) ⇒ Object
Add a photo
27 28 29 30 |
# File 'lib/foursquare2/photos.rb', line 27 def add_photo(={}) response = connection.post('photos/add', ) return_error_or_body(response, response.body.response.photo) end |
#photo(photo_id, options = {}) ⇒ Object
Retrieve a photo
8 9 10 11 12 13 |
# File 'lib/foursquare2/photos.rb', line 8 def photo(photo_id, ={}) response = connection.get do |req| req.url "photos/#{photo_id}", end return_error_or_body(response, response.body.response.photo) end |
#venue_photos(venue_id, options = {:group => 'venue'}) ⇒ Object
Retrieve photos for a venue
39 40 41 42 43 44 |
# File 'lib/foursquare2/photos.rb', line 39 def venue_photos(venue_id, = {:group => 'venue'}) response = connection.get do |req| req.url "venues/#{venue_id}/photos", end return_error_or_body(response, response.body.response.photos) end |