ProductPromotion
Logo

Ruby

made by https://0x3d.site

GitHub - RaVbaker/flickr: An update of Scott Raymond's insanely easy flickr library
An update of Scott Raymond's insanely easy flickr library - RaVbaker/flickr
Visit Site

GitHub - RaVbaker/flickr: An update of Scott Raymond's insanely easy flickr library

GitHub - RaVbaker/flickr: An update of Scott Raymond's insanely easy flickr library

flickr.rb

http://github.com/RaVbaker/flickr

Gem Version

DESCRIPTION:

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

It's a simple interface for using Flickr API - https://www.flickr.com/services/api/

FEATURES:

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.

SYNOPSIS:

require 'flickr'
flickr = Flickr.new('some_flickr_api_key')    # create a flickr client (get an API key from http://api.flickr.com/services/api/)
user = flickr.users('[email protected]')   # lookup a user
user.name                                     # get the user's name
user.location                                 # and location
user.photos                                   # 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 = flickr.photos                  # 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.
File.open(photo.filename, 'w') do |file|
  file.puts p.file                            # save the photo to a local file
end
flickr.photos.each do |p|                     # get the last 100 public photos...
  File.open(p.filename, 'w') do |f|
    f.puts p.file('Square')                   # ...and save a local copy of their square thumbnail
  end
end

REQUIREMENTS:

  • Xmlsimple gem

INSTALLATION:

Add this line to your application's Gemfile:

gem 'flickr.rb'

And then execute:

$ bundle

Or install it yourself as:

$ gem install flickr.rb

CONFIGURING:

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

flickr = Flickr.new(
  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:

development:
  api_key: SomeLongApiKey
  shared_secret: secret!
  auth_token: authSecretToken

beta:
  api_key: SomeLongApiKeyBeta
  shared_secret: secretBeta!
  auth_token: authSecretTokenBeta

DOCUMENTATION

Full documentation: ravbaker.github.io/flickr.

CONTRIBUTING

  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

THANKS

  • Scott Raymond
  • Patrick Plattes
  • Chris Taggart

LICENSE

MIT License , see LICENSE for more details.

© 2010 - 2014 Rafal "RaVbaker" Piekarski

More Resources
to explore the angular.

mail [email protected] to add your project or resources here 🔥.

Related Articles
to learn about angular.

FAQ's
to learn more about Angular JS.

mail [email protected] to add more queries here 🔍.

More Sites
to check out once you're finished browsing here.

0x3d
https://www.0x3d.site/
0x3d is designed for aggregating information.
NodeJS
https://nodejs.0x3d.site/
NodeJS Online Directory
Cross Platform
https://cross-platform.0x3d.site/
Cross Platform Online Directory
Open Source
https://open-source.0x3d.site/
Open Source Online Directory
Analytics
https://analytics.0x3d.site/
Analytics Online Directory
JavaScript
https://javascript.0x3d.site/
JavaScript Online Directory
GoLang
https://golang.0x3d.site/
GoLang Online Directory
Python
https://python.0x3d.site/
Python Online Directory
Swift
https://swift.0x3d.site/
Swift Online Directory
Rust
https://rust.0x3d.site/
Rust Online Directory
Scala
https://scala.0x3d.site/
Scala Online Directory
Ruby
https://ruby.0x3d.site/
Ruby Online Directory
Clojure
https://clojure.0x3d.site/
Clojure Online Directory
Elixir
https://elixir.0x3d.site/
Elixir Online Directory
Elm
https://elm.0x3d.site/
Elm Online Directory
Lua
https://lua.0x3d.site/
Lua Online Directory
C Programming
https://c-programming.0x3d.site/
C Programming Online Directory
C++ Programming
https://cpp-programming.0x3d.site/
C++ Programming Online Directory
R Programming
https://r-programming.0x3d.site/
R Programming Online Directory
Perl
https://perl.0x3d.site/
Perl Online Directory
Java
https://java.0x3d.site/
Java Online Directory
Kotlin
https://kotlin.0x3d.site/
Kotlin Online Directory
PHP
https://php.0x3d.site/
PHP Online Directory
React JS
https://react.0x3d.site/
React JS Online Directory
Angular
https://angular.0x3d.site/
Angular JS Online Directory