github-contributions
A simple TypeScript library to fetch GitHub's contribution chart for a user
Installation
npm install @jonasdoesthings/github-contributions
or
yarn add @jonasdoesthings/github-contributions
Usage
import {fetchContributions} from '@jonasdoesthings/github-contributions';
fetchContributions("JonasDoesThings").then(contributions => {
console.log(contributions)
});
fetchContributions("JonasDoesThings", 2021).then(contributions => {
console.log(contributions)
});
API
fetchContributions(username [string], <optional: year [number]>)
Returns: Promise<ContributionsYear>
License
The project is licensed under the MIT license.
Check the LICENSE file, for the full legal-notice.