Nullifying Precipitation Machine

    github-calendar-graph

    0.2.8 • Public • Published

    github-calendar-graph npm version MIT Licence Open Source Love

    Get the GitHub contributon calendar graph.
    calendar-graph

    Demo

    Append the calendar graph as you see at GitHub to everywhere you want.
    demo

    Install

    $ npm install github-calendar-graph --save
    

    Usage

    const CalendarGraph = require("github-calendar-graph");
     
    // get contribution graph
    CalendarGraph.fetch("GITHUB ACCOUNT").then(data => {
      console.log(data); // => string of HTML DOM
    });
     
    // get contribution count
    CalendarGraph.fetch("GITHUB ACCOUNT", true).then(data => {
      console.log(data); // => { 'DATE': 'CONTRIBUTION COUNT' }
      /*
        {
          '2018-07-01': 3,
          '2018-07-02': 1,
          '2018-07-03': 9,
          ...
        }
      */
    });
     
    // get contribution data including count and color
    CalendarGraph.fetch("GITHUB ACCOUNT", true, true).then(data => {
      console.log(data); // => { 'DATE': { count: 'CONTRIBUTION COUNT', color: 'COLOR FILLED' } }
      /*
        {
          '2018-07-01': {
            count: 3,
            color: '#196127'
          },
          '2018-07-02': {
            count: 0,
            color: '#ebedf0'
          },
          ...
        }
      */
    });

    Install

    npm i github-calendar-graph

    DownloadsWeekly Downloads

    2

    Version

    0.2.8

    License

    MIT

    Unpacked Size

    1.71 MB

    Total Files

    328

    Last publish

    Collaborators

    • x3388638