Skip to content
An update of Scott Raymond's insanely easy flickr library
Branch: master
Clone or download
Pull request Compare This branch is 52 commits ahead, 1 commit behind ctagg:master.
Type Name Latest commit message Commit time
Failed to load latest commit information.
test making api working with SSL - fixes #4 May 13, 2014
.DS_Store * Collection of photos returned by Flickr is now a PhotoCollection ra… Nov 28, 2008
.gitignore Get gem to build; Added :debug task to dump gemspec file Sep 10, 2008
.yardopts yard full support as documentation generator May 13, 2014
Changelog.txt New version 1.2.1 with fixed compatilibity for ruby 1.9.3 version Jun 29, 2014
Gemfile adding Bundler & making it work with latest versions of mocha&rake&rdoc Apr 17, 2014
Gemfile.lock New version 1.2.1 with fixed compatilibity for ruby 1.9.3 version Jun 29, 2014
Manifest.txt setting up MIT license and updating gemspec code and generator as bun… Apr 17, 2014 link to full documentation in YARD May 13, 2014
Rakefile yard full support as documentation generator May 13, 2014
TODO First step in updating to standard gem format (as per newgem created … May 12, 2008
init.rb correct init.rb for rails plugins - not assignment but function call May 15, 2010


Gem Version


An insanely easy interface to the Flickr photo-sharing service. By Scott Raymond. (& updated May 2008 by Chris Taggart, & maintained since May 2010 by me - Rafal Piekarski)

It's a simple interface for using Flickr API -


The flickr gem (famously featured in a RubyonRails screencast) had broken with Flickr's new authentication scheme and updated API. This has now been largely corrected, though not all current API calls are supported yet. If you need something let me know in pull requests.


require 'flickr'
flickr ='some_flickr_api_key')    # create a flickr client (get an API key from
user = flickr.users('')   # lookup a user                                     # get the user's name
user.location                                 # and location                                   # grab their collection of Photo objects...
user.groups                                   # ...the groups they're in...
user.contacts                                 # ...their contacts...
user.favorites                                # ...favorite photos...
user.photosets                                # ...their photo sets...
user.tags                                     # ...their tags...
user.popular_tags							  							# ...and their popular tags
recentphotos =                  # get the 100 most recent public photos
photo = recentphotos.first                    # or very most recent one
photo.url                                     # see its URL,
photo.title                                   # title,
photo.description                             # and description,
photo.owner                                   # and its owner., 'w') do |file|
  file.puts p.file                            # save the photo to a local file
end do |p|                     # get the last 100 public photos..., 'w') do |f|
    f.puts p.file('Square')                   # ...and save a local copy of their square thumbnail


  • Xmlsimple gem


Add this line to your application's Gemfile:

gem 'flickr.rb'

And then execute:

$ bundle

Or install it yourself as:

$ gem install flickr.rb


You can provide just a api_key'api_key') or full set of advanced configuration options:

flickr =
  api_key:       'your_api_key',
  shared_secret: 'shared_secret_code',
  auth_token:    'authSecretToken',
  verify_ssl:    true,
  ca_file:       '/path/to/cert.pem'

As you see you can turn off ssl verification (verify_ssl: false) or provide your own CA file (:ca_file option) for SSL verification. By default gem uses the OpenSSL::X509::DEFAULT_CERT_FILE definitions.

If you want to use this gem/plugin with Rails (for version 3) you can create configuration file in /config directory with specified api connection settings. For example:

  api_key: SomeLongApiKey
  shared_secret: secret!
  auth_token: authSecretToken

  api_key: SomeLongApiKeyBeta
  shared_secret: secretBeta!
  auth_token: authSecretTokenBeta


Full documentation:


  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request


  • Scott Raymond
  • Patrick Plattes
  • Chris Taggart


MIT License , see LICENSE for more details.

© 2010 - 2014 Rafal "RaVbaker" Piekarski

You can’t perform that action at this time.