feat: upgrade to v2.0.0 with multi-mirror fallback, new endpoints, and LRU cache

- Add multi-mirror fallback system with 5 mirror domains
- Add LRU cache with configurable TTL per endpoint
- Add response compression (gzip)
- Add Seasons endpoint (/api/seasons/:id)
- Add Watch Order endpoint (/api/watch-order/:id)
- Add Latest Updated endpoint (/api/latest-updated)
- Add Download endpoint (/api/download)
- Add cache stats endpoint (/api/cache/stats)
- Add mirror status/reset endpoints (/api/mirrors, /api/mirrors/reset)
- Add configurable rate limiting with X-RateLimit headers
- Add request timeouts and entity too large handling
- Update documentation with all new endpoints
- Update CHANGELOG.md with v2.0.0 entry
- Update package.json version to 2.0.0
- Add 6 AI agent prompts for development
This commit is contained in:
Shinei Nouzen
2026-07-04 15:07:07 +05:30
parent 30feda703a
commit fe51275db0
51 changed files with 5151 additions and 342 deletions
+41 -8
View File
@@ -554,33 +554,66 @@ Returns trending anime for sidebar display.
## GET /seasons/:id
Get season information for an anime.
Get all seasons for an anime (main season, OVAs, movies, specials).
| Param | Type | Required | Description |
|-------|------|----------|-------------|
| `id` | string | Yes | Anime slug |
| `id` | number | Yes | Anime numeric ID |
```bash
curl "https://anikototvapi.vercel.app/api/seasons/one-piece-100"
curl "https://anikototvapi.vercel.app/api/seasons/1642"
```
Returns season data including related seasons.
Returns all seasons including OVAs, movies, and specials for the anime.
---
## GET /watch-order/:id
Get recommended watch order for an anime.
Get recommended watch order for an anime franchise.
| Param | Type | Required | Description |
|-------|------|----------|-------------|
| `id` | string | Yes | Anime slug |
| `id` | number | Yes | Anime numeric ID |
```bash
curl "https://anikototvapi.vercel.app/api/watch-order/one-piece-100"
curl "https://anikototvapi.vercel.app/api/watch-order/1642"
```
Returns recommended watch order sequence.
Returns recommended watch order sequence with relationship types.
---
## GET /latest-updated
Get recently updated anime sorted by update time.
| Param | Type | Required | Description |
|-------|------|----------|-------------|
| `page` | number | No | Page number (default: 1) |
```bash
curl "https://anikototvapi.vercel.app/api/latest-updated"
```
Returns paginated list of recently updated anime.
---
## GET /download
Get download links for an anime episode.
| Param | Type | Required | Description |
|-------|------|----------|-------------|
| `slug` | string | Yes | Anime slug |
| `ep` | number | Yes | Episode number |
```bash
curl "https://anikototvapi.vercel.app/api/download?slug=one-piece-odmau&ep=1165"
```
Returns decoded download links for the specified episode.
---