Skip to content
Qiita API v2 client library and CLI tool, written in Ruby
Ruby Makefile
Find file
Latest commit 871fefe @r7kamura r7kamura v1.3.2
Failed to load latest commit information.
bin Add `qiita` executable as a CLI Tool
doc Update docs and methods from JSON schema
images Update screenshot
lib v1.3.2
spec Support --host with --team option
.gitignore Add some make commands for building
.travis.yml Requires 2.0.0 or higher on travis-ci v1.3.2
Gemfile Execute `bundle gem qiita`
LICENSE.txt Prepare for API v2
Makefile Add simple API docs for Qiita::ResourceBasedMethods Merge pull request #10 from increments/fix-wrong-method-name-in-readme
Rakefile Setup Rakefile for rspec
qiita.gemspec Slop v4 is not supported for now

Qiita Build Status

Qiita API v2 client library and CLI tool, written in Ruby.


Note: requires Ruby 2.0.0 or higher.

gem install qiita


See /doc for more details.

require "qiita"

client = "1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcd")


qiita executable calls Qiita::Client's methods.

$ qiita <method> <arguments> [headers|params] [options]
           |          |          |      |         |
           |          |          |      |         `-- -H, --host
           |          |          |      |             -a, --access-token
           |          |          |      |             -c, --color
           |          |          |      |             -h, --help
           |          |          |      |                 --header
           |          |          |      |                 --no-body
           |          |          |      |                 --no-ssl-verification
           |          |          |      |             -t, --team
           |          |          |      |
           |          |          |      `------------ key=value or key:=value
           |          |          |
           |          |          `------------------- Key:value
           |          |
           |          `------------------------------ required arguments for the method
           `----------------------------------------- method name

$ qiita list_users
$ qiita get_user r7kamura
$ qiita list_user_items r7kamura

Method and Arguments

Pass Qiita::Client's method name and required arguments.

Access token

Accepts access token via -a, --access-token or QIITA_ACCESS_TOKEN environment variable.


To set custom request headers, use Key:value syntax.

$ qiita list_items "Authorization:Bearer 1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcd"


Params are used for query string in GET method, or for request body in other methods. You can set params by key=value or key:=value syntax. key=value is parsed into String value, while key:=value is parsed into JSON value (e.g. key:=17 will be {"key":17}). qiita also accepts params via STDIN.

$ qiita list_items page=2 per_page=10
$ qiita create_item < params.json

Something went wrong with that request. Please try again.