Sha256: d671c309bd88594571c407926e794c09be36f40dda95250be4b45b94d03a6dbe
Contents?: true
Size: 1.39 KB
Versions: 1
Compression:
Stored size: 1.39 KB
Contents
= imgur A simple ruby interface to the imgur image hosting service (http://imgur.com). This is a nice alternative to uploading images and not having to deal with RMagick bs. == Requirements * Grab a imgur api key : http://imgur.com/register/api/ == Examples # Uploading an image to imgur from the filesystem img = Imgur::API.new 'YOURAPIKEY' uploaded_img = img.upload_file '/path/to/your/test.jpg' # should return a hash like: # => {"small_thumbnail"=>"http://imgur.com/NfuKFs.png", "original_image"=>"http://imgur.com/NfuKF.png", "large_thumbnail"=>"http://imgur.com/NfuKFl.png", "delete_hash"=>"VAiPkk5NoQ", "imgur_page"=>"http://imgur.com/NfuKF", "delete_page"=>"http://imgur.com/delete/VAiPkk5NoQ", "image_hash"=>"NfuKF"} # now you can do something like (if you're using rails): <%= image_tag uploaded_img["small_thumbnail"] %> == Note on Patches/Pull Requests * Fork the project. * Make your feature addition or bug fix. * Add tests for it. This is important so I don't break it in a future version unintentionally. * Commit, do not mess with rakefile, version, or history. (if you want to have your own version, that is fine but bump version in a commit by itself I can ignore when I pull) * Send me a pull request. Bonus points for topic branches. == Copyright Copyright (c) 2009 jdp. See LICENSE for details.
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
vanntastic-imgur-0.2.0 | README.rdoc |