Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Ruby library to access flickr api.
Ruby

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
examples
lib
test
LICENSE
README.rdoc
flickraw.gemspec
flickraw_rdoc.rb
rakefile

README.rdoc

Flickraw

Flickraw is a library to access flickr api in a simple way. It maps exactly the methods described in the official api documentation. It also tries to present the data returned in a simple and intuitive way. The methods are fetched from flickr when loading the library by using introspection capabilities. So it is always up-to-date with regards to new methods added by flickr.

The rubyforge project : rubyforge.org/projects/flickraw

The github repository: github.com/hanklords/flickraw/tree/master

Installation

Type this in a console (you might need to be superuser)

gem install flickraw

You can recreate this documentation by typing this in the source directory:

rake rdoc

Usage

require 'flickraw'

list   = flickr.photos.getRecent

id     = list[0].id
secret = list[0].secret
info = flickr.photos.getInfo :photo_id => id, :secret => secret

info.title           # => "PICT986"
info.dates.taken     # => "2006-07-06 15:16:18"

sizes = flickr.photos.getSizes :photo_id => id

original = sizes.find {|s| s.label == 'Original' }
original.width       # => "800"

See the examples directory to find more examples.

Notes

If you want to use the api authenticated with several user at the same time, you must pass the authentication token explicitely each time. This is because it is keeping the authentication token internally. As an alternative, you can create new Flickr objects besides Object.flickr which is created for you. Use Flickr.new to this effect.

Something went wrong with that request. Please try again.