在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
开源软件名称:jonschlinkert/gists开源软件地址:https://github.com/jonschlinkert/gists开源编程语言:JavaScript 100.0%开源软件介绍:gists
Please consider following this project's author, Jon Schlinkert, and consider starring the project to show your InstallInstall with npm: $ npm install --save gists Full support for: (If you find something missing or encounter a bug, please create an issue. Thanks!) Heads up!Breaking changes in v2.0!!! Please read the CHANGELOG for more details. UsageAdd const Gists = require('gists');
const gists = new Gists({
username: 'your_username',
password: 'your_password'
});
// EXAMPLE: Download the Markdown Cheatsheet gist.
gists.get('5854601')
.then(res => console.log(res))
.catch(console.error) APISee the GitHub Gist API documentation for additional details and input options for each method. GistsThe main export is the Params
Example // see github-base for all available options and other ways to authenticate
const Gists = require('gists');
const gists = new Gists({ username: 'your_username', password: '*******' });
// all methods, when invoked, return a promise with this sigature
gists.get(...args)
.then(res => console.log(res.body))
.catch(console.error); .createCreate a new gist (docs). Params
Example // POST /gists
gists.create(options); .getGet a gist (docs). Params
Example // GET /gists/:gist_id
gists.get(gist_id[, options]); .listList all gists for the given Params
Example // GET /users/:username/gists
gists.list(username[, options]); .allList the authenticated user's gists, or if called anonymously get all public gists. (docs). Params
Example // GET /gists/
gists.all(options); .publicList all public gists sorted by most recently updated to least recently updated (docs). Params
Example // GET /gists/public
gists.public(options); .starredList the authenticated user's starred gists (docs). Params
Example // GET /gists/starred
gists.starred(options); .revisionGet a specific revision of a gist (docs). Params
Example // GET /gists/:gist_id/:sha
gists.revision(gist_id, sha[, options]); .commitsList commits for a gist (docs). Params
Example // GET /gists/:gist_id/commits
gists.commit(gist_id[, options]); .forksList all forks for a gist (docs). Params
Example // GET /gists/:gist_id/forks
gists.forks(gist_id[, options]); .forkFork a gist (docs). Params
Example // POST /gists/:gist_id/forks
gists.fork(gist_id[, options]); .editEdit a gist (docs). Params
Example // PATCH /gists/:gist_id
gists.edit(gist_id[, options]); .deleteDelete a gist (docs). Params
Example // DELETE /gists/:gist_id
gists.delete(gist_id[, options]); .starStar a gist (docs). Params
Example // PUT /gists/:gist_id/star
gists.star(gist_id[, options]); .unstarUnstar a gist (docs). Params
Example // DELETE /gists/:gist_id/star
gists.unstar(gist_id[, options]); .isStarredCheck if a gist is starred (docs). Params
Example // GET /gists/:gist_id/star
gists.isStarred(gist_id[, options]) .commentCreate a comment on a gist (docs). Params
Example // POST /gists/:gist_id/comments
gists.comment(gist_id, { body: 'Just commenting for the sake of commenting' }); .getCommentGet a single comment from a gist (docs). Params
Example // GET /gists/:gist_id/comments/:comment_id
gists.getComment(gist_id, comment_id, options); .listCommentsList comments on a gist (docs). Params
Example // GET /gists/:gist_id/comments
gists.listComments(options); .editEdit a comment (docs). Params
Example // PATCH /gists/:gist_id/comments/:gist_id
gists.editComment(gist_id, comment_id[, options]); .deleteDelete a comment (docs). Params
Example // DELETE /gists/:gist_id/comments/:comment_id
gists.deleteComment(gist_id, comment_id[, options]); Release historyv2.0
AboutContributingPull requests and stars are always welcome. For bugs and feature requests, please create an issue. Running TestsRunning and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command: $ npm install && npm test Building docs(This project's readme.md is generated by verb, please don't edit the readme directly. Any changes to the readme must be made in the .verb.md readme template.) To generate the readme, run the following command: $ npm install -g verbose/verb#dev verb-generate-readme && verb Related projectsYou might also be interested in these projects:
Contributors
AuthorJon Schlinkert LicenseCopyright © 2018, Jon Schlinkert. Released under the MIT License. This file was generated by verb-generate-readme, v0.6.0, on August 19, 2018. |
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论