Security News
Fluent Assertions Faces Backlash After Abandoning Open Source Licensing
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
thewebfellas-flickr_fu
Advanced tools
= flickr-fu
== Contact
Author: Ben Wyrosdick Email: ben [at] commonthread.com Lighthouse: http://commonthread.lighthouseapp.com/projects/12069-flickr_fu/overview Main Repository: http://github.com/commonthread/flickr_fu/tree/master
== Getting Started
You need to first get an API key as detailed here:
http://www.flickr.com/services/api/misc.api_keys.html
== Installation
sudo gem install flickr-fu
== Documentation
RDoc Documentation can be found here:
http://www.commonthread.com/projects/flickr_fu/rdoc/
== Authorization
To authorise your application to access Flickr using your API key you will need to access a specific URL.
To generate this URL run the following and when presented with the URL access it from your browser. Confirm the application has permission at the level you have specified.
Finally, cache the token (this will create the token cache file)
If you have an invalid API key you will see errors such as:
"100: Invalid API Key"
If you don't follow the process below to authorise your application you will see errors such as:
"98: Login failed / Invalid auth token" or "99: User not logged in / Insufficient permissions"
== Authorization Example
require 'flickr_fu'
flickr = Flickr.new('flickr.yml')
puts "visit the following url, then click once you have authorized:"
puts flickr.auth.url(:write)
gets
flickr.auth.cache_token
== Search Example
require 'flickr_fu'
flickr = Flickr.new('flickr.yml')
photos = flickr.photos.search(:tags => 'ruby-flickr')
puts "found #{photos.size} photo(s)"
photos.each do |photo| puts photo.title puts photo.description unless [nil, ''].include?(photo.description) [:square, :thumbnail, :small, :medium, :large, :original].each do |size| puts "#{size}: #{photo.url(size)}" end puts "comments: #{photo.comments.size}" photo.comments.each do |comment| intro = "#{comment.author_name} says - " puts "#{intro}"#{comment.comment.gsub("\n", "\n"+(" "*intro.length))}"" end puts "notes: #{photo.notes.size}" photo.notes.each do |note| puts "[#{note.x},#{note.y} ~ #{note.width}x#{note.height}] - "#{note.note}"" end puts puts end
== Another Search Example
If searching for photos by user id then you need to specify the 'alias' - without intervention this is usually set by Flickr and is an alphanumeric string.
To find out the user id for a given user, you can use the tool at:
And replace the line in the above sample to query on user id:
photos = flickr.photos.search(:user_id => 'your_user_id_here')
== Patch Contributers
Chris Ledet Maciej Biłas Mike Perham Chris Anderton
FAQs
Unknown package
We found that thewebfellas-flickr_fu demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
Research
Security News
Socket researchers uncover the risks of a malicious Python package targeting Discord developers.
Security News
The UK is proposing a bold ban on ransomware payments by public entities to disrupt cybercrime, protect critical services, and lead global cybersecurity efforts.