|
1 | 1 | # GitHub Achievements API |
2 | 2 |
|
| 3 | +<p align="center"> |
| 4 | + <img src="https://github.githubassets.com/images/modules/profile/achievements/pull-shark-default.png" width="100" height="100" alt="Pull Shark Achievement" /> |
| 5 | +</p> |
| 6 | + |
3 | 7 | [](https://github.com/wangrunlin/github-achievements-api/blob/main/LICENSE) |
4 | 8 | [](https://github.com/wangrunlin/github-achievements-api/blob/main/package.json) |
5 | 9 | [](https://github.com/wangrunlin/github-achievements-api/commits) |
6 | 10 | [](https://github.com/wangrunlin/github-achievements-api/actions) |
| 11 | +[](https://nodejs.org) |
| 12 | +[](https://www.typescriptlang.org/) |
| 13 | +[](https://github.com/prettier/prettier) |
| 14 | +[](https://makeapullrequest.com) |
| 15 | +[](https://github.com/wangrunlin/github-achievements-api/stargazers) |
| 16 | +[](https://github.com/wangrunlin/github-achievements-api/network) |
| 17 | +[](https://github.com/wangrunlin/github-achievements-api/issues) |
| 18 | +[](https://github.com/wangrunlin/github-achievements-api) |
| 19 | +[](https://ko-fi.com/wangrunlin) |
7 | 20 |
|
8 | 21 | English | [简体中文](README_zh.md) |
9 | 22 |
|
@@ -65,6 +78,56 @@ GET https://<your-worker>.workers.dev/wangrunlin |
65 | 78 | } |
66 | 79 | ``` |
67 | 80 |
|
| 81 | +## API Documentation |
| 82 | + |
| 83 | +### Rate Limiting |
| 84 | + |
| 85 | +This API inherits GitHub's rate limiting. Please be mindful of GitHub's rate limits when making requests. |
| 86 | + |
| 87 | +### Caching |
| 88 | + |
| 89 | +- Responses are cached for 1 hour to improve performance |
| 90 | +- Cache is automatically invalidated when new achievements are earned |
| 91 | +- Cache can be bypassed by adding `?nocache=true` to the request |
| 92 | + |
| 93 | +### Error Responses |
| 94 | + |
| 95 | +| Status Code | Description | |
| 96 | +| ----------- | --------------------- | |
| 97 | +| 404 | User not found | |
| 98 | +| 429 | Rate limit exceeded | |
| 99 | +| 500 | Internal server error | |
| 100 | + |
| 101 | +Example error response: |
| 102 | + |
| 103 | +```json |
| 104 | +{ |
| 105 | + "error": "Failed to fetch GitHub achievements: Not Found" |
| 106 | +} |
| 107 | +``` |
| 108 | + |
| 109 | +## Roadmap |
| 110 | + |
| 111 | +- [ ] Add support for achievement descriptions |
| 112 | +- [ ] Add support for achievement dates |
| 113 | +- [ ] Add support for achievement images |
| 114 | +- [ ] Add API key authentication |
| 115 | +- [ ] Add more detailed statistics |
| 116 | +- [ ] Add support for organization achievements |
| 117 | +- [ ] Add webhook notifications for new achievements |
| 118 | + |
| 119 | +## Sponsors |
| 120 | + |
| 121 | +Support this project by becoming a sponsor. Your logo will show up here with a link to your website. |
| 122 | + |
| 123 | +[](https://ko-fi.com/wangrunlin) |
| 124 | + |
| 125 | +[Other sponsorship options](https://alin.run/sponsor) |
| 126 | + |
| 127 | +## Who's using GitHub Achievements API? |
| 128 | + |
| 129 | +Are you using this API? [Let us know](https://github.com/wangrunlin/github-achievements-api/issues/new) and we'll add your logo here! |
| 130 | + |
68 | 131 | ## Local Development |
69 | 132 |
|
70 | 133 | ### Prerequisites |
@@ -129,7 +192,32 @@ Issues and Pull Requests are welcome! |
129 | 192 |
|
130 | 193 | [Leo Wang](https://github.com/wangrunlin) |
131 | 194 |
|
| 195 | +## Available Achievements |
| 196 | + |
| 197 | +Here are all the achievements currently available on GitHub: |
| 198 | + |
| 199 | +[View more details about GitHub Achievements](https://github.com/drknzz/GitHub-Achievements) |
| 200 | + |
| 201 | +| Achievement | Name | Description | Max Tiers | |
| 202 | +| -------------------------------------------------------------------------------------------------------------------------------------- | --------------------- | ------------------------------------------------------------------- | --------- | |
| 203 | +| <img src="https://github.githubassets.com/images/modules/profile/achievements/starstruck-default.png" width="60px"> | Starstruck | Created a repository that has 16 stars | 4 | |
| 204 | +| <img src="https://github.githubassets.com/images/modules/profile/achievements/quickdraw-default.png" width="60px"> | Quickdraw | Closed an issue/PR within 5 minutes of opening | 1 | |
| 205 | +| <img src="https://github.githubassets.com/images/modules/profile/achievements/pair-extraordinaire-default.png" width="60px"> | Pair Extraordinaire | Coauthored in merged pull request | 3 | |
| 206 | +| <img src="https://github.githubassets.com/images/modules/profile/achievements/pull-shark-default.png" width="60px"> | Pull Shark | Opened a pull request that has been merged | 3 | |
| 207 | +| <img src="https://github.githubassets.com/images/modules/profile/achievements/galaxy-brain-default.png" width="60px"> | Galaxy Brain | Answered a discussion with an accepted answer | 4 | |
| 208 | +| <img src="https://github.githubassets.com/images/modules/profile/achievements/yolo-default.png" width="60px"> | YOLO | Merged a pull request without code review | 1 | |
| 209 | +| <img src="https://github.githubassets.com/images/modules/profile/achievements/arctic-code-vault-contributor-default.png" width="60px"> | Arctic Code Vault | Contributed code to repositories in the 2020 GitHub Archive Program | 1 | |
| 210 | +| <img src="https://github.githubassets.com/images/modules/profile/achievements/public-sponsor-default.png" width="60px"> | Public Sponsor | Sponsored an open source contributor through GitHub Sponsors | 1 | |
| 211 | +| <img src="https://github.githubassets.com/images/modules/profile/achievements/mars-2020-contributor-default.png" width="60px"> | Mars 2020 Contributor | Contributed code to repositories used in the Mars 2020 Mission | 1 | |
| 212 | + |
132 | 213 | ## Acknowledgments |
133 | 214 |
|
134 | | -- GitHub Achievement System |
135 | | -- Cloudflare Workers Platform |
| 215 | +Thanks to these awesome projects and resources: |
| 216 | + |
| 217 | +- [GitHub](https://github.com) - For providing the achievement system |
| 218 | +- [Cloudflare Workers](https://workers.cloudflare.com) - For the serverless platform |
| 219 | +- [GitHub Achievements List](https://github.com/drknzz/GitHub-Achievements) - For the comprehensive achievements documentation |
| 220 | +- [TypeScript](https://www.typescriptlang.org) - For the typed JavaScript |
| 221 | +- [Vitest](https://vitest.dev) - For the testing framework |
| 222 | +- [Wrangler](https://developers.cloudflare.com/workers/wrangler/) - For the development & deployment tool |
| 223 | +- [pnpm](https://pnpm.io) - For the fast package manager |
0 commit comments