0.2.8 • Published 4 years ago

github-calendar-graph v0.2.8

Weekly downloads
4
License
MIT
Repository
github
Last release
4 years ago

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'
      },
      ...
    }
  */
});
0.2.8

4 years ago

0.2.7

4 years ago

0.2.6

4 years ago

0.2.5

4 years ago

0.2.4

4 years ago

0.2.3

6 years ago

0.2.2

6 years ago

0.2.1

6 years ago

0.2.0

6 years ago

0.1.1

6 years ago

0.1.0

6 years ago