Skip to content

Latest commit

 

History

History
36 lines (24 loc) · 843 Bytes

File metadata and controls

36 lines (24 loc) · 843 Bytes

Github Contribution Counter

This package gives you power of getting your contributions and also the green boxes you've filled in year.

To install

npm install github-contribution-counter

Requirements:

Github Personal Token with permission read:usr

Keep it safe, don't share it with anyone

Usage:

github-contribution-counter is a promise based contribution counter with support of typescript, esm and commonjs.

import { getGithubContributionsForYear } from "github-contribution-counter";

const username = "githubUsername";
const token = "gh_token";
const year = 2022;

// Get Contributions for year with contribution count
getGithubContributionsForYear(username, token, year);

// Get Overall Contribution
getGithubContributions({
  username,
  token,
});