forked from AdithyanNellickal/api.enime.moe
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathapi-definition.json
1 lines (1 loc) · 14.9 KB
/
api-definition.json
1
{"openapi":"3.0.0","paths":{"/view/{animeIdentifier}/{episodeNumber}":{"get":{"operationId":"Get episode with anime ID/slug and episode number","summary":"Get an episode object with provided anime ID/slug and episode number","parameters":[{"name":"animeIdentifier","required":true,"in":"path","schema":{"type":"string"}},{"name":"episodeNumber","required":true,"in":"path","schema":{"type":"number"}}],"responses":{"200":{"description":"The found episode object with the ID provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Episode"}}}},"404":{"description":"The episode cannot be found within the database for given ID"}},"tags":["view"]}},"/anime/{id}/episodes":{"get":{"operationId":"Get anime episodes","summary":"Get an anime object's episodes in the service with ID or slug","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"The found anime object's episodes with the ID or slug provided","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Episode"}}}}},"404":{"description":"The anime cannot be found within the database for given ID"}},"tags":["anime"]}},"/anime/{id}":{"get":{"operationId":"Get anime","summary":"Get an anime object in the service with ID or slug","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}},{"name":"omit_episodes","required":false,"in":"query","description":"If episodes from anime object should be omitted. Useful for load times with anime with a lot of episodes","schema":{}}],"responses":{"200":{"description":"The found anime object with the ID or slug provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Anime"}}}},"404":{"description":"The anime cannot be found within the database for given ID"}},"tags":["anime"]}},"/stats":{"get":{"operationId":"Get stats","summary":"Get general stats about the API system","parameters":[],"responses":{"200":{"description":"The stats object","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Stats"}}}}},"tags":["stats"]}},"/recent":{"get":{"operationId":"Fetch recent episode releases","summary":"Get recent episode releases","parameters":[{"name":"page","required":false,"in":"query","description":"The page number of search list, default to 1","schema":{"type":"number"}},{"name":"perPage","required":false,"in":"query","description":"How many elements per page should this response have? Minimum: 1, maximum: 100","schema":{"type":"number"}}],"responses":{"200":{"description":"The list of recent episode releases, paginated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Recent"}}}}},"tags":["recent"]}},"/episode/{id}":{"get":{"operationId":"Get episode","summary":"Get an episode object with provided ID","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"The found episode object with the ID provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Episode"}}}},"404":{"description":"The episode cannot be found within the database for given ID"}},"tags":["episode"]}},"/popular":{"get":{"operationId":"List popular","summary":"List currently releasing anime sorted by popularity","parameters":[{"name":"page","required":false,"in":"query","description":"The page number of popularity list, default to 1","schema":{"type":"number"}},{"name":"perPage","required":false,"in":"query","description":"How many elements per page should this response have? Minimum: 1, maximum: 100","schema":{"type":"number"}}],"responses":{"200":{"description":"The list of anime matched from popularity query","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Popular"}}}}},"tags":["popular"]}},"/mapping/{provider}/{id}":{"get":{"operationId":"Get anime","summary":"Get an anime object in the service with ID from an external provider","parameters":[{"name":"provider","required":true,"in":"path","description":"The name of external provider. You can put any provider allowed in [\"mal\", \"anidb\", \"kitsu\", \"anilist\", \"thetvdb\", \"anisearch\", \"livechart\", \"notify.moe\", \"anime-planet\"]. Reminder: For TheTVDb there might be multiple anime entries with same TheTVDb ID (such as Komi Can't Communicate Season 1/2), in this case Enime will only return the first anime entry that matches the TVDb ID provided","schema":{"type":"string"}},{"name":"id","required":true,"in":"path","description":"The ID of that external provided specified above","schema":{"type":"string"}}],"responses":{"200":{"description":"The found anime object with the ID provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Anime"}}}},"404":{"description":"The anime cannot be found within the database for given ID"}},"tags":["mapping"]}},"/search/{query}":{"get":{"operationId":"Search Anime","summary":"Search anime based on query","parameters":[{"name":"query","required":true,"in":"path","schema":{"type":"string"}},{"name":"page","required":false,"in":"query","description":"The page number of search list, default to 1","schema":{"type":"number"}},{"name":"perPage","required":false,"in":"query","description":"How many elements per page should this response have? Minimum: 1, maximum: 100","schema":{"type":"number"}},{"name":"all","required":false,"in":"query","description":"Whether the search query should include all anime (including ones that aren't released yet)","schema":{"type":"boolean"}}],"responses":{"200":{"description":"The list of anime matched from search query","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Search"}}}},"429":{"description":"The API throttling has been reached, check response headers for more information"}},"tags":["search"]}},"/source/{id}":{"get":{"operationId":"Get source","summary":"Get a source object with provided ID","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"The found source object with the ID provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Source"}}}},"404":{"description":"The source cannot be found within the database for given ID"}},"tags":["source"]}}},"info":{"title":"Enime API","description":"An open source API service for developers to access anime info (as well as their video sources)","version":"1.0","contact":{"name":"Enime Team","url":"https://api.enime.moe","email":"team@enime.moe"}},"tags":[{"name":"anime","description":""},{"name":"recent","description":""},{"name":"episode","description":""},{"name":"search","description":""},{"name":"proxy","description":""}],"servers":[{"url":"https://api.enime.moe"}],"components":{"schemas":{"Source":{"type":"object","properties":{"id":{"type":"string","description":"Source ID","example":"cl5xgxxh2255801mnzpsq6xx8"},"url":{"type":"string","description":"Source url","example":"https://wwwx11.gogocdn.stream/videos/hls/WxUDti4tkwAmrtGldi_bHA/1659252376/188170/b5130f24fdc45958b378fa29fdb01a2c/ep.9.1657690095.m3u8"},"target":{"type":"string","description":"Source target","example":"/lycoris-recoil-episode-1"},"priority":{"type":"number","description":"The source priority, some sources are verified to be more stable than others, higher priority usually means more stability","example":1},"website":{"type":"string","description":"The source website name","example":"Gogoanime"},"subtitle":{"type":"boolean","description":"Sometimes the source website provides an external file as subtitle, this indicates if the current source has an external subtitle file","example":false},"referer":{"type":"object","description":"Sometimes the source website requires a `Referer` header in order to obtain the video file, this field is what you need to put for `Referer`"},"headers":{"type":"object","description":"Sometimes the source website requires special headers in order to obtain the video file, this field is what you need to put for those headers"},"browser":{"type":"boolean","description":"Due to CORS, some resources cannot be played by browsers, this field indicates whether the source can be safely played by browser. NOTE: If you are developing anything that's not a website then you can disregard this field","example":true}},"required":["id","url","target","priority","website","subtitle","referer","headers","browser"]},"Episode":{"type":"object","properties":{"id":{"type":"string","description":"Episode ID","example":"cl5xgxxh2255801mnzpsq6xx8"},"anime":{"type":"object","description":"Anime that has this episode"},"number":{"type":"number","description":"Episode number","example":1},"title":{"type":"object","description":"Episode title","example":"Easy Does It"},"titleVariations":{"type":"object","description":"Episode title variations","example":{"english":"Easy Does it","native":"Easy Does it"}},"description":{"type":"object","description":"Episode description","example":"Takina Inoue, a secret agent who protects the security of Japan called a “Lycoris,” is ordered to transfer to the café LycoReco in consequence of a certain incident. Takina is enthusiastic about returning to DA now that she’s buddied up with the super-elite No. 1 Lycoris (?) Chisato, but her job at LycoReco is just one weird thing after another!?"},"image":{"type":"object","description":"Episode image","example":"https://artworks.thetvdb.com/banners/v4/episode/8916235/screencap/62c116db01f7f.jpg"},"airedAt":{"type":"object","description":"Episode aired date","example":"2022-07-02T07:00:00.000Z"},"sources":{"description":"Episode sources","type":"array","items":{"$ref":"#/components/schemas/Source"}}},"required":["id","anime","number","title","titleVariations","description","image","airedAt","sources"]},"Relation":{"type":"object","properties":{"anime":{"type":"object","description":"Related anime"},"type":{"type":"string","description":"Type of the relation","example":"SEQUEL"}},"required":["anime","type"]},"Anime":{"type":"object","properties":{"id":{"type":"string","description":"Anime ID","example":"cl5xgvv4703502tmnd5g76sbv"},"slug":{"type":"string","description":"Anime slug","example":"lycoris-recoil"},"anilistId":{"type":"number","description":"Anilist ID","example":143270},"coverImage":{"type":"object","description":"Cover image","example":"https://s4.anilist.co/file/anilistcdn/media/anime/cover/large/bx143270-iZOJX2DMUFMC.jpg"},"bannerImage":{"type":"object","description":"Banner image","example":"https://s4.anilist.co/file/anilistcdn/media/anime/banner/143270-Ivjs2nVpARtS.jpg"},"status":{"type":"string","description":"Anime status","example":"RELEASING"},"format":{"type":"string","description":"Anime format","example":"TV"},"season":{"type":"string","description":"Anime season","example":"SUMMER"},"year":{"type":"number","description":"Year the anime was released","example":2022},"title":{"type":"object","description":"Anime title","example":{"native":"リコリス・リコイル","romaji":"Lycoris Recoil","english":"Lycoris Recoil"}},"currentEpisode":{"type":"number","description":"Current episode number","example":4},"next":{"type":"object","description":"Next episode air date","example":"2022-07-30T14:30:00.000Z"},"synonyms":{"description":"Synonyms / alternative titles","example":["ไลโคริส รีคอยล์","LycoRyco"],"type":"array","items":{"type":"string"}},"lastEpisodeUpdate":{"type":"object","description":"Last time the episode was updated in database","example":"2022-07-23T17:54:36.034Z"},"description":{"type":"object","description":"Anime description","example":"“LycoReco” is a café with a traditional Japanese twist located in downtown Tokyo. But the delicious coffee and sugary sweets are not the only orders this café takes! From delivering packages short distances, to pick-ups and drop-offs on the lonely streets at night, to zombies and giant monster extermination…?! Whatever your problem, we're here to help! We will solve any kind of \"trouble\" you may have!<br>\n<br>\nWaiting for you are the ever-smiling poster-girl and the cool, serious newcomer. A petite girl who never wants to work and a young woman approaching thirty who wants to get married. And the manager is a nice guy who’s obsessed with Japan!<br>\n<br>\nWhatever your order is, leave it all up to us♪<br><br>\n\n(Source: Official Site)"},"duration":{"type":"object","description":"Anime episode duration (in minutes)","example":24},"averageScore":{"type":"object","description":"Anime average rating (out of 100)","example":79},"popularity":{"type":"object","description":"Anime popularity","example":39358},"color":{"type":"object","description":"Anime theme color","example":"#e45078"},"mappings":{"type":"object","description":"ID mappings to other services","example":{"mal":50709,"anidb":17097,"kitsu":45705,"anilist":143270,"thetvdb":414057,"anisearch":16976,"livechart":11004,"notify.moe":"eDvRCcs7R","anime-planet":"lycoris-recoil"}},"genre":{"description":"Anime genres","example":["Action","Comedy","Slice of Life"],"type":"array","items":{"type":"string"}},"episodes":{"description":"Anime episodes","type":"array","items":{"$ref":"#/components/schemas/Episode"}},"relations":{"description":"Anime relations","type":"array","items":{"$ref":"#/components/schemas/Relation"}}},"required":["id","slug","anilistId","coverImage","bannerImage","status","format","season","year","title","currentEpisode","next","synonyms","lastEpisodeUpdate","description","duration","averageScore","popularity","color","mappings","genre","episodes","relations"]},"Stats":{"type":"object","properties":{"anime":{"type":"number","description":"Number of anime in the database","example":86},"episode":{"type":"number","description":"Number of episode in the database","example":986},"website":{"type":"number","description":"Number of websites that the system is actively scraping from","example":2},"sources":{"type":"object","description":"Number of source in the database","example":{"total":1217,"individual":[{"name":"Gogoanime","url":"https://gogoanime.lu","count":691},{"name":"Zoro","url":"https://zoro.to","count":526}]}}},"required":["anime","episode","website","sources"]},"Recent":{"type":"object","properties":{"data":{"description":"Episodes that have been recently released","type":"array","items":{"$ref":"#/components/schemas/Episode"}},"meta":{"type":"object","description":"Pagination meta","example":{"total":651,"lastPage":33,"currentPage":1,"perPage":20,"prev":null,"next":2}}},"required":["data","meta"]},"Popular":{"type":"object","properties":{"data":{"description":"Anime that are sorted with popular rating","type":"array","items":{"$ref":"#/components/schemas/Anime"}},"meta":{"type":"object","description":"Pagination meta","example":{"total":651,"lastPage":33,"currentPage":1,"perPage":20,"prev":null,"next":2}}},"required":["data","meta"]},"Search":{"type":"object","properties":{"data":{"description":"Anime entries that match the search query","type":"array","items":{"$ref":"#/components/schemas/Anime"}},"meta":{"type":"object","description":"Pagination meta","example":{"total":651,"lastPage":33,"currentPage":1,"perPage":20,"prev":null,"next":2}}},"required":["data","meta"]}}}}