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) ⇒ 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
25 26 27 28 |
# File 'lib/foursquare2/photos.rb', line 25 def add_photo(={}) response = connection.post('photos/add', ) return_error_or_body(response, response.body.response.photo) end |
#photo(photo_id) ⇒ Object
Retrieve a photo
8 9 10 11 |
# File 'lib/foursquare2/photos.rb', line 8 def photo(photo_id) response = connection.get("photos/#{photo_id}") return_error_or_body(response, response.body.response.photo) end |
#venue_photos(venue_id, options = {:group => 'venue'}) ⇒ Object
Retrieve photos for a venue
37 38 39 40 41 42 |
# File 'lib/foursquare2/photos.rb', line 37 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 |