Module: EyeEmConnector::Client::Albums

Included in:
EyeEmConnector::Client
Defined in:
lib/EyeEmConnector/models/albums.rb

Instance Method Summary collapse

Instance Method Details

#album(id, options = {}) ⇒ Object



17
18
19
20
# File 'lib/EyeEmConnector/models/albums.rb', line 17

def album(id,options={})
  response = get('albums/'+id.to_s,options)
  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,options={})
  response = get("albums/#{album_id}/contributors/#{contributer_id}",options,true)
end

#album_contributors(id, options = {}) ⇒ Object



32
33
34
35
# File 'lib/EyeEmConnector/models/albums.rb', line 32

def album_contributors(id,options={})
  response = get('albums/'+id.to_s+'/contributors',options)
  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,options={})
  response = get("albums/#{album_id}/likers/#{liker_id}",options,true)
end

#album_likers(id, options = {}) ⇒ Object



27
28
29
30
# File 'lib/EyeEmConnector/models/albums.rb', line 27

def album_likers(id,options={})
  response = get('albums/'+id.to_s+'/likers',options)
  response.body
end

#album_photos(id, options = {}) ⇒ Object



22
23
24
25
# File 'lib/EyeEmConnector/models/albums.rb', line 22

def album_photos(id,options={})
  response = get('albums/'+id.to_s+'/photos',options)
  response.body
end

#albums(options = {}) ⇒ Object



12
13
14
15
# File 'lib/EyeEmConnector/models/albums.rb', line 12

def albums(options={})
  response = get('albums',options)
  response.body
end

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(options={})
  response = get('albums/recommended',options)
  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",options.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