Im building my first app in rails and I would like to call Flickr\'s API
I know I can use flickr-fu, rflickr or other gem but I want to do it myself from scratch to lear
include 'rubygems'
include 'httparty'
class Flickr
include HTTParty
base_uri 'api.flickr.com'
def self.getPhotos(uid)
return get('/services/rest/', :query => {
:method => 'flickr.people.getPublicPhotos',
:api_key => 'api key goes here',
:user_id => uid})
end
end
and then call
Flickr.getPhotos('12345678')