|
| 1 | +# Release v2.0.3 |
| 2 | + |
| 3 | +Release date: 2026-04-04 |
| 4 | + |
| 5 | +## Summary 📝 |
| 6 | + |
| 7 | +This release focuses on consistency, maintainability, and documentation improvements. |
| 8 | + |
| 9 | +## Highlights ✨ |
| 10 | + |
| 11 | +- 🧩 Added badge collection examples to the main README. |
| 12 | +- 🎨 Added support for multiple themes in badge collections (theme cycling by badge index). |
| 13 | +- ✅ Added explicit theme validation for badge collection requests. |
| 14 | +- 🧱 Standardized controller filenames to the pattern `filename.controller.ts`. |
| 15 | +- 🛠️ Standardized service filenames to the pattern `filename.service.ts`. |
| 16 | +- 🚀 Updated project version to `2.0.3`. |
| 17 | + |
| 18 | +## API Notes 🔌 |
| 19 | + |
| 20 | +### Badge Collection 🧩 |
| 21 | + |
| 22 | +Endpoint: |
| 23 | + |
| 24 | +- `GET /badge/collection` |
| 25 | + |
| 26 | +Key query parameters: |
| 27 | + |
| 28 | +- `username` (required) |
| 29 | +- `type` (required, comma-separated badge types) |
| 30 | +- `columns` (optional, 1-50) |
| 31 | +- `gap` (optional, 0-100) |
| 32 | +- `theme` (optional) |
| 33 | + |
| 34 | +Theme behavior: |
| 35 | + |
| 36 | +- Single theme: applies to all badges |
| 37 | +- Multiple themes: comma-separated list, applied in a loop across badges |
| 38 | + |
| 39 | +Example: |
| 40 | + |
| 41 | +```text |
| 42 | +https://stats.pphat.top/badge/collection?username=pphatdev&type=visitors,total-stars,repositories,total-issues,followers&theme=galaxy,aurora,ocean |
| 43 | +``` |
| 44 | + |
| 45 | +## Refactor Details 🔧 |
| 46 | + |
| 47 | +### Controllers renamed 🎮 |
| 48 | + |
| 49 | +- `stats.ts` -> `stats.controller.ts` |
| 50 | +- `languages.ts` -> `languages.controller.ts` |
| 51 | +- `graph.ts` -> `graph.controller.ts` |
| 52 | +- `badge.ts` -> `badge.controller.ts` |
| 53 | +- `controller.ts` -> `index.controller.ts` |
| 54 | + |
| 55 | +### Services renamed 🧰 |
| 56 | + |
| 57 | +- `base.ts` -> `base.service.ts` |
| 58 | +- `github-graphql-optimizer.ts` -> `github-graphql-optimizer.service.ts` |
| 59 | + |
| 60 | +## Compatibility 🔒 |
| 61 | + |
| 62 | +- No endpoint removals in this release. |
| 63 | +- Existing route behavior remains unchanged outside the documented badge collection improvements. |
| 64 | + |
| 65 | +## Verification Checklist ✅ |
| 66 | + |
| 67 | +- Build passes after import path updates. |
| 68 | +- `README.md` includes badge collection examples. |
| 69 | +- `package.json` version is `2.0.3`. |
| 70 | +- Controller and service imports use standardized file patterns. |
| 71 | + |
| 72 | +## Related Docs 📚 |
| 73 | + |
| 74 | +- `README.md` |
| 75 | +- `docs/example/badge-collection.md` |
| 76 | +- `docs/RELEASE/RELEASE_ICONS.md` |
0 commit comments