Exercise-1-2
# Try out the flickr.rb library http://redgreenblu.com/flickr/ # Use it to find interesting photos based on users or tags # store some of the information in a sqlite database require 'rubygems' require 'flickr' # insanely easy flickr library require 'sqlite3' # NOTE: create the sqlite3 database beforehand or do it in code. db = SQLite3::Database.new('flickr.db') flickr = Flickr.new dedi = flickr.users('dedi') criteria = { 'user_id' => dedi.id, 'tags' => 'itp', 'privacy_filter' => '1' } for photo in flickr.photos(criteria) db.execute("sql statement") end