Fetching contributors…
Cannot retrieve contributors at this time
70 lines (52 sloc) 4.09 KB


Simple Ruby wrapper for the GitHub v2 API.

The Puppeteer by Cameron McEfee)


gem install octokit

Continuous Integration

Build Status



Show a user

=> <#Hashie::Rash blog="" company="Code for America" created_at="2008/05/14 13:36:12 -0700" email="" followers_count=177 following_count=83 gravatar_id="1f74b13f1e5c6c69cb5d7fbaabb1e2cb" id=10308 location="San Francisco" login="sferik" name="Erik Michaels-Ober" permission=nil public_gist_count=16 public_repo_count=30 type="User">

Show who a user follows

=> ["rails", "puls", "wycats", "dhh", "jm3", "joshsusser", "nkallen", "technoweenie", "blaine", "al3x", "defunkt", "schacon", "bmizerany", "rtomayko", "jpr5", "lholden", "140proof", "ephramzerb", "carlhuda", "carllerche", "jnunemaker", "josh", "hoverbird", "jamiew", "jeremyevans", "brynary", "mojodna", "mojombo", "joshbuddy", "igrigorik", "perplexes", "joearasin", "hassox", "nickmarden", "pengwynn", "mmcgrana", "reddavis", "reinh", "mzsanford", "aanand", "pjhyett", "kneath", "tekkub", "adamstac", "timtrueman", "aaronblohowiak", "josevalim", "kaapa", "hurrycane", "jackdempsey", "drogus", "cameronpriest", "danmelton", "marcel", "r", "atmos", "mbleigh", "isaacs", "maxogden", "codeforamerica", "chadk", "laserlemon", "gruber", "lsegal", "bblimke", "wayneeseguin", "brixen", "dkubb", "bhb", "bcardarella", "elliottcable", "fbjork", "mlightner", "dianakimball", "amerine", "danchoi", "develop", "dmfrancisco", "unruthless", "trotter", "hannestyden", "codahale", "ry"]


For convenience, methods that require a repoistory argument may be passed in any of the following forms:

  • "pengwynn/octokit"
  • {:username => "pengwynn", :name => "octokit"}
  • {:username => "pengwynn", :repo => "octokit"}
  • instance of Repository

    Octokit.repo("pengwynn/octokit") => <#Hashie::Rash created_at="2009/12/10 13:41:49 -0800" description="Simple Ruby wrapper for the GitHub v2 API and feeds" fork=false forks=25 has_downloads=true has_issues=true has_wiki=true homepage="" integrate_branch="master" language="Ruby" name="octokit" open_issues=8 owner="pengwynn" private=false pushed_at="2011/05/05 10:48:57 -0700" size=1804 url="" watchers=92>

Authenticated requests

Some methods require authentication so you'll need to pass a login and an api_token. You can find your GitHub API token on your account page.

client = => "pengwynn", :token => "OU812")

Submitting a Pull Request

  1. Fork the project.
  2. Create a topic branch.
  3. Implement your feature or bug fix.
  4. Add documentation for your feature or bug fix.
  5. Run bundle exec rake doc:yard. If your changes are not 100% documented, go back to step 4.
  6. Add specs for your feature or bug fix.
  7. Run bundle exec rake spec. If your changes are not 100% covered, go back to step 6.
  8. Commit and push your changes.
  9. Submit a pull request. Please do not include changes to the version or gemspec. (If you want to create your own version for some reason, please do so in a separate commit.)


Octokit was inspired by Octopi and aims to be a lightweight, less-ActiveResourcey alternative.


Copyright (c) 2011 Wynn Netherland, Adam Stacoviak, Erik Michaels-Ober. See LICENSE for details.