mirror of
https://github.com/Shineii86/MiruroAPI.git
synced 2026-10-22 02:05:10 +00:00
v2.0.0: Sync all docs — README, endpoints, OpenAPI, test suite
This commit is contained in:
@@ -4,8 +4,8 @@
|
||||
* Repository: https://github.com/Shineii86/MiruroAPI
|
||||
*
|
||||
* @description
|
||||
* Integration test suite for MiruroAPI endpoints.
|
||||
* Tests all major endpoints for correct response format.
|
||||
* Integration test suite for MiruroAPI v2.0.0 endpoints.
|
||||
* Tests all 35 endpoints for correct response format.
|
||||
*
|
||||
* @author Shinei Nouzen
|
||||
* @license MIT
|
||||
@@ -15,24 +15,66 @@
|
||||
const BASE = process.env.API_URL || "https://mirurotvapi.vercel.app/api";
|
||||
|
||||
const tests = [
|
||||
// System
|
||||
{ name: "Health", url: "/health" },
|
||||
{ name: "Stats", url: "/stats" },
|
||||
{ name: "OpenAPI", url: "/openapi" },
|
||||
|
||||
// Search & Discovery
|
||||
{ name: "Search", url: "/search?query=naruto" },
|
||||
{ name: "Suggestions", url: "/suggestions?query=naruto" },
|
||||
{ name: "Filter", url: "/filter?genre=Action&per_page=1" },
|
||||
{ name: "Multi-Search", url: "/multi-search?q=naruto&genre=Action" },
|
||||
|
||||
// Collections
|
||||
{ name: "Trending", url: "/trending?per_page=1" },
|
||||
{ name: "Trending Daily", url: "/trending/daily" },
|
||||
{ name: "Trending Weekly", url: "/trending/weekly" },
|
||||
{ name: "Popular", url: "/popular?per_page=1" },
|
||||
{ name: "Top", url: "/top?per_page=1" },
|
||||
{ name: "Upcoming", url: "/upcoming?per_page=1" },
|
||||
{ name: "Recent", url: "/recent?per_page=1" },
|
||||
{ name: "Spotlight", url: "/spotlight" },
|
||||
{ name: "Schedule", url: "/schedule" },
|
||||
{ name: "Random", url: "/random" },
|
||||
{ name: "Upcoming Countdown", url: "/upcoming/countdown" },
|
||||
|
||||
// Seasonal & Studio
|
||||
{ name: "Seasonal", url: "/season/2025/spring" },
|
||||
{ name: "Studio", url: "/studio/MAPPA" },
|
||||
|
||||
// Genres & Tags
|
||||
{ name: "Genres", url: "/genres" },
|
||||
{ name: "Tags", url: "/tags" },
|
||||
{ name: "Genre", url: "/genre/Action" },
|
||||
{ name: "Year", url: "/year/2024" },
|
||||
{ name: "Status", url: "/status/RELEASING" },
|
||||
{ name: "Format", url: "/format/MOVIE" },
|
||||
|
||||
// Character & Staff
|
||||
{ name: "Character", url: "/character/1" },
|
||||
{ name: "Staff", url: "/staff/1" },
|
||||
{ name: "Characters Search", url: "/characters?query=kaneki" },
|
||||
{ name: "Staff Search", url: "/staff?query=oda" },
|
||||
|
||||
// Anime Details
|
||||
{ name: "Info", url: "/info/20" },
|
||||
{ name: "Characters", url: "/anime/20/characters" },
|
||||
{ name: "Anime Characters", url: "/anime/20/characters" },
|
||||
{ name: "Relations", url: "/anime/20/relations" },
|
||||
{ name: "Recommendations", url: "/anime/20/recommendations" },
|
||||
|
||||
// Streaming
|
||||
{ name: "Episodes", url: "/episodes/20" },
|
||||
{ name: "Batch Episodes", url: "/episodes/20/batch?provider=kiwi&category=sub&slugs=animepahe-1,animepahe-2" },
|
||||
{ name: "Stream", url: "/stream?provider=kiwi&anilistId=20&category=sub&slug=animepahe-1" },
|
||||
{ name: "Download", url: "/download?provider=kiwi&anilistId=20&category=sub&slug=animepahe-1" },
|
||||
{ name: "Watch", url: "/watch/kiwi/20/sub/animepahe-1" },
|
||||
|
||||
// Utility
|
||||
{ name: "Compare", url: "/compare/20/21" },
|
||||
{ name: "Genre Stats", url: "/stats/genre" },
|
||||
{ name: "Calendar", url: "/calendar" },
|
||||
{ name: "Timeline", url: "/timeline/20" },
|
||||
];
|
||||
|
||||
let passed = 0;
|
||||
@@ -61,7 +103,7 @@ async function runTest(test) {
|
||||
}
|
||||
|
||||
async function runAll() {
|
||||
console.log(`\n🧪 Running ${tests.length} tests...\n`);
|
||||
console.log(`\n🧪 MiruroAPI v2.0.0 — Running ${tests.length} tests...\n`);
|
||||
|
||||
for (const test of tests) {
|
||||
await runTest(test);
|
||||
|
||||
Reference in New Issue
Block a user