Gyazo API wrapper for Ruby
% gem install gyazo
Register new application and get ACCESS TOKEN, then
require 'gyazo'
gyazo = Gyazo::Client.new 'your-access-token'
res = gyazo.upload 'my_image.png'
puts res['permalink_url'] # => "http://gyazo.com/a1b2cdef345"
Following attributes can be set
- time
- url
- title
- desc
res = gyazo.upload 'my_image.png',
{ :time => Time.now, :url => 'http://example.com/' }
puts res['permalink_url']
gyazo.list.each do |image|
puts image['url']
end
gyazo.delete image_id
setup
% gem install bundler
% bundle install
% export GYAZO_TOKEN=a1b2cdef3456 ## set your API Token
run test
% bundle exec rake test
- Fork it
- 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