github-profile
v1.0.1
Published
Get a GitHub profile from an email address
Downloads
6
Maintainers
Readme
github-profile
This Repo is a fork of github-username, all credits should go to its author Sindre Sorhus.
Get a GitHub profile from an email address
Install
$ npm install github-profile
Usage
const githubProfile = require('github-profile');
githubProfile('[email protected]').then(profile => {
console.log(profile);
/* =>
{
"login": "sindresorhus",
"id": 170270,
"avatar_url": "https://avatars1.githubusercontent.com/u/170270?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/sindresorhus",
"html_url": "https://github.com/sindresorhus",
"followers_url": "https://api.github.com/users/sindresorhus/followers",
"following_url": "https://api.github.com/users/sindresorhus/following{/other_user}",
"gists_url": "https://api.github.com/users/sindresorhus/gists{/gist_id}",
"starred_url": "https://api.github.com/users/sindresorhus/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/sindresorhus/subscriptions",
"organizations_url": "https://api.github.com/users/sindresorhus/orgs",
"repos_url": "https://api.github.com/users/sindresorhus/repos",
"events_url": "https://api.github.com/users/sindresorhus/events{/privacy}",
"received_events_url": "https://api.github.com/users/sindresorhus/received_events",
"type": "User",
"site_admin": false,
"name": "Sindre Sorhus",
"company": "@avajs @chalk @yeoman",
"blog": "https://sindresorhus.com",
"location": "° ☾ ☆ ¸. ¸ ★ :. . • ○ ° ★",
"email": null,
"hireable": null,
"bio": "Maker · Open-Sourcerer · Into Swift and Node.js",
"public_repos": 964,
"public_gists": 70,
"followers": 22678,
"following": 46,
"created_at": "2009-12-20T22:57:02Z",
"updated_at": "2018-02-17T04:09:43Z"
}
*/
});
API
githubProfile(email, [token])
Returns a Promise
for the profile.
Type: string
Email address for the user of whom you want the profile.
token
Type: string
GitHub personal access token.
:warning: This module may consume up to 3 API calls toward your github rate limit.
Related
- github-username - Get only username
- github-username-cli - CLI for github-username
License
MIT