npm.io
1.0.1 • Published 4 years ago

gh-calendar-scraper

Licence
MIT
Version
1.0.1
Deps
2
Size
43 kB
Vulns
23
Weekly
0

gh-calendar-scraper

Scrapes a users GitHub contributions calendar Github calendar example

Install

Install the package in your project.

$ yarn add gh-calendar-scraper

Usage

Import the "fetchGithubCalendar" function and pass in a GitHub username.

import { GithubCalendar, fetchGithubCalendar } from 'gh-calendar-scraper'

const calendar: GithubCalendar = await fetchGithubCalendar('username')

Types

Thit package also exports the following Typescript types:

type DayStats = {
  x: number
  y: number
  rx: number
  ry: number
  count: number
  date: string
  level: number
}

type GithubCalendar = Array<DayStats>

Keywords