Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Yet Another Qiita API Wrapper
branch: master
Failed to load latest commit information.
spec Make tests more consistent
.gitignore Firts commit
.rspec Implement basic functions
.rvmrc Implement basic functions
Gemfile Get rid of Oj and use MultiJson instead Update README
Rakefile Firts commit
kiita.gemspec Get rid of Oj and use MultiJson instead


Yet Another Qiita API Wrapper.

Build Status Code Climate


Add this line to your application's Gemfile:

gem 'kiita'

And then execute:

$ bundle

Or install it yourself as:

$ gem install kiita


Public APIs

See rate_limit

rate = Kiita::API.rate_limit

rate["remaning"] # => 148
rate["limit"]    # => 150

Get an authentication token

auth = Kiita::API.authenticate("user", "password")

auth["url_name"] # => "user"
auth["token"]    # => "a875scr65rc86a5s¡Ä"

Get a user's information

user = Kiita::API.user("yuki24")

user.class       # => Kiita:;User        # => "Yuki Nishijima"
user.location    # => "Tokyo, Japan"
user.description # => "I'm a guy."

Get a user's posts

posts = Kiita::API.user("yuki24").posts
post = posts.first

post.class # => Kiita::Post
post.title # => "I'm a title!"
post.body  # => "I'm a body!"

APIs that require authentication

First create an object with the token like this:

user = "a875scr65rc86a5s")

then you can do the followings.

Get my information # => your information

Get your stocks

user.stocks # collection of the posts that you stocked before.

Stock a post

user.stock!("e6654a3b258b7c6b7d1") # => true if success

Unstock a post

user.unstock!("e6654a3b258b7c6b7d1") # => true if success


Kiita currently doesn't allow to configure anything. But in the near future, it will support some confgurations like timeout and keep alive.


  • Ruby 1.9.2, 1.9.3

Note that Ruby 1.8.7 is NOT supported.


  1. Implementation of the APIs that use POST, PUT or DELETE
  2. Writing up rdoc as well as this README


  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) 2012 Yuki Nishijima. See for further details.

Something went wrong with that request. Please try again.