5.2.0 • Published 8 months ago

contribution v5.2.0

Weekly downloads
60
License
MIT
Repository
github
Last release
8 months ago

Contribution

🗓 GitHub contribution streak & stat fetcher with zero dependencies

build downloads version license

Install

npm install contribution

Usage

import { fetchStats } from 'contribution';

// Callbacks
fetchStats('jamieweavis', {
  onSuccess: gitHubStats => console.log(gitHubStats),
  onFailure: error => console.log(error),
});

// Promises
fetchStats('jamieweavis')
  .then(gitHubStats => console.log(gitHubStats))
  .catch(error => console.log(error));

// Async/await
try {
  const gitHubStats = await fetchStats('jamieweavis');
  console.log(gitHubStats);
} catch (error) {
  console.log(error);
}
interface GitHubStats {
  streak: {
    best: number;
    current: number;
    isAtRisk: boolean;
  };
  contributions: {
    best: number;
    total: number;
    current: number;
  };
}

Related

  • Streaker - 🐙 GitHub contribution streak & stat tracking menu bar app
  • Streaker CLI - 🐙 GitHub contribution streak & stat tracking CLI app
5.2.0

8 months ago

5.1.1

8 months ago

5.1.0

10 months ago

5.0.3

1 year ago

5.0.2

1 year ago

5.0.1

1 year ago

5.0.0

1 year ago

4.1.1

3 years ago

4.1.0

4 years ago

4.0.3

4 years ago

4.0.2

4 years ago

4.0.1

4 years ago

4.0.0

4 years ago

3.0.1

5 years ago

3.0.0

5 years ago

2.2.0

5 years ago

2.1.0

5 years ago

2.0.0

6 years ago

1.2.0

6 years ago

1.1.0

6 years ago

1.0.14

6 years ago

1.0.12

6 years ago

1.0.11

6 years ago

1.0.10

6 years ago

1.0.9

6 years ago

1.0.8

6 years ago

1.0.7

6 years ago

1.0.6

6 years ago

1.0.5

6 years ago

1.0.4

6 years ago

1.0.3

6 years ago

1.0.2

6 years ago

1.0.1

6 years ago

0.0.1

6 years ago