get-github-user
Version:
Get GitHub user information from just a username
75 lines (45 loc) • 1.33 kB
Markdown
> Get GitHub user information from just a username
```
$ npm install --save get-github-user
```
You also need to get a GitHub application token: https://github.com/settings/tokens. Provide it in the CLI or set it as `$GITHUB_TOKEN` somewhere in your bash_profile.
```js
const getGithubUser = require('get-github-user');
getGithubUser('RichardLitt');
//=> [{login: 'RichardLitt', ...}]
```
Type: `string` or `array`
The user or array of users you want user objects for.
Type: token
Send in your GitHub token.
Type: `string`
Send in your GitHub Enterprise endpoint or rootURL.
```
$ npm install --global get-github-user
```
```
$ get-github-user --help
Usage
$ get-github-user [input]
Options
-t, --token A token
-e, --endpoint Change the GitHub endpoint
Examples
$ get-github-user RichardLitt
[{ login: 'RichardLitt', ... }]
$ get-github-user RichardLitt jbenet
[{...}, {...}]
```
Please do! Open an issue or a pull request if you see anything.
MIT © [Richard Littauer](http://burntfen.com)