Module: FoursquareNext::Photos
- Included in:
- Client
- Defined in:
- lib/foursquare_next/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
26 27 28 29 |
# File 'lib/foursquare_next/photos.rb', line 26 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
7 8 9 10 11 12 |
# File 'lib/foursquare_next/photos.rb', line 7 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
38 39 40 41 42 43 |
# File 'lib/foursquare_next/photos.rb', line 38 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 |