LoginSignup
8
10

More than 5 years have passed since last update.

GitHubラッパーのoctokitのAPI一覧とか使用例とか

Last updated at Posted at 2014-03-12

GitHubのAPIを使って連携してみました。

で、octkitという公式ラッパークラスがあったけど、
API一覧的なものがなかったので。
以下に公開。

https://github.com/octokit/octokit.rb/tree/master/lib/octokit/client

まぁ、octkitのソースの中身なんですが(汗
読み方としては、こんな感じ。

例)rails omniauth使用

emojis.rb
def emojis(options = {})

octokit_client = Octokit::Client.new :access_token => request.env["omniauth.auth"][:credentials][:token]
octokit_client.emojis

レポジトリとか、フォロー数とか、
使用言語、そのコード数まで取れる。
色々と遊べそうです。

8
10
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
8
10