Module: EyeEmConnector::Client::Albums
- Included in:
- EyeEmConnector::Client
- Defined in:
- lib/EyeEmConnector/models/albums.rb
Instance Method Summary collapse
- #album(id, options = {}) ⇒ Object
- #album_contributor(album_id, contributer_id, options = {}) ⇒ Object
- #album_contributors(id, options = {}) ⇒ Object
- #album_liker(album_id, liker_id, options = {}) ⇒ Object
- #album_likers(id, options = {}) ⇒ Object
- #album_photos(id, options = {}) ⇒ Object
- #albums(options = {}) ⇒ Object
-
#albums_recommended(options = {}) ⇒ Object
for the options of different albums endpoints, see github.com/eyeem/Public-API/wiki/Albums.
-
#like_album(album_id, liker_id) ⇒ Object
for adding photo to an album see add_photo_to_album in photos.rb.
-
#share_album(album_id, services) ⇒ Object
POST.
-
#unlike_album(album_id, liker_id) ⇒ Object
to remove photo from an albums see remove_photo_to_album in photos.rb.
Instance Method Details
#album(id, options = {}) ⇒ Object
17 18 19 20 |
# File 'lib/EyeEmConnector/models/albums.rb', line 17 def album(id,={}) response = get('albums/'+id.to_s,) response.body end |
#album_contributor(album_id, contributer_id, options = {}) ⇒ Object
41 42 43 |
# File 'lib/EyeEmConnector/models/albums.rb', line 41 def album_contributor(album_id,contributer_id,={}) response = get("albums/#{album_id}/contributors/#{contributer_id}",,true) end |
#album_contributors(id, options = {}) ⇒ Object
32 33 34 35 |
# File 'lib/EyeEmConnector/models/albums.rb', line 32 def album_contributors(id,={}) response = get('albums/'+id.to_s+'/contributors',) response.body end |
#album_liker(album_id, liker_id, options = {}) ⇒ Object
37 38 39 |
# File 'lib/EyeEmConnector/models/albums.rb', line 37 def album_liker(album_id,liker_id,={}) response = get("albums/#{album_id}/likers/#{liker_id}",,true) end |
#album_likers(id, options = {}) ⇒ Object
27 28 29 30 |
# File 'lib/EyeEmConnector/models/albums.rb', line 27 def album_likers(id,={}) response = get('albums/'+id.to_s+'/likers',) response.body end |
#album_photos(id, options = {}) ⇒ Object
22 23 24 25 |
# File 'lib/EyeEmConnector/models/albums.rb', line 22 def album_photos(id,={}) response = get('albums/'+id.to_s+'/photos',) response.body end |
#albums(options = {}) ⇒ Object
12 13 14 15 |
# File 'lib/EyeEmConnector/models/albums.rb', line 12 def albums(={}) response = get('albums',) response.body end |
#albums_recommended(options = {}) ⇒ Object
for the options of different albums endpoints, see github.com/eyeem/Public-API/wiki/Albums
7 8 9 10 |
# File 'lib/EyeEmConnector/models/albums.rb', line 7 def albums_recommended(={}) response = get('albums/recommended',) response.body end |
#like_album(album_id, liker_id) ⇒ Object
for adding photo to an album see add_photo_to_album in photos.rb
49 50 51 |
# File 'lib/EyeEmConnector/models/albums.rb', line 49 def like_album(album_id,liker_id) response = put("albums/#{album_id}/likers/#{liker_id}",true) end |
#share_album(album_id, services) ⇒ Object
POST
55 56 57 |
# File 'lib/EyeEmConnector/models/albums.rb', line 55 def share_album(album_id,services) #available services: twitter,facebook,tumblr as comma separated string response = post("albums/#{album_id}/share",.merge(:services => services),true) end |
#unlike_album(album_id, liker_id) ⇒ Object
to remove photo from an albums see remove_photo_to_album in photos.rb
63 64 65 |
# File 'lib/EyeEmConnector/models/albums.rb', line 63 def unlike_album(album_id,liker_id) response = delete("albums/#{album_id}/likers/#{liker_id}",true) end |