Simplified GitHub API requests.

npm install github-request
20 downloads in the last week
162 downloads in the last month

GitHub Request

Simplified GitHub API requests.

Support this project by donating on Gittip.


Low level helper for working with the GitHub API.


npm install github-request


var github = require("github-request");
    path: "/orgs/jquery/repos"
}, function(error, repos) {


request(settings, data, callback)

  • settings (Object): Settings for the HTTPS request.
  • data (String): Data to pass for POST requests.
  • callback (function( error, response, meta )): A callback to invoke when the API call is complete.
    • response (Object): The parsed JSON response.
    • meta (Object): Metadata from the response headers.

The metadata provided contains information from the following headers:

  • x-ratelimit-*
  • x-github-*
  • link

These headers are parsed into a more friendly format before being passed as the meta parameter in the callback.

All x-* headers have the x- prefix removed and the names are changed from dashed form to camel case. For example, x-ratelimit-remaining becomes ratelimitRemaining.

The link header is parsed into the named rel values. For example, <>; rel="next" becomes {next: ""} and is provided in the links property.


Copyright 2013 Scott González. Released under the terms of the MIT license.

Support this project by donating on Gittip.

npm loves you