Skip to content

Instantly share code, notes, and snippets.

@benbonnet
Created May 28, 2009 14:06
Show Gist options
  • Save benbonnet/119322 to your computer and use it in GitHub Desktop.
Save benbonnet/119322 to your computer and use it in GitHub Desktop.
@photoset_id = params[:id]
api_key = "xxxxx"
method = "flickr.photosets.getPhotos"
remote_url = "http://api.flickr.com/services/rest/?method=#{method}&api_key=#{api_key}&photoset_id=#{@photoset_id}"
@doc = Hpricot.parse(open(remote_url))
*******
- @doc.search('photo').collect do |e|
- id = e['id']
- owner = e['owner']
- title = e['title']
- farm = e['farm']
- server = e['server']
- id = e['id']
- secret = e['secret']
- small_url = "http://farm#{farm}.static.flickr.com/#{server}/#{id}_#{secret}_s.jpg"
- photo_url = "http://farm#{farm}.static.flickr.com/#{server}/#{id}_#{secret}.jpg" #supression du suffixe
bla bla...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment