mirror of
https://github.com/Shineii86/AniKotoAPI.git
synced 2026-10-22 02:45:10 +00:00
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:
@@ -363,3 +363,67 @@ async function getSchedule() {
|
||||
|
||||
getSchedule();
|
||||
```
|
||||
|
||||
### Latest Updated
|
||||
|
||||
```javascript
|
||||
const axios = require('axios');
|
||||
|
||||
async function getLatestUpdated(page = 1) {
|
||||
const { data } = await axios.get('https://anikototvapi.vercel.app/api/latest-updated', {
|
||||
params: { page }
|
||||
});
|
||||
|
||||
console.log('Recently updated anime:', data.results.length);
|
||||
return data.results;
|
||||
}
|
||||
|
||||
getLatestUpdated();
|
||||
```
|
||||
|
||||
### Seasons
|
||||
|
||||
```javascript
|
||||
const axios = require('axios');
|
||||
|
||||
async function getSeasons(animeId) {
|
||||
const { data } = await axios.get(`https://anikototvapi.vercel.app/api/seasons/${animeId}`);
|
||||
|
||||
console.log('Seasons:', data.results.length);
|
||||
return data.results;
|
||||
}
|
||||
|
||||
getSeasons(1642);
|
||||
```
|
||||
|
||||
### Watch Order
|
||||
|
||||
```javascript
|
||||
const axios = require('axios');
|
||||
|
||||
async function getWatchOrder(animeId) {
|
||||
const { data } = await axios.get(`https://anikototvapi.vercel.app/api/watch-order/${animeId}`);
|
||||
|
||||
console.log('Watch order entries:', data.results.length);
|
||||
return data.results;
|
||||
}
|
||||
|
||||
getWatchOrder(1642);
|
||||
```
|
||||
|
||||
### Download Links
|
||||
|
||||
```javascript
|
||||
const axios = require('axios');
|
||||
|
||||
async function getDownloadLinks(slug, episode) {
|
||||
const { data } = await axios.get('https://anikototvapi.vercel.app/api/download', {
|
||||
params: { slug, ep: episode }
|
||||
});
|
||||
|
||||
console.log('Download links:', data.results);
|
||||
return data.results;
|
||||
}
|
||||
|
||||
getDownloadLinks('one-piece-odmau', 1165);
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user