Add this line to your application's Gemfile:
gem 'flickrify'
And then execute:
$ bundle
Or install it yourself as:
$ gem install flickrify
You need to first get an API key as detailed here:
http://www.flickr.com/services/api/misc.api_keys.html
require 'flikrify'
params = { api_key: "< FLickr API KEY>",
shared_secret: "< FLickr API Secret>",
width: 150,
height: 200,
path: "< path to save photos >"
}
photos = Flickrify.search_photos(params)
If searching for photos by specific search terms then you need to specify the 'search_terms'
require 'flikrify'
params = { api_key: "< FLickr API KEY>",
shared_secret: "< FLickr API Secret>",
search_terms: ["weather", "maps", "news", "calculator", "dictionary", "movies", "horoscope", "games", "love", "prince"],
width: 150,
height: 200,
path: "< path to save photos >"
}
photos = Flickrify.search_photos(params)
Bug reports and pull requests are welcome on GitHub at https://github.com/attiq/flickrify. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the Contributor Covenant code of conduct.