0.1.5 • Published 10 years ago

gisty v0.1.5

Weekly downloads
29
License
MIT
Repository
github
Last release
10 years ago

gisty

NPM version Dependency Status

A node.js wrapper for the GitHub Gists API v3.

Installation

$ npm install gisty

Examples

var Gisty = require('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");
  }
});
Gisty = require '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

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/get-access-token.coffee and after that run examples/get-access-token.coffee

$ coffee examples/get-access-token.coffee

API

  • fetch(gist_id, callback)
  • comments(gist_id, callback)
  • all(callback)
  • public(callback)
  • starred(callback)

Author

License

The MIT License, see the included license.md file.

Bitdeli Badge

0.1.5

10 years ago

0.1.4

10 years ago

0.1.3

11 years ago

0.1.2

11 years ago

0.1.1

11 years ago

0.1.0

11 years ago

0.0.3

12 years ago

0.0.2

13 years ago

0.0.1

13 years ago