diff --git a/labscore/api/endpoints.js b/labscore/api/endpoints.js index 950f610..5cd3959 100644 --- a/labscore/api/endpoints.js +++ b/labscore/api/endpoints.js @@ -29,11 +29,12 @@ const Api = Object.freeze({ IMAGE_EMOGEN: '/image/emogen/generate', + OMNI_ANIME: '/omni/anime', + OMNI_ANIME_SUPPLEMENTAL: '/omni/anime-supplemental', + PHOTOFUNIA_RETRO_WAVE: '/photofunia/retro-wave', PHOTOFUNIA_YACHT: '/photofunia/yacht', - SEARCH_ANIME: '/search/anime', - SEARCH_ANIME_SUPPLEMENTAL: '/search/anime-supplemental', SEARCH_BING: '/search/bing', SEARCH_BING_IMAGES: '/search/bing-images', SEARCH_GOOGLE: '/search/google', diff --git a/labscore/api/index.js b/labscore/api/index.js index b118ebe..768c72b 100644 --- a/labscore/api/index.js +++ b/labscore/api/index.js @@ -170,19 +170,6 @@ module.exports.rule34 = async function(context, query, service){ }) } -module.exports.anime = async function(context, query, includeAdultContent){ - return await request(Api.SEARCH_ANIME, "GET", {}, { - q: query, - include_adult: includeAdultContent - }) -} - -module.exports.animeSupplemental = async function(context, supplementalKey){ - return await request(Api.SEARCH_ANIME_SUPPLEMENTAL, "GET", {}, { - supplemental_key: supplementalKey - }) -} - module.exports.bing = async function(context, query, nsfw){ return await request(Api.SEARCH_BING, "GET", {}, { q: query, @@ -407,4 +394,19 @@ module.exports.emojiKitchen = async function(emoji){ collection: "emoji_kitchen_v6", q: emoji.join('_') }) +} + +// Omnisearch + +module.exports.anime = async function(context, query, includeAdultContent){ + return await request(Api.OMNI_ANIME, "GET", {}, { + q: query, + include_adult: includeAdultContent + }) +} + +module.exports.animeSupplemental = async function(context, supplementalKey){ + return await request(Api.OMNI_ANIME_SUPPLEMENTAL, "GET", {}, { + supplemental_key: supplementalKey + }) } \ No newline at end of file diff --git a/labscore/constants.js b/labscore/constants.js index f61e9cb..5db4f69 100644 --- a/labscore/constants.js +++ b/labscore/constants.js @@ -1658,4 +1658,20 @@ module.exports.PROVISIONAL_ACCOUNT_AVATARS = Object.freeze([ "https://discord.com/assets/0afec6e15d7c376edb17.png", "https://discord.com/assets/06c71afa509013e91173.png", "https://discord.com/assets/15a9b7ce7525b2fbe72f.png" -]) \ No newline at end of file +]) + +// Omnisearch + +// Anime Format Types (/omni_service/endpoints/anime.js) +const FORMAT_TYPES = { + TV: "Tv", + TV_SHORT: "Tv Short", + MOVIE: "Movie", + SPECIAL: "Special", + OVA: "OVA", + ONA: "ONA", + MUSIC: "Music", + MANGA: "Manga", + NOVEL: "Novel", + ONE_SHOT: "One Shot" +} \ No newline at end of file