{"id":20881938,"url":"https://github.com/jamieweavis/contribution","last_synced_at":"2025-08-18T20:45:52.112Z","repository":{"id":39614695,"uuid":"109678087","full_name":"jamieweavis/contribution","owner":"jamieweavis","description":"GitHub contribution graph parser - contribution streak \u0026 statistic calculator with zero dependencies","archived":false,"fork":false,"pushed_at":"2025-07-10T17:24:00.000Z","size":2419,"stargazers_count":8,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-07-22T22:48:11.826Z","etag":null,"topics":["contribution","contribution-graph","github","statistics","stats","streak"],"latest_commit_sha":null,"homepage":"https://npm.im/contribution","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jamieweavis.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2017-11-06T10:03:54.000Z","updated_at":"2025-07-10T17:24:04.000Z","dependencies_parsed_at":"2025-02-25T19:19:39.592Z","dependency_job_id":"72278117-06d0-4da0-9408-d4198a4c82cb","html_url":"https://github.com/jamieweavis/contribution","commit_stats":null,"previous_names":[],"tags_count":38,"template":false,"template_full_name":null,"purl":"pkg:github/jamieweavis/contribution","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jamieweavis%2Fcontribution","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jamieweavis%2Fcontribution/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jamieweavis%2Fcontribution/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jamieweavis%2Fcontribution/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jamieweavis","download_url":"https://codeload.github.com/jamieweavis/contribution/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jamieweavis%2Fcontribution/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":271059731,"owners_count":24692425,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-18T02:00:08.743Z","response_time":89,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["contribution","contribution-graph","github","statistics","stats","streak"],"created_at":"2024-11-18T07:27:03.539Z","updated_at":"2025-08-18T20:45:51.722Z","avatar_url":"https://github.com/jamieweavis.png","language":"TypeScript","readme":"# Contribution\n\nGitHub contribution graph parser - contribution streak \u0026 statistic calculator with zero dependencies\n\n[![ci](https://github.com/jamieweavis/contribution/workflows/ci/badge.svg)](https://github.com/jamieweavis/contribution/actions)\n[![downloads](https://img.shields.io/npm/dt/contribution.svg)](https://npmjs.com/package/contribution)\n[![version](https://img.shields.io/npm/v/contribution.svg)](https://github.com/jamieweavis/contribution/releases)\n[![license](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/jamieweavis/contribution/blob/main/LICENSE)\n[![zero dependencies](https://img.shields.io/badge/dependencies-0-violet)](https://npmjs.com/package/contribution)\n\n## Install\n\n```sh\nnpm install contribution\n```\n\n## Usage\n\n```javascript\nimport { fetchGitHubStats } from 'contribution';\n\n// Promise chaining\nfetchGitHubStats('jamieweavis')\n  .then((gitHubStats) =\u003e console.info(gitHubStats))\n  .catch((error) =\u003e console.error(error));\n\n// Try catch with async/await\ntry {\n  const gitHubStats = await fetchGitHubStats('jamieweavis');\n  console.info(gitHubStats);\n} catch (error) {\n  console.error(error);\n}\n```\n\n```typescript\ninterface GitHubStats {\n  bestStreak: number;\n  currentStreak: number;\n  previousStreak: number;\n\n  isStreakAtRisk: boolean;\n\n  mostContributions: number;\n  todaysContributions: number;\n  totalContributions: number;\n\n  contributions: Contributions;\n}\n\ninterface Contributions {\n  [date: string]: Day; // YYYY-MM-DD\n}\n\ninterface Day {\n  contributions: number;\n  gitHubLegendLevel: number;\n}\n```\n\n## Built with\n\n- [Node.js](https://github.com/nodejs/node)\n- [TypeScript](https://github.com/microsoft/TypeScript)\n- [Parcel](https://github.com/parcel-bundler/parcel)\n\n## Related\n\n- [Streaker](https://github.com/jamieweavis/streaker) - Cross-platform GitHub contribution streak/statistic tracking menu bar application with reminder notification\n- [Streaker CLI](https://github.com/jamieweavis/streaker-cli) - GitHub contribution streak/statistic tracking command line application with ASCII contribution graph\n\n## License\n\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjamieweavis%2Fcontribution","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjamieweavis%2Fcontribution","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjamieweavis%2Fcontribution/lists"}