Imgur Ruby
Based on Cubee's imgur-ruby script.
Installation
Add this line to your application's Gemfile
gem "imgurruby", "~> 0.0.3"
For the latest version:
gem "imgurruby", :git => 'https://github.com/asithade/imgur-ruby'
And then execute:
$ bundle install
Or install it yourself as:
$ gem install imgurruby
Usage
@image = Imgurruby::Imgur.new('YOUR_API_KEY')
@image.upload(params[:file])
You can then access the url/error by calling
@image.url
Contributing
I'm quite a newbie with Ruby, so feel free to add your own insight!
- Fork it ( http://github.com//imgurruby/fork )
- Create your feature branch (
git checkout -b my-new-feature
)
- Commit your changes (
git commit -am 'Add some feature'
)
- Push to the branch (
git push origin my-new-feature
)
- Create new Pull Request