From e702ae861cc0dab83dc0a4f0ccf088fe8750c38d Mon Sep 17 00:00:00 2001 From: nightcityblade Date: Mon, 20 Apr 2026 23:14:30 +0800 Subject: [PATCH 1/2] docs: add compare API request and response examples --- README.md | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/README.md b/README.md index a8c5341..5087478 100644 --- a/README.md +++ b/README.md @@ -171,6 +171,39 @@ pnpm run dev --- +--- + +## πŸ“‘ API Example + +The compare endpoint accepts one or more `username` query parameters. + +### Example request + +```bash +curl "http://localhost:3000/api/compare?username=octocat&username=torvalds" +``` + +### Example response + +```json +{ + "success": true, + "users": [ + { + "username": "octocat", + "name": "The Octocat", + "avatarUrl": "https://avatars.githubusercontent.com/u/583231?v=4", + "repoScore": 87, + "prScore": 64, + "contributionScore": 42, + "finalScore": 73, + "topRepos": [], + "topPullRequests": [] + } + ] +} +``` + ## 🌍 Localization * Supported languages: English πŸ‡ΊπŸ‡Έ, Arabic πŸ‡ΈπŸ‡¦ From bc02b224726991d191ea23c672c79343c657ebb8 Mon Sep 17 00:00:00 2001 From: nightcityblade Date: Tue, 21 Apr 2026 11:02:53 +0800 Subject: [PATCH 2/2] docs: use placeholder compare API path example --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 5087478..e15defa 100644 --- a/README.md +++ b/README.md @@ -180,7 +180,7 @@ The compare endpoint accepts one or more `username` query parameters. ### Example request ```bash -curl "http://localhost:3000/api/compare?username=octocat&username=torvalds" +curl "api/compare?username=devimpact&username=octocat" ``` ### Example response