TINAMI

Build Status Code Climate Dependency Status

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

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request

Copyright (c) 2014 Kazuya Takeshima. See LICENSE for details.