Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
13 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
{"name":"gisty","tagline":"A node.js wrapper for the Gists API","body":"[![NPM version](https://badge.fury.io/js/gisty.png)](http://badge.fury.io/js/gisty) [![Dependency Status](https://david-dm.org/meritt/node-gisty.png)](https://david-dm.org/meritt/node-gisty)\r\n\r\nA node.js wrapper for the GitHub [Gists API v3](http://developer.github.com/v3/gists/).\r\n\r\n## Installation\r\n\r\n```\r\n$ npm install gisty\r\n```\r\n\r\n## Examples\r\n\r\n```js\r\nvar Gisty = require('gisty');\r\n\r\nvar gist = new Gisty({\r\n username: 'meritt'\r\n});\r\n\r\ngist.fetch('1111422', function(error, gist) {\r\n if (error) {\r\n throw new Error(error);\r\n }\r\n\r\n for (filename in gist.files) {\r\n console.log(filename + \"\\n\" + gist.files[filename].content + \"\\n\\n\");\r\n }\r\n});\r\n```\r\n\r\n```coffeescript\r\nGisty = require 'gisty'\r\n\r\ngist = new Gisty username: 'meritt'\r\n\r\ngist.fetch '1111422', (error, gist) ->\r\n throw new Error error if error\r\n console.log \"#{filename}\\n#{file.content}\\n\\n\" for filename, file of gist.files\r\n```\r\n\r\n[See other examples](http://github.com/meritt/node-gisty/tree/master/examples)\r\n\r\n## How to retrieve github OAuth2 access_token\r\n\r\nGrab latest source code and install all dev dependencies\r\n\r\n```\r\n$ npm link\r\n```\r\n\r\nChange your host, client id, client secret in [examples/get-access-token.coffee](http://github.com/meritt/node-gisty/blob/master/examples/get-access-token.coffee) and after that run [examples/get-access-token.coffee](http://github.com/meritt/node-gisty/blob/master/examples/get-access-token.coffee)\r\n\r\n```\r\n$ coffee examples/get-access-token.coffee\r\n```\r\n\r\n## API\r\n\r\n* fetch (gist_id, callback)\r\n* comments (gist_id, callback)\r\n* all (callback)\r\n* public (callback)\r\n* starred (callback)\r\n\r\n## Author\r\n\r\n* [Alexey Simonenko](mailto:alexey@simonenko.su), [simonenko.su](http://simonenko.su)\r\n\r\n## License\r\n\r\nThe MIT License, see the included `license.md` file.\r\n\r\n[![Bitdeli Badge](https://d2weczhvl823v0.cloudfront.net/meritt/node-gisty/trend.png)](https://bitdeli.com/free \"Bitdeli Badge\")","google":"UA-37507032-6","note":"Don't delete this file! It's used internally to help with page regeneration."} | ||
{"name":"gisty","tagline":"A node.js wrapper for the Gists API","body":"[![NPM version](https://badge.fury.io/js/gisty.svg)](http://badge.fury.io/js/gisty) [![Dependency Status](https://david-dm.org/meritt/node-gisty.svg?theme=shields.io)](https://david-dm.org/meritt/node-gisty)\r\n\r\nA node.js wrapper for the GitHub [Gists API v3](http://developer.github.com/v3/gists/).\r\n\r\n## Installation\r\n\r\n```bash\r\n$ npm install gisty\r\n```\r\n\r\n## Examples\r\n\r\n```js\r\nvar Gisty = require('gisty');\r\n\r\nvar gist = new Gisty({\r\n username: 'meritt'\r\n});\r\n\r\ngist.fetch('1111422', function(error, gist) {\r\n if (error) {\r\n throw new Error(error);\r\n }\r\n\r\n for (filename in gist.files) {\r\n console.log(filename + \"\\n\" + gist.files[filename].content + \"\\n\\n\");\r\n }\r\n});\r\n```\r\n\r\n```coffeescript\r\nGisty = require 'gisty'\r\n\r\ngist = new Gisty username: 'meritt'\r\n\r\ngist.fetch '1111422', (error, gist) ->\r\n throw new Error error if error\r\n console.log \"#{filename}\\n#{file.content}\\n\\n\" for filename, file of gist.files\r\n```\r\n\r\n[See other examples](http://github.com/meritt/node-gisty/tree/master/examples)\r\n\r\n## How to retrieve github OAuth2 access_token\r\n\r\nGrab latest source code and install all dev dependencies\r\n\r\n```bash\r\n$ npm link\r\n```\r\n\r\nChange your host, client id, client secret in [examples/get-access-token.coffee](http://github.com/meritt/node-gisty/blob/master/examples/get-access-token.coffee) and after that run [examples/get-access-token.coffee](http://github.com/meritt/node-gisty/blob/master/examples/get-access-token.coffee)\r\n\r\n```bash\r\n$ coffee examples/get-access-token.coffee\r\n```\r\n\r\n## API\r\n\r\n* `fetch(gist_id, callback)`\r\n* `comments(gist_id, callback)`\r\n* `all(callback)`\r\n* `public(callback)`\r\n* `starred(callback)`\r\n\r\n## Author\r\n\r\n* [Alexey Simonenko](mailto:alexey@simonenko.su), [simonenko.su](http://simonenko.su)\r\n\r\n## License\r\n\r\nThe MIT License, see the included `license.md` file.\r\n\r\n[![Bitdeli Badge](https://d2weczhvl823v0.cloudfront.net/meritt/node-gisty/trend.png)](https://bitdeli.com/free \"Bitdeli Badge\")","google":"UA-37507032-6","note":"Don't delete this file! It's used internally to help with page regeneration."} |