{"id":15693802,"url":"https://github.com/ethomson/contributions","last_synced_at":"2026-02-23T21:07:01.055Z","repository":{"id":40762730,"uuid":"276046350","full_name":"ethomson/contributions","owner":"ethomson","description":"Library for GitHub Contribution graphs","archived":false,"fork":false,"pushed_at":"2024-06-19T04:33:02.000Z","size":76,"stargazers_count":9,"open_issues_count":1,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-05-05T21:17:02.462Z","etag":null,"topics":["github","github-contributions"],"latest_commit_sha":null,"homepage":"https://npmjs.com/contributions","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/ethomson.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","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}},"created_at":"2020-06-30T08:49:08.000Z","updated_at":"2025-04-05T02:01:29.000Z","dependencies_parsed_at":"2024-12-04T19:47:02.188Z","dependency_job_id":null,"html_url":"https://github.com/ethomson/contributions","commit_stats":{"total_commits":10,"total_committers":3,"mean_commits":"3.3333333333333335","dds":"0.30000000000000004","last_synced_commit":"059bdda871e85471cf15e7bc0490f735e6e91c5f"},"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ethomson%2Fcontributions","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ethomson%2Fcontributions/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ethomson%2Fcontributions/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ethomson%2Fcontributions/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ethomson","download_url":"https://codeload.github.com/ethomson/contributions/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252577027,"owners_count":21770721,"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","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":["github","github-contributions"],"created_at":"2024-10-03T18:49:10.418Z","updated_at":"2026-02-23T21:07:01.015Z","avatar_url":"https://github.com/ethomson.png","language":"TypeScript","readme":"# GitHub Contributions\n\nA TypeScript library for the [GitHub Contribution Graph](https://help.github.com/en/github/setting-up-and-managing-your-github-profile/viewing-contributions-on-your-profile).\n\n## Usage\n\n1. Get the contributions for a GitHub user, by name:\n\n       const contributions = await Contributions.forUser('ethomson');\n\n2. Get the days in the contribution graph:\n\n       const days = contributions.getDays();\n\n3. You can iterate and inspect the data in each day:\n\n   1. Get the date, a string in `YYYY-MM-DD` format:\n\n          day.getDate();\n\n   2. Get the number of contributions on that day:\n\n          day.getCount();\n\n   3. Get the contribution intensity for the day, which is the number 0-4, where 0 indicates no contributions, and 4 is the most contributions.  This maps to the color used to indicate the contribution count for the graph.\n\n          day.getIntensity();\n\n   4. Get the color, a string in hexadecimal `#xxxxxx` format, that GitHub used for displaying this day in the contribution graph (this maps directly to the \"intensity\" level for the day:\n\n## Example\n\nAdd the [`contributions`](http://npmjs.com/contributions) package (eg, `npm install contributions`).  Then:\n\n```javascript\nconst { Contributions } = require('contributions')\n\nconst contributions = await Contributions.forUser('ethomson');\nconst days = contributions.getDays();\n\nfor (let day of days) {\n    console.log(`${day.getDate()}: ${day.getIntensity()}`);\n}\n```\n\n## License\n\ncontributions is released under the MIT license.\n\nSee the [license file](LICENSE.txt) for the full license text.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fethomson%2Fcontributions","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fethomson%2Fcontributions","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fethomson%2Fcontributions/lists"}