Skip to content
Find file
Fetching contributors…
Cannot retrieve contributors at this time
74 lines (52 sloc) 1.63 KB


A Node.JS wrapper for GitHub gist API v3.

How to use with JavaScript

var Gisty = require('gisty').Gisty;

var gist = new Gisty({username: meritt});

gist.fetch('1111422', function(error, gist) {
    if (error) {
        throw new Error(error);
    for (filename in gist.files) {
        console.log(filename + "\n" + gist.files[filename].content + "\n\n");

Or with CoffeeScript

Gisty = require('gisty').Gisty

gist = new Gisty username: 'meritt'

gist.fetch '1111422', (error, gist) ->
    throw new Error error if error
    console.log filename + "\n" + file.content + "\n\n" for filename, file of gist.files

See other examples

Install with NPM

npm install gisty

How to retrieve GitHub OAuth2 access_token

Grab latest source code and install all dev dependencies

npm link

Change your host, client id, client secret in examples/ and after that run examples/

coffee examples/


  • fetch (gist id, callback)
  • comments (gist id, callback)
  • all (callback)
  • public (callback)
  • starred (callback)


Jump to Line
Something went wrong with that request. Please try again.