Simply Flickr library in ruby

November 17, 2008

A long time ago, in a summer far, far away, I was working on Flickr integration in Viviti and found most of the ruby libraries I could find were for the old and now defunkt Flickr API. To solve this i created a very simple wrapper around their REST interface, and then fleshed it out a little bit to simplfy some of the more common things I needed to get done.

If anyone is in a similar boat needing to interface with Flickr via ruby, feel free to check out the repo on github. It's not a proper gem yet, but one day i'll get that fixed. If anyone uses it and finds missing peices (I know there are a bunch, since there is lots of stuff you can do with Flickr that I haven't needed to do yet), please send me patches! I like patches!

Usage is pretty simple: 

client = Flickr::Client.new( 'apikey' )
person = client.person( 'jerrett taylor' )
=> #<Flickr::Person:0x11e5e14 ...>
person.photosets.first.title
=> "Macro"
person.photosets.first.photos
=> [#<Flickr::Photo:0x116ab10 ...>
Any call that you need to make that is not already wrapped can be directly made via Flickr::Client#request( method, args ), which will return hpricot. 

Anyways, the git repo is here: simple-flickr. Enjoy!

Comments

There are no comments for this post.

No comments found

Add comment