Skip to content

evansagge/flickr_oauth

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

flickr_oauth

Flickr API adapter for Ruby using OAuth authentication method.

USAGE

You can instantiate an instance of Flickr

require 'flickr_oauth'

flickr = Flickr.new(
  :consumer_key => CONSUMER_KEY, 
  :consumer_secret => CONSUMER_SECRET, 
  :token => OAUTH_ACCESS_TOKEN, 
  :token_secret => OAUTH_ACCESS_TOKEN_SECRET,
  :format => :json
)
flickr.test.echo(:foo => 'bar')

Or, you can use the flickr method:

require 'flickr_oauth'

flickr.test.echo(:foo => 'bar', 
  :consumer_key => CONSUMER_KEY, 
  :consumer_secret => CONSUMER_SECRET, 
  :token => OAUTH_ACCESS_TOKEN, 
  :token_secret => OAUTH_ACCESS_TOKEN_SECRET,
  :format => :json
)

For photo upload:

flickr.upload(
  PATH_TO_IMAGE_FILE
  :title => 'test upload',            # optional
  :description => 'this is a test',   # optional
  :tags => 'test upload',             # optional
  :content_type => 'image/jpeg',      # optional
  :consumer_key => CONSUMER_KEY, 
  :consumer_secret => CONSUMER_SECRET, 
  :token => OAUTH_ACCESS_TOKEN, 
  :token_secret => OAUTH_ACCESS_TOKEN_SECRET
)

TODO

  • flickr_oauth may support all of the existing Flickr API methods, with the exception of those that require no additional arguments, to name a few:

    • flickr.test.null
    • flickr.test.login
    • flickr.photos.licenses.getInfo
  • Upload/replace

  • More tests

ACKNOWLEDGEMENT

Much of the code has been patterned around the twitter gem.

About

Flickr API adapter for Ruby using OAuth authentication method.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages