A library to Hatena Fotolife Atom API. You can upload image to hatena fotolife using this gem. This gem is inspired_by hatenablog gem
Add this line to your application's Gemfile:
gem 'hatena_fotolife'
And then execute:
$ bundle
Or install it yourself as:
$ gem install hatena_fotolife
Hatena Fotolife API requires user authentication with OAuth. So you need to get OAuth 1.0a keys and consumer tokens before using this gem.
Get consumer_key and consumer_secret from Hatena Developer Center
% bundle exec get_access_token <consumer_key> <consumer_secret>
- Create config.yml file
consumer_key: <Hatena application consumer key>
consumer_secret: <Hatena application consumer secret>
access_token: <Hatena application access token>
access_token_secret: <Hatena application access token secret>
consumer_options:
timeout: 300
open_timeout: 60
- Run
require 'hatena_fotolife'
# Read the configuration from 'config.yml'
HatenaFotolife::Client.create.post_image(file_path: your_image_path)
Bug reports and pull requests are welcome on GitHub at https://github.com/rlho/hatena_fotolife. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the Contributor Covenant code of conduct.
The gem is available as open source under the terms of the MIT License.
Everyone interacting in the HatenaFotolife project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the code of conduct.