Wondering what’s next for npm?Check out our public roadmap! »

    github-contrib-stats

    1.0.1 • Public • Published

    github-contrib-stats

    Retrieve GitHub total contribution count and streaks.

    Prerequisites

    This requires Node.js v7.7.0 or greater.

    Installation

    npm install --save github-contrib-stats
    

    Usage

    const getGhContribStats = require(‘github-contrib-stats’);
     
    async function test() {
      try {
        const stats = await getGhContribStats('clthck');
        console.log(stats);
      } catch (err) {
        console.error(err, err.stack);
      }
    }
     
    test();

    Output will be in the following format:

    {
      basicUserData: { ... }, // Find more details at https://api.github.com/users/clthck
      contributionStats: {
        totalContributions: 857,
        todaysContributions: 9,
        currentStreak: 4,
        longestStreak: 24
      }
    }

    Install

    npm i github-contrib-stats

    DownloadsWeekly Downloads

    1

    Version

    1.0.1

    License

    MIT

    Last publish

    Collaborators

    • avatar