Skip to content

Commit 27d463b

Browse files
committed
docs: improved api description and added git wiki link to rate limit error
1 parent 4f4880b commit 27d463b

File tree

2 files changed

+14
-4
lines changed

2 files changed

+14
-4
lines changed

api/errors.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ def rate_limit_handler(request: Request, exc: RateLimitExceeded):
6868
status_code = 429,
6969
content = {
7070
"error": "RateLimited",
71-
"message": f"Rate limit exceeded: {exc.detail} (Follow the rates: )" # TODO: Add link to git wiki page.
71+
"message": f"Rate limit exceeded: {exc.detail} (Follow the rates: https://github.com/THEGOLDENPRO/aghpb_api/wiki#rate-limiting)"
7272
}
7373
)
7474

api/main.py

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,11 +30,21 @@
3030
]
3131

3232
DESCRIPTION = """
33-
Behold the **anime girls holding programming books** API. ✴️
33+
<div align="center">
3434
35-
This is a ✨ feature rich 🌟 [open source](https://github.com/THEGOLDENPRO/aghpb_api) API I made for the anime girls holding programming books [github repo](https://github.com/cat-milk/Anime-Girls-Holding-Programming-Books) because I was bored.
35+
<img src="https://raw.githubusercontent.com/THEGOLDENPRO/aghpb_api/main/assets/logo.png" alt="Logo" width="180">
3636
37-
🐞 Report bugs [over here](https://github.com/THEGOLDENPRO/aghpb_api/issues).
37+
Behold the **anime girls holding programming books** API. ✴️
38+
39+
This is a ✨ feature rich 🌟 [open source](https://github.com/THEGOLDENPRO/aghpb_api) API I made for the anime girls holding programming books [github repo](https://github.com/cat-milk/Anime-Girls-Holding-Programming-Books) because I was bored.
40+
41+
🐞 Report bugs [over here](https://github.com/THEGOLDENPRO/aghpb_api/issues).
42+
43+
</div>
44+
45+
<br>
46+
47+
Rate limiting applies to the ``/random`` and ``/get`` endpoints. Check out the rate limits [over here](https://github.com/THEGOLDENPRO/aghpb_api/wiki#rate-limiting).
3848
"""
3949

4050
limiter = Limiter(key_func=get_remote_address, headers_enabled=True)

0 commit comments

Comments
 (0)