TINAMI
TINAMI is a simple TINAMI API library
Installation
Add this line to your application's Gemfile:
gem 'tinami'
And then execute:
$ bundle
Or install it yourself as:
$ gem install tinami
Usage
TINAMI.configure do |config|
config.api_key = 'YOUR_API_KEY'
end
auth = TINAMI.auth('YOUR_EMAIL', 'YOUR_PASSWORD')
auth_key = auth.auth_key
client = TINAMI.new(auth_key: auth_key)
info = client.info
info.user # => {no: "146005"}
ranking = client.ranking(1)
ranking.contents.content.each do |content|
# ... do something
end
search = client.search(text: '艦これ')
search.contents.content.each do |content|
# ... do something
end
Contributing
- 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
Copyright
Copyright (c) 2014 Kazuya Takeshima. See LICENSE for details.