Skip to content

cajun/smile

Folders and files

NameName
Last commit message
Last commit date

Latest commit

5a9ffe3 · May 4, 2011

History

63 Commits
Sep 14, 2010
May 4, 2011
Jan 10, 2011
Sep 14, 2010
Sep 14, 2010
Sep 14, 2010
Jan 7, 2011
Apr 7, 2009
Jan 11, 2011
Jan 10, 2011
Jul 9, 2010
Jan 7, 2011

Repository files navigation

smile

Smile is a simple gem to talk to SmugMug.com. This gem wraps the 1.2.0 interface.

Features

Configure

Smile::Base.configure do |config|
  config.log = Log.new( STDOUT )
  config.logger_on = true
  config.api_key = 'your key from smugmug'
end

new methods

album.reload!
photo.reload!

Exceptions!!!!
Hey it shows you better exceptions now when something goes wrong from the site or lib

Upload Images/Vids

smug = Smile.auth( 'foo@bar.com', 'pass' )
album = smug.albums.first

album.add( '/path/to/image.ext' ) # => Smile::Photo (:

Search feeds

Smile.search( 'blueberries' ) => [Smile::Photo] 
Smile.search_rss( 'bison' ) => RSS::Parser Feed
Smile.search_raw( 'grand' ) => Raw response from the feed

auth accessors

smug = Smile.auth_anonymously
smug = Smile.auth( 'nick', 'pass' )

smug = Smile::Smug.new
smug.auth_anonymously
albums = smug.albums( :nick_name => 'kleinpeter' )

album = albums.first # just test the first one

album.photos # and see the pretty pics

Old auth accessors ( NOTE: These are still supported )

smug = Smile::Smug.new
smug.auth( 'my_nick', 'my_pass' )
albums = smug.albums # theses are mine

album = albums.first # just test the first one

album.photos # and see the pretty pics

TODO

  • Clean up params so they are not case sensitive ( Lots of cases have been handled)

  • Create better exception handlers

  • Update Documentation ( getting there. it’s being published on rdoc.info now rdoc.info/projects/cajun/smile )

  • Plugin in Cucumber

About

SmugMug API Wrapper

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages