Skip to content

Javascipt/github-profile

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

39 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

github-profile Build Status

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('sindresorhus@gmail.com').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.

email

Type: string

Email address for the user of whom you want the profile.

token

Type: string

GitHub personal access token.

⚠️ This module may consume up to 3 API calls toward your github rate limit.

Related

License

MIT

About

Get a GitHub username from an email address

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 100.0%