github-generate-token

3.0.0 • Public • Published

github-generate-token npmjs.com The MIT License

Generating GitHub Personal Access Token using Basic Auth username:password

code climate standard code style travis build status coverage status dependency status

Install

npm i github-generate-token --save
npm test

API

For more use-cases see the tests

githubGenerateToken

Generate github token with Basic Auth

  • <credentials> {String} credentials pattern username:password
  • [opts] {Object} options like scopes and note
  • <callback> {Function} node style callback

Example

var generateToken = require('github-generate-token')
 
var opts = {
  scopes: ['user', 'gist'],
  note: 'my awesome app note'
}
 
generateToken('username:password', opts, function (err, data) {
  if (err) return console.error(err)
 
  console.log(data.token) //=> token
})

Related

  • gitclone-cli: Git clone github repository with pattern like user/repo#branch
  • github-base: Base methods for creating node.js apps that work with the GitHub API.
  • simple-get: Simplest way to make http get requests. Supports HTTPS, redirects, gzip/deflate, streams in < 100 lines.

Contributing

Pull requests and stars are always welcome. For bugs and feature requests, please create an issue.
But before doing anything, please read the CONTRIBUTING.md guidelines.

Charlike Make Reagent new message to charlike freenode #charlike

tunnckocore.tk keybase tunnckocore tunnckoCore npm tunnckoCore twitter tunnckoCore github

Package Sidebar

Install

npm i github-generate-token

Weekly Downloads

29

Version

3.0.0

License

MIT

Last publish

Collaborators

  • vanchoy
  • tunnckocore