@cnocon/github-stats-card

0.2.0 • Public • Published

GitHub Stats Card

Pass in a minimum of your GitHub access token and a GitHub username and get this:

Widget Screenshot

Installation

npm install @cnocon/github-stats-card

Example using Express:

The Card function returns an HTML string you can append anywhere. The first argument is the GitHub username, the second is your GitHub access token, and the third is an optional Boolean for whether or not you want to style the card with the included theme. Defaults to false.

const { Card } = require('@cnocon/github-stats-card');

// ...
app.get('/', async (req, res) => {
  const statsCard = await Card('cnocon', process.env.GITHUB_ACCESS_TOKEN, true);
  res.send(statsCard);
});

Package Sidebar

Install

npm i @cnocon/github-stats-card

Weekly Downloads

1

Version

0.2.0

License

MIT

Unpacked Size

105 kB

Total Files

7

Last publish

Collaborators

  • cnocon