Code Monkey home page Code Monkey logo

github-profile's Introduction

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('[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.

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

github-profile's People

Contributors

christophehurpeau avatar javascipt avatar likerrr avatar sindresorhus avatar sonicdoe avatar timhartmann avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.