diff --git a/README.md b/README.md index 0b8b6fd..af37e4d 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,7 @@ Full API Implementation inside NodeJS Module - More info at [`Website`](https://api.universebot.space) - Documentation [`Website`](https://docs.universebot.space) - Get **API TOKEN** here [`Register`](https://api.universebot.space/auth/login) - - _Free trial **premium** for `3 days`._ + - _Free trial **premium** for `3 days` for new user._ - And you can upgrade your api token to premium, you can see more details at [`UPGRADE`](https://api.universebot.space/dashboard/premium) ## Installation @@ -17,39 +17,39 @@ yarn: ```bash $ yarn add @mgalacyber/universeapi ``` +pnpm: +```bash +$ pnpm add @mgalacyber/universeapi +``` ## Simple to Use ## CommonJs (CJS) syntax ```js -const { universeAPIClient } = require("@mgalacyber/universeapi"); +const { UniverseClient } = require("@mgalacyber/universeapi"); +const uAPI = new UniverseClient("API-TOKEN"); + +// Example of an API call +uAPI.V1.AI.OpenAI.GPT.Text({ + model: "gpt4", // Type of model used + version: 1, // Model version of rest api + prompt: "What is Galaxy Universe?" // Enter Your prompt here + +}).then((result) => console.log(result)); ``` ## ECMAScript Modules (ESM) syntax ```ts -import { universeAPIClient } from "@mgalacyber/universeapi"; -``` - -## Example -```js -const uAPI = new universeAPIClient("API-TOKEN"); - -// How to call the API -uAPI.[version].[features].[category](parameter) - .then(response => { - console.log(response); - }) - .catch(error => { - console.error(error.message); - }); +import { UniverseClient } from "@mgalacyber/universeapi"; +const uAPI = new UniverseClient("API-TOKEN"); // Example of an API call -uAPI.V1.Creator.Photooxy.Flaming("Universe API") - .then(response => { - console.log(response); - }) - .catch(error => { - console.error(error.message); - }); +uAPI.V1.AI.OpenAI.GPT.Text({ + model: "gpt4", // Type of model used + version: 1, // Model version of rest api + prompt: "What is Galaxy Universe?" // Enter Your prompt here + +}).then((result) => console.log(result)); ``` + # Feedback -If you have any feedback, please reach out to us at support@universebot.space \ No newline at end of file +If you have any feedback, please reach out to us at `support@universebot.space` \ No newline at end of file diff --git a/index.js b/index.js index 41e2085..959888d 100644 --- a/index.js +++ b/index.js @@ -1,6 +1,7 @@ // Check Update -const _checkUpdates = require("./src/checkUpdates"); -_checkUpdates(); +const packageNotifier = require("@mgalacyber/package-notifier"); +const packageFile = require("./package.json"); +packageNotifier(packageFile); // Import api module.exports = require("./src/main"); \ No newline at end of file diff --git a/package.json b/package.json index 6fa1be4..b3eefbf 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "@mgalacyber/universeapi", - "version": "2.1.10", - "description": "UniverseAPI Scraper package endpoint", + "version": "3.1.0", + "description": "UniverseAPI Wrapper package endpoint", "main": "index.js", "typings": "./typings/index.d.ts", "scripts": { @@ -9,13 +9,14 @@ }, "repository": { "type": "git", - "url": "git+https://github.com/UniverseBot/UniverseAPI-Scraper.git" + "url": "git+https://github.com/UniverseBot/UniverseAPI-Wrapper.git" }, "keywords": [ "Universe", "API", "endpoint", "rest-api", + "OpenAPI", "scraper", "api-scaper", "apis", @@ -26,10 +27,11 @@ "author": "MGalaCyber", "license": "Apache-2.0", "bugs": { - "url": "https://github.com/UniverseBot/UniverseAPI-Scraper/issues" + "url": "https://github.com/UniverseBot/UniverseAPI-Wrapper/issues" }, "homepage": "https://api.universebot.space", "dependencies": { + "@mgalacyber/package-notifier": "^1.0.1", "axios": "^1.6.5", "form-data": "^4.0.0" } diff --git a/src/checkUpdates.js b/src/checkUpdates.js deleted file mode 100644 index 6dd5340..0000000 --- a/src/checkUpdates.js +++ /dev/null @@ -1,29 +0,0 @@ -const axios = require("axios").default; - -module.exports = async () => { - try { - await axios.get("https://registry.npmjs.com/@mgalacyber/universeapi").then((result) => { - const currentVersion = require("../package.json").version; - const latestVersion = result.data["dist-tags"].latest; - - if (currentVersion !== latestVersion) { - console.log("\n\n"); - console.log("\x1b[32m" + "-----------------------------------------------------------"); - console.log("\x1b[32m" + "| @MGalaCyber/UniverseAPI - [] X |"); - console.log("\x1b[32m" + "-----------------------------------------------------------"); - console.log("\x1b[33m" + "| The module is\x1b[31m out of date!\x1b[33m |"); - console.log("\x1b[35m" + "| New version is available! |"); - console.log("\x1b[34m" + `| ${currentVersion} --> ${latestVersion} |`); - console.log("\x1b[36m" + "| Run |"); - console.log("\x1b[36m" + "| npm install @mgalacyber/universeapi@latest |"); - console.log("\x1b[36m" + "| to update |"); - console.log("\x1b[37m" + "| View the full changelog here: |"); - console.log("\x1b[31m" + "| https://www.npmjs.com/package/@mgalacyber/universeapi |"); - console.log("\x1b[32m" + "-----------------------------------------------------------\x1b[37m"); - console.log("\n\n"); - } - }); - } catch (error) { - console.error("Error checking for updates:", error.message); - } -}; \ No newline at end of file diff --git a/src/main.js b/src/main.js index 1a121b4..ee498c8 100644 --- a/src/main.js +++ b/src/main.js @@ -1,12 +1,25 @@ const { Method } = require("./method"); /** - * @class universeAPIClient + * @class UniverseClient */ -class universeAPIClient { - +class UniverseClient { /** - * @param {string} token provider https://api.universebot.space + * @requires A valid API token is required for accessing the API. + * @param {string} token The API token provided by https://api.universebot.space. + * @description This function initializes the universeAPI client with the provided token. + * @returns {void} + * @example + * const { UniverseClient } = require("@mgalacyber/universeapi"); + * const ApiToken = "UniverseAPI.XXXXXXXXXXXXX.XXXXXXXXXXXXX.XXXXXXXXXXXXX.XXXXXXXXXXXXX"; + * const uAPI = new UniverseClient(ApiToken); + * + * uAPI.V1.AI.OpenAI.GPT.Text({ + * model: "gpt4", // Type of model used (required) + * version: 1, // Model version of rest api (required) + * prompt: "Hello!" // Enter Your prompt here (required) + * + * }).then((result) => console.log(result)); */ constructor(token) { this.ApiToken = token ? token : ""; @@ -14,10 +27,10 @@ class universeAPIClient { }; async Api() { if (!this.ApiToken) { - console.error(`Unknown API TOKEN: Please enter your API token or Register first here ${this.BaseUrl}`) + console.error(`Unknown API TOKEN: Please enter your API token or Register first here ${this.BaseUrl}/register`); }; if (typeof this.ApiToken !== "string") { - console.error("Invalid API TOKEN: Token must be a String") + console.error("Invalid API TOKEN: Token must be a String"); }; return new Method(this.BaseUrl, { token: this.ApiToken }); }; @@ -29,7 +42,7 @@ class universeAPIClient { return { AI: { Blackbox: require("./v1/AI/Blackbox")(this.Api.bind(this)), - ChatGPT: require("./v1/AI/ChatGPT")(this.Api.bind(this)), + OpenAI: require("./v1/AI/OpenAI")(this.Api.bind(this)), Google: require("./v1/AI/Google")(this.Api.bind(this)), Microsoft: require("./v1/AI/Microsoft")(this.Api.bind(this)), StableDiffusion: require("./v1/AI/StableDiffusion")(this.Api.bind(this)), @@ -41,6 +54,9 @@ class universeAPIClient { Photooxy: require("./v1/Creator/Photooxy")(this.Api.bind(this)), Textpro: require("./v1/Creator/Textpro")(this.Api.bind(this)) }, + Detector: { + NSFW: require("./v1/Detector/NSFW")(this.Api.bind(this)) + }, Download: { AIO: require("./v1/Download/AIO")(this.Api.bind(this)), Audio: require("./v1/Download/Audio")(this.Api.bind(this)), @@ -55,14 +71,14 @@ class universeAPIClient { Youtube: require("./v1/Download/Youtube")(this.Api.bind(this)) }, Game: { - SusunKata: require("./v1/Game/SusunKata")(this.Api.bind(this)), - Tebakan: require("./v1/Game/Tebakan")(this.Api.bind(this)) + SusunKata: require("./v1/Games/SusunKata")(this.Api.bind(this)), + Tebakan: require("./v1/Games/Tebakan")(this.Api.bind(this)) }, Image: { - Pinterest: require("./v1/Image/Pinterest")(this.Api.bind(this)), - Remini: require("./v1/Image/Remini")(this.Api.bind(this)), - Wallpaper: require("./v1/Image/Wallpaper")(this.Api.bind(this)), - Wikipedia: require("./v1/Image/Wikipedia")(this.Api.bind(this)) + Pinterest: require("./v1/Images/Pinterest")(this.Api.bind(this)), + Remini: require("./v1/Images/Remini")(this.Api.bind(this)), + Wallpaper: require("./v1/Images/Wallpaper")(this.Api.bind(this)), + Wikipedia: require("./v1/Images/Wikipedia")(this.Api.bind(this)) }, Search: { Google: require("./v1/Search/Google")(this.Api.bind(this)) @@ -89,4 +105,4 @@ class universeAPIClient { }; }; -module.exports = { universeAPIClient }; \ No newline at end of file +module.exports = { UniverseClient }; \ No newline at end of file diff --git a/src/method.js b/src/method.js index 21881f7..2704d12 100644 --- a/src/method.js +++ b/src/method.js @@ -1,4 +1,4 @@ -const axios = require("axios"); +const Axios = require("axios"); const FormData = require("form-data"); class Method { @@ -11,14 +11,14 @@ class Method { this.token = token; } - async request(method, path = "", data = null, options = {}) { + async createRequest(method, path = "", data = null, options = {}) { const headers = { Authorization: this.token ? `Bearer ${this.token}` : "", ...options.headers, }; try { - const response = await axios({ + const getResponse = await Axios({ method, url: `${this.URI}/${path}`, headers, @@ -30,34 +30,34 @@ class Method { ...options, }); - return response.data; + return getResponse.data; } catch (error) { - return error; + return error.response.data; } } async Get(path = "/", query = {}, options = {}) { - return this.request("GET", path, query, options); + return this.createRequest("GET", path, query, options); } async Post(path = "", data = {}, options = {}) { - return this.request("POST", path, data, options); + return this.createRequest("POST", path, data, options); } async Put(path = "", data = {}, options = {}) { - return this.request("PUT", path, data, options); + return this.createRequest("PUT", path, data, options); } async Delete(path = "", options = {}) { - return this.request("DELETE", path, null, options); + return this.createRequest("DELETE", path, null, options); } async Patch(path = "", data = {}, options = {}) { - return this.request("PATCH", path, data, options); + return this.createRequest("PATCH", path, data, options); } async Options(path = "", options = {}) { - return this.request("OPTIONS", path, null, options); + return this.createRequest("OPTIONS", path, null, options); } } diff --git a/src/v1/AI/Blackbox.js b/src/v1/AI/Blackbox.js index 811a2fd..0f2ab33 100644 --- a/src/v1/AI/Blackbox.js +++ b/src/v1/AI/Blackbox.js @@ -1,6 +1,10 @@ module.exports = function(Api) { return { - Model1: async (prompt) => (await Api()).Get("v1/ai/blackbox/model1", { prompt }), - Model2v4: async (prompt) => (await Api()).Get("v1/ai/blackbox/model2-v4", { prompt }), + Text: async function(options) { + const { version, prompt } = options; + + if (version === 1) return (await Api()).Get("v1/ai/blackbox/model1", { prompt }); + if (version === 2) return (await Api()).Get("v1/ai/blackbox/model2", { prompt }); + } } }; \ No newline at end of file diff --git a/src/v1/AI/ChatGPT.js b/src/v1/AI/ChatGPT.js deleted file mode 100644 index 9293a8e..0000000 --- a/src/v1/AI/ChatGPT.js +++ /dev/null @@ -1,17 +0,0 @@ -module.exports = function(Api) { - return { - Model1: async (prompt) => (await Api()).Get("v1/ai/chatgpt/model1", { prompt }), - Model2: async (prompt) => (await Api()).Get("v1/ai/chatgpt/model2", { prompt }), - Model3: async (prompt) => (await Api()).Get("v1/ai/chatgpt/model3", { prompt }), - Model4: async (prompt) => (await Api()).Get("v1/ai/chatgpt/model4", { prompt }), - Model5: async (prompt) => (await Api()).Get("v1/ai/chatgpt/model5", { prompt }), - Model6: async (prompt) => (await Api()).Get("v1/ai/chatgpt/model6", { prompt }), - Model7Go: async (prompt) => (await Api()).Get("v1/ai/chatgpt/model7-go", { prompt }), - Model8Prompt: async (prompt, text) => (await Api()).Get("v1/ai/chatgpt/model8-prompt", { prompt, text }), - Model9v4: async (prompt) => (await Api()).Get("v1/ai/chatgpt/model9-v4", { prompt }), - Model10v4: async (prompt) => (await Api()).Get("v1/ai/chatgpt/model10-v4", { prompt }), - Model11Dalle: async (prompt) => (await Api()).Get("v1/ai/chatgpt/model11-dalle", { prompt }), - Model12Turbo: async (prompt) => (await Api()).Get("v1/ai/chatgpt/model12-turbo", { prompt }), - Model13Turbo: async (prompt) => (await Api()).Get("v1/ai/chatgpt/model13-turbo", { prompt }), - } -}; \ No newline at end of file diff --git a/src/v1/AI/Google.js b/src/v1/AI/Google.js index 8887b32..147d098 100644 --- a/src/v1/AI/Google.js +++ b/src/v1/AI/Google.js @@ -1,13 +1,32 @@ module.exports = function(Api) { return { Gemini: { - Pro: async (prompt) => (await Api()).Get("v1/ai/google/gemini/pro", { prompt }), - ProVisionModelAttach: async (image, prompt) => (await Api()).Post("v1/ai/google/gemini/pro-vision-attach", { image, prompt }), - ProVisionModelUrl: async (image, prompt) => (await Api()).Get("v1/ai/google/gemini/pro-vision-url", { image, prompt }) + Text: async function(options) { + const { model, version, prompt } = options; + + if (model === "1.0-pro") { + if (version === 1) return (await Api()).Get("v1/ai/google/gemini/1.0-pro/text/model1", { prompt }); + if (version === 2) return (await Api()).Get("v1/ai/google/gemini/1.0-pro/text/model2", { prompt }); + if (version === 3) return (await Api()).Get("v1/ai/google/gemini/1.0-pro/text/model3", { prompt }); + } + }, + Vision: async function(options) { + const { model, type, version, image, prompt } = options; + + if (model === "1.0-pro" && type === "attacment") { + if (version === 1) return (await Api()).Post("v1/ai/google/gemini/1.1-pro/vision/attach/model1_deprecated", { image, prompt }); + } + if (model === "1.0-pro" && type === "url") { + if (version === 1) return (await Api()).Get("v1/ai/google/gemini/1.1-pro/vision/url/model1_deprecated", { image, prompt }); + } + }, }, Bard: { - Model1: async (prompt) => (await Api()).Get("v1/ai/google/bard/model1", { prompt }), - Model2Image: async (url, prompt) => (await Api()).Get("v1/ai/google/bard/model2-img", { url, prompt }), - } + Text: async function(options) { + const { version, prompt } = options; + + if (version === 1) return (await Api()).Get("v1/ai/google/bard/text/model1_deprecated", { prompt }); + }, + }, } }; \ No newline at end of file diff --git a/src/v1/AI/Microsoft.js b/src/v1/AI/Microsoft.js index e56c1f4..05e8b43 100644 --- a/src/v1/AI/Microsoft.js +++ b/src/v1/AI/Microsoft.js @@ -1,8 +1,16 @@ module.exports = function(Api) { return { - Bing: { - Model1: async (prompt) => (await Api()).Get("v1/ai/microsoft/bing/model1", { prompt }), - Model2Image: async (url, prompt) => (await Api()).Get("v1/ai/microsoft/bing/model2-img", { url, prompt }), + BING: { + Text: async function(options) { + const { version, prompt } = options; + + if (version === 1) return (await Api()).Get("v1/ai/microsoft/bing/text/model1", { prompt }); + }, + Image: async function(options) { + const { version, url, prompt } = options; + + if (version === 1) return (await Api()).Get("v1/ai/microsoft/bing/image/model1", { url, prompt }); + }, } } }; \ No newline at end of file diff --git a/src/v1/AI/OpenAI.js b/src/v1/AI/OpenAI.js new file mode 100644 index 0000000..e11b766 --- /dev/null +++ b/src/v1/AI/OpenAI.js @@ -0,0 +1,35 @@ +module.exports = function(Api) { + return { + GPT: { + Text: async function(options) { + const { model, version, prompt } = options; + + if (model === "gpt3.5-turbo") { + if (version === 1) return (await Api()).Get("v1/ai/openai/gpt3.5-turbo/model1", { prompt }); + if (version === 2) return (await Api()).Get("v1/ai/openai/gpt3.5-turbo/model2", { prompt }); + if (version === 3) return (await Api()).Get("v1/ai/openai/gpt3.5-turbo/model3", { prompt }); + if (version === 4) return (await Api()).Get("v1/ai/openai/gpt3.5-turbo/model4", { prompt }); + if (version === 5) return (await Api()).Get("v1/ai/openai/gpt3.5-turbo/model5", { prompt }); + if (version === 6) return (await Api()).Get("v1/ai/openai/gpt3.5-turbo/model6", { prompt }); + if (version === 7) return (await Api()).Get("v1/ai/openai/gpt3.5-turbo/model7", { prompt }); + if (version === 8) return (await Api()).Get("v1/ai/openai/gpt3.5-turbo/model8", { prompt }); + } + if (model === "gpt4") { + if (version === 1) return (await Api()).Get("v1/ai/openai/gpt4/model1", { prompt }); + if (version === 2) return (await Api()).Get("v1/ai/openai/gpt4/model2", { prompt }); + if (version === 3) return (await Api()).Get("v1/ai/openai/gpt4/model3", { prompt }); + } + } + }, + DALLE: { + Generate: async function(options) { + const { model, version, prompt } = options; + + if (model === "dalle-2") { + if (version === 1) return (await Api()).Get("v1/ai/openai/dall-e-2/model1", { prompt }); + if (version === 2) return (await Api()).Get("v1/ai/openai/dall-e-2/model2", { prompt }); + } + } + } + } +}; \ No newline at end of file diff --git a/src/v1/AI/StableDiffusion.js b/src/v1/AI/StableDiffusion.js index 71aaf84..05d4722 100644 --- a/src/v1/AI/StableDiffusion.js +++ b/src/v1/AI/StableDiffusion.js @@ -1,5 +1,9 @@ module.exports = function(Api) { return { - Model1: async (prompt) => (await Api()).Get("v1/ai/stablediffusion/model1", { prompt }), + Generate: async function(options) { + const { version, prompt } = options; + + if (version === 1) return (await Api()).Get("v1/ai/stablediffusion/model1", { prompt }); + } } }; \ No newline at end of file diff --git a/src/v1/AI/TextToImage.js b/src/v1/AI/TextToImage.js index a7ec23c..0bef48f 100644 --- a/src/v1/AI/TextToImage.js +++ b/src/v1/AI/TextToImage.js @@ -1,10 +1,15 @@ module.exports = function(Api) { return { - Model1: async (prompt) => (await Api()).Get("v1/ai/text2img/model1", { prompt }), - Model2: async (prompt) => (await Api()).Get("v1/ai/text2img/model2", { prompt }), - Model3: async (prompt) => (await Api()).Get("v1/ai/text2img/model3", { prompt }), - Model4: async (prompt) => (await Api()).Get("v1/ai/text2img/model4", { prompt }), - Model5: async (prompt) => (await Api()).Get("v1/ai/text2img/model5", { prompt }), - Model6: async (prompt) => (await Api()).Get("v1/ai/text2img/model6", { prompt }), + Generate: async function(options) { + const { version, prompt } = options; + + if (version === 1) return (await Api()).Get("v1/ai/text2img/model1", { prompt }); + if (version === 2) return (await Api()).Get("v1/ai/text2img/model2", { prompt }); + if (version === 3) return (await Api()).Get("v1/ai/text2img/model3", { prompt }); + if (version === 4) return (await Api()).Get("v1/ai/text2img/model4", { prompt }); + if (version === 5) return (await Api()).Get("v1/ai/text2img/model5", { prompt }); + if (version === 6) return (await Api()).Get("v1/ai/text2img/model6", { prompt }); + if (version === 7) return (await Api()).Get("v1/ai/text2img/model7", { prompt }); + } } }; \ No newline at end of file diff --git a/src/v1/AI/ToAnime.js b/src/v1/AI/ToAnime.js index c202f90..f1c0761 100644 --- a/src/v1/AI/ToAnime.js +++ b/src/v1/AI/ToAnime.js @@ -1,5 +1,9 @@ module.exports = function(Api) { return { - Model1: async (url) => (await Api()).Get("v1/ai/toanime/model1", { url }), + Generate: async function(options) { + const { version, url } = options; + + if (version === 1) return (await Api()).Get("v1/ai/toanime/model1", { url }); + } } }; \ No newline at end of file diff --git a/src/v1/Creator/Ephoto.js b/src/v1/Creator/Ephoto.js index a75f374..c13a968 100644 --- a/src/v1/Creator/Ephoto.js +++ b/src/v1/Creator/Ephoto.js @@ -1,76 +1,112 @@ module.exports = function(Api) { return { - Artistic: async (text, url) => (await Api()).Get("v1/creator/ephoto/artistic", { text, url }), - Diary: async (text, url) => (await Api()).Get("v1/creator/ephoto/diary", { text, url }), - Cyberpunk: async (url) => (await Api()).Get("v1/creator/ephoto/cyberpunk", { url }), - Billboard: async (url) => (await Api()).Get("v1/creator/ephoto/billboard", { url }), - Fire: async (url) => (await Api()).Get("v1/creator/ephoto/fire", { url }), - Rain: async (url) => (await Api()).Get("v1/creator/ephoto/rain", { url }), - Cat: async (url) => (await Api()).Get("v1/creator/ephoto/cat", { url }), - Ring: async (url) => (await Api()).Get("v1/creator/ephoto/ring", { url }), - Collage: async (url) => (await Api()).Get("v1/creator/ephoto/collage", { url }), - Sad: async (url) => (await Api()).Get("v1/creator/ephoto/sad", { url }), - CinemaGraph: async (url) => (await Api()).Get("v1/creator/ephoto/cinema-graph", { url }), - DiaryFrame: async (text, url) => (await Api()).Get("v1/creator/ephoto/diary-frame", { text, url }), - Wood: async (text1, text2) => (await Api()).Get("v1/creator/ephoto/wood", { text1, text2 }), - Television: async (text) => (await Api()).Get("v1/creator/ephoto/television", { text }), - Glasses: async (text) => (await Api()).Get("v1/creator/ephoto/glasses", { text }), - Blackpink: async (text) => (await Api()).Get("v1/creator/ephoto/blackpink", { text }), - Neonbp: async (text) => (await Api()).Get("v1/creator/ephoto/neonbp", { text }), - Juventus: async (text, number) => (await Api()).Get("v1/creator/ephoto/juventus", { text, number }), - CoverPUBG: async (text) => (await Api()).Get("v1/creator/ephoto/cover-pubg", { text }), - GreenBrush: async (text) => (await Api()).Get("v1/creator/ephoto/green-brush", { text }), - Eraser: async (text) => (await Api()).Get("v1/creator/ephoto/eraser", { text }), - DragonFire: async (text) => (await Api()).Get("v1/creator/ephoto/dragon-fire", { text }), - Incandescent: async (text) => (await Api()).Get("v1/creator/ephoto/incandescent", { text }), - Typography1: async (text) => (await Api()).Get("v1/creator/ephoto/typography1", { text }), - Typography2: async (text) => (await Api()).Get("v1/creator/ephoto/typography2", { text }), - Letters: async (text) => (await Api()).Get("v1/creator/ephoto/letters", { text }), - Cloth: async (text) => (await Api()).Get("v1/creator/ephoto/cloth", { text }), - Graffiti: async (text) => (await Api()).Get("v1/creator/ephoto/graffiti", { text }), - Metals: async (text) => (await Api()).Get("v1/creator/ephoto/metals", { text }), - BlueNeon: async (text) => (await Api()).Get("v1/creator/ephoto/blue-neon", { text }), - NightStars: async (text) => (await Api()).Get("v1/creator/ephoto/night-stars", { text }), - Cloud: async (text) => (await Api()).Get("v1/creator/ephoto/cloud", { text }), - Caper: async (text) => (await Api()).Get("v1/creator/ephoto/caper", { text }), - Horror: async (text) => (await Api()).Get("v1/creator/ephoto/horror", { text }), - Sunlight: async (text) => (await Api()).Get("v1/creator/ephoto/sunlight", { text }), - Cake: async (text) => (await Api()).Get("v1/creator/ephoto/cake", { text }), - Pig: async (text) => (await Api()).Get("v1/creator/ephoto/pig", { text }), - Hallowen: async (text) => (await Api()).Get("/v1/creator/ephoto/hallowen", { text }), - LeafGraphy: async (text) => (await Api()).Get("/v1/creator/ephoto/leaf-graphy", { text }), - Water: async (text) => (await Api()).Get("/v1/creator/ephoto/water", { text }), - WriteStatus: async (text1, text2) => (await Api()).Get("/v1/creator/ephoto/write-status", { text1, text2 }), - Scholes: async (text, number) => (await Api()).Get("/v1/creator/ephoto/scholes", { text, number }), - Heated: async (text1, text2) => (await Api()).Get("/v1/creator/ephoto/heated", { text1, text2 }), - Buoys: async (text1, text2) => (await Api()).Get("/v1/creator/ephoto/buoys", { text1, text2 }), - QuotesStatus: async (text1, text2) => (await Api()).Get("/v1/creator/ephoto/quotes-status", { text1, text2 }), - NeonBlue: async (text) => (await Api()).Get("/v1/creator/ephoto/neon-blue", { text }), - Foggy: async (text) => (await Api()).Get("/v1/creator/ephoto/foggy", { text }), - Crack: async (text) => (await Api()).Get("/v1/creator/ephoto/crack", { text }), - Puppy: async (text) => (await Api()).Get("/v1/creator/ephoto/puppy", { text }), - Metals: async (text) => (await Api()).Get("/v1/creator/ephoto/metals", { text }), - PUBGAvatar: async (text) => (await Api()).Get("/v1/creator/ephoto/pubg-avatar", { text }), - Adventure: async (text1, text2, url) => (await Api()).Get("/v1/creator/ephoto/adventure", { text1, text2, url }), - Notebook: async (text1, text2, url) => (await Api()).Get("/v1/creator/ephoto/notebook", { text1, text2, url }), - WPoster: async (text1, text2, url) => (await Api()).Get("/v1/creator/ephoto/wposter", { text1, text2, url }), - VHS: async (url) => (await Api()).Get("/v1/creator/ephoto/vhs", { url }), - Memories: async (url) => (await Api()).Get("/v1/creator/ephoto/memories", { url }), - Glazing: async (text, url) => (await Api()).Get("/v1/creator/ephoto/glazing", { text, url }), - Flower: async (url) => (await Api()).Get("/v1/creator/ephoto/flower", { url }), - Heart: async (url) => (await Api()).Get("/v1/creator/ephoto/heart", { url }), - Smoke: async (url) => (await Api()).Get("/v1/creator/ephoto/smoke", { url }), - HandleFire: async (url) => (await Api()).Get("/v1/creator/ephoto/handle-fire", { url }), - Specturm: async (url) => (await Api()).Get("/v1/creator/ephoto/specturm", { url }), - Painting: async (url) => (await Api()).Get("/v1/creator/ephoto/painting", { url }), - Tiger: async (text) => (await Api()).Get("/v1/creator/ephoto/tiger", { text }), - American: async (text) => (await Api()).Get("/v1/creator/ephoto/american", { text }), - Pencil: async (text1, text2) => (await Api()).Get("/v1/creator/ephoto/pencil", { text1, text2 }), - Arrow1: async (text) => (await Api()).Get("/v1/creator/ephoto/arrow1", { text }), - Arrow2: async (text) => (await Api()).Get("/v1/creator/ephoto/arrow2", { text }), - Anonymous: async (text) => (await Api()).Get("/v1/creator/ephoto/anonymous", { text }), - AOV: async (text) => (await Api()).Get("/v1/creator/ephoto/aov", { text }), - Warface: async (text) => (await Api()).Get("/v1/creator/ephoto/warface", { text }), - MobileLegend: async (text) => (await Api()).Get("/v1/creator/ephoto/mobile-legend", { text }) + TextOnly: { + Generate: async function(options) { + const { model, text } = options; + + if (model === "Television") return (await Api()).Get("v1/creator/ephoto/television", { text }); + if (model === "Glasses") return (await Api()).Get("v1/creator/ephoto/glasses", { text }); + if (model === "Blackpink") return (await Api()).Get("v1/creator/ephoto/blackpink", { text }); + if (model === "Neonbp") return (await Api()).Get("v1/creator/ephoto/neonbp", { text }); + if (model === "CoverPUBG") return (await Api()).Get("v1/creator/ephoto/cover-pubg", { text }); + if (model === "GreenBrush") return (await Api()).Get("v1/creator/ephoto/green-brush", { text }); + if (model === "Eraser") return (await Api()).Get("v1/creator/ephoto/eraser", { text }); + if (model === "DragonFire") return (await Api()).Get("v1/creator/ephoto/dragon-fire", { text }); + if (model === "Incandescent") return (await Api()).Get("v1/creator/ephoto/incandescent", { text }); + if (model === "Typography1") return (await Api()).Get("v1/creator/ephoto/typography1", { text }); + if (model === "Typography2") return (await Api()).Get("v1/creator/ephoto/typography2", { text }); + if (model === "Letters") return (await Api()).Get("v1/creator/ephoto/letters", { text }); + if (model === "Cloth") return (await Api()).Get("v1/creator/ephoto/cloth", { text }); + if (model === "Graffiti") return (await Api()).Get("v1/creator/ephoto/graffiti", { text }); + if (model === "Metals") return (await Api()).Get("v1/creator/ephoto/metals", { text }); + if (model === "BlueNeon") return (await Api()).Get("v1/creator/ephoto/blue-neon", { text }); + if (model === "NightStars") return (await Api()).Get("v1/creator/ephoto/night-stars", { text }); + if (model === "Cloud") return (await Api()).Get("v1/creator/ephoto/cloud", { text }); + if (model === "Caper") return (await Api()).Get("v1/creator/ephoto/caper", { text }); + if (model === "Horror") return (await Api()).Get("v1/creator/ephoto/horror", { text }); + if (model === "Sunlight") return (await Api()).Get("v1/creator/ephoto/sunlight", { text }); + if (model === "Cake") return (await Api()).Get("v1/creator/ephoto/cake", { text }); + if (model === "Pig") return (await Api()).Get("v1/creator/ephoto/pig", { text }); + if (model === "Hallowen") return (await Api()).Get("v1/creator/ephoto/hallowen", { text }); + if (model === "LeafGraphy") return (await Api()).Get("v1/creator/ephoto/leaf-graphy", { text }); + if (model === "Water") return (await Api()).Get("v1/creator/ephoto/water", { text }); + if (model === "NeonBlue") return (await Api()).Get("v1/creator/ephoto/neon-blue", { text }); + if (model === "Foggy") return (await Api()).Get("v1/creator/ephoto/foggy", { text }); + if (model === "Crack") return (await Api()).Get("v1/creator/ephoto/crack", { text }); + if (model === "Puppy") return (await Api()).Get("v1/creator/ephoto/puppy", { text }); + if (model === "Metals") return (await Api()).Get("v1/creator/ephoto/metals", { text }); + if (model === "PUBGAvatar") return (await Api()).Get("v1/creator/ephoto/pubg-avatar", { text }); + if (model === "Tiger") return (await Api()).Get("v1/creator/ephoto/tiger", { text }); + if (model === "American") return (await Api()).Get("v1/creator/ephoto/american", { text }); + if (model === "Arrow1") return (await Api()).Get("v1/creator/ephoto/arrow1", { text }); + if (model === "Arrow2") return (await Api()).Get("v1/creator/ephoto/arrow2", { text }); + if (model === "Anonymous") return (await Api()).Get("v1/creator/ephoto/anonymous", { text }); + if (model === "AOV") return (await Api()).Get("v1/creator/ephoto/aov", { text }); + if (model === "Warface") return (await Api()).Get("v1/creator/ephoto/warface", { text }); + if (model === "MobileLegend") return (await Api()).Get("v1/creator/ephoto/mobile-legend", { text }); + } + }, + UrlOnly: { + Generate: async function(options) { + const { model, url } = options; + + if (model === "Cyberpunk") return (await Api()).Get("v1/creator/ephoto/cyberpunk", { url }); + if (model === "Billboard") return (await Api()).Get("v1/creator/ephoto/billboard", { url }); + if (model === "Fire") return (await Api()).Get("v1/creator/ephoto/fire", { url }); + if (model === "Rain") return (await Api()).Get("v1/creator/ephoto/rain", { url }); + if (model === "Cat") return (await Api()).Get("v1/creator/ephoto/cat", { url }); + if (model === "Ring") return (await Api()).Get("v1/creator/ephoto/ring", { url }); + if (model === "Collage") return (await Api()).Get("v1/creator/ephoto/collage", { url }); + if (model === "Sad") return (await Api()).Get("v1/creator/ephoto/sad", { url }); + if (model === "CinemaGraph") return (await Api()).Get("v1/creator/ephoto/cinema-graph", { url }); + if (model === "VHS") return (await Api()).Get("v1/creator/ephoto/vhs", { url }); + if (model === "Memories") return (await Api()).Get("v1/creator/ephoto/memories", { url }); + if (model === "Flower") return (await Api()).Get("v1/creator/ephoto/flower", { url }); + if (model === "Heart") return (await Api()).Get("v1/creator/ephoto/heart", { url }); + if (model === "Smoke") return (await Api()).Get("v1/creator/ephoto/smoke", { url }); + if (model === "HandleFire") return (await Api()).Get("v1/creator/ephoto/handle-fire", { url }); + if (model === "Specturm") return (await Api()).Get("v1/creator/ephoto/specturm", { url }); + if (model === "Painting") return (await Api()).Get("v1/creator/ephoto/painting", { url }); + } + }, + TextWithUrl: { + Generate: async function(options) { + const { model, text, url } = options; + + if (model === "Artistic") return (await Api()).Get("v1/creator/ephoto/artistic", { text, url }); + if (model === "Diary") return (await Api()).Get("v1/creator/ephoto/diary", { text, url }); + if (model === "DiaryFrame") return (await Api()).Get("v1/creator/ephoto/diary-frame", { text, url }); + if (model === "Glazing") return (await Api()).Get("v1/creator/ephoto/glazing", { text, url }); + } + }, + TextWithNumber: { + Generate: async function(options) { + const { model, text, number } = options; + + if (model === "Juventus") return (await Api()).Get("v1/creator/ephoto/juventus", { text, number }); + if (model === "Scholes") return (await Api()).Get("v1/creator/ephoto/scholes", { text, number }); + } + }, + DoubleText: { + Generate: async function(options) { + const { model, text1, text2 } = options; + + if (model === "Wood") return (await Api()).Get("v1/creator/ephoto/wood", { text1, text2 }); + if (model === "WriteStatus") return (await Api()).Get("v1/creator/ephoto/write-status", { text1, text2 }); + if (model === "Heated") return (await Api()).Get("v1/creator/ephoto/heated", { text1, text2 }); + if (model === "Buoys") return (await Api()).Get("v1/creator/ephoto/buoys", { text1, text2 }); + if (model === "QuotesStatus") return (await Api()).Get("v1/creator/ephoto/quotes-status", { text1, text2 }); + if (model === "Pencil") return (await Api()).Get("v1/creator/ephoto/pencil", { text1, text2 }); + } + }, + DoubleTextWithUrl: { + Generate: async function(options) { + const { model, text1, text2, url } = options; + + if (model === "Adventure") return (await Api()).Get("v1/creator/ephoto/adventure", { text1, text2, url }); + if (model === "Notebook") return (await Api()).Get("v1/creator/ephoto/notebook", { text1, text2, url }); + if (model === "WPoster") return (await Api()).Get("v1/creator/ephoto/wposter", { text1, text2, url }); + } + }, } }; \ No newline at end of file diff --git a/src/v1/Creator/Photooxy.js b/src/v1/Creator/Photooxy.js index f37975e..97e6f75 100644 --- a/src/v1/Creator/Photooxy.js +++ b/src/v1/Creator/Photooxy.js @@ -1,46 +1,64 @@ module.exports = function(Api) { return { - Flaming: async (text) => (await Api()).Get("v1/creator/photooxy/flaming", { text }), - ShadowSky: async (text) => (await Api()).Get("v1/creator/photooxy/shadow-sky", { text }), - Metallic: async (text) => (await Api()).Get("v1/creator/photooxy/metallic", { text }), - Naruto: async (text) => (await Api()).Get("v1/creator/photooxy/naruto", { text }), - Pubg: async (text1, text2) => (await Api()).Get("v1/creator/photooxy/pubg", { text1, text2 }), - UnderGrass: async (text) => (await Api()).Get("v1/creator/photooxy/under-grass", { text }), - HarryPotter: async (text) => (await Api()).Get("v1/creator/photooxy/harry-potter", { text }), - FlowerTypography: async (text) => (await Api()).Get("v1/creator/photooxy/flower-typography", { text }), - PictureOfLove: async (text) => (await Api()).Get("v1/creator/photooxy/picture-of-love", { text }), - CoffeeCup: async (text) => (await Api()).Get("v1/creator/photooxy/coffee-cup", { text }), - Butterfly: async (text) => (await Api()).Get("v1/creator/photooxy/butterfly", { text }), - NightSky: async (text) => (await Api()).Get("v1/creator/photooxy/night-sky", { text }), - CarvedWood: async (text) => (await Api()).Get("v1/creator/photooxy/carved-wood", { text }), - IlluminatedMetallic: async (text) => (await Api()).Get("v1/creator/photooxy/illuminated-metallic", { text }), - SweetCandy: async (text) => (await Api()).Get("v1/creator/photooxy/sweet-candy", { text }), - Coffee: async (text) => (await Api()).Get("v1/creator/photooxy/coffee", { text }), - QuotedWood: async (text) => (await Api()).Get("v1/creator/photooxy/quoted-wood", { text }), - Flame: async (url) => (await Api()).Get("v1/creator/photooxy/flame", { url }), - Frame: async (url) => (await Api()).Get("v1/creator/photooxy/frame", { url }), - Memory: async (url) => (await Api()).Get("v1/creator/photooxy/memory", { url }), - Nature: async (url) => (await Api()).Get("v1/creator/photooxy/nature", { url }), - Ripped: async (url) => (await Api()).Get("v1/creator/photooxy/ripped", { url }), - Tearing: async (url) => (await Api()).Get("v1/creator/photooxy/tearing", { url }), - Iphone: async (url) => (await Api()).Get("v1/creator/photooxy/iphone", { url }), - Anaglyph: async (url) => (await Api()).Get("v1/creator/photooxy/anaglyph", { url }), - Mirrors: async (url) => (await Api()).Get("v1/creator/photooxy/mirrors", { url }), - Shattered: async (url) => (await Api()).Get("v1/creator/photooxy/shattered", { url }), - Burning: async (url) => (await Api()).Get("v1/creator/photooxy/burning", { url }), - Place: async (url) => (await Api()).Get("v1/creator/photooxy/place", { url }), - Toilet: async (url) => (await Api()).Get("v1/creator/photooxy/toilet", { url }), - Exposure: async (url) => (await Api()).Get("v1/creator/photooxy/exposure", { url }), - SlideText: async (text) => (await Api()).Get("v1/creator/photooxy/slide-text", { text }), - Graffiti: async (text) => (await Api()).Get("v1/creator/photooxy/graffiti", { text }), - Rainbow: async (text) => (await Api()).Get("v1/creator/photooxy/rainbow", { text }), - OceanSea: async (text) => (await Api()).Get("v1/creator/photooxy/ocean-sea", { text }), - Romantic: async (text) => (await Api()).Get("v1/creator/photooxy/romantic", { text }), - Smoke: async (text) => (await Api()).Get("v1/creator/photooxy/smoke", { text }), - Glitch: async (text1, text2) => (await Api()).Get("v1/creator/photooxy/glitch", { text1, text2 }), - BurnPaper: async (text) => (await Api()).Get("v1/creator/photooxy/burn-paper", { text }), - LoveMessage: async (text) => (await Api()).Get("v1/creator/photooxy/love-message", { text }), - LoveText: async (text) => (await Api()).Get("v1/creator/photooxy/love-text", { text }), - Shadow: async (text) => (await Api()).Get("v1/creator/photooxy/shadow", { text }) + TextOnly: { + Generate: async function(options) { + const { model, text } = options; + + if (model === "Flaming") return (await Api()).Get("v1/creator/photooxy/flaming", { text }); + if (model === "ShadowSky") return (await Api()).Get("v1/creator/photooxy/shadow-sky", { text }); + if (model === "Metallic") return (await Api()).Get("v1/creator/photooxy/metallic", { text }); + if (model === "Naruto") return (await Api()).Get("v1/creator/photooxy/naruto", { text }); + if (model === "UnderGrass") return (await Api()).Get("v1/creator/photooxy/under-grass", { text }); + if (model === "HarryPotter") return (await Api()).Get("v1/creator/photooxy/harry-potter", { text }); + if (model === "FlowerTypography") return (await Api()).Get("v1/creator/photooxy/flower-typography", { text }); + if (model === "PictureOfLove") return (await Api()).Get("v1/creator/photooxy/picture-of-love", { text }); + if (model === "CoffeeCup") return (await Api()).Get("v1/creator/photooxy/coffee-cup", { text }); + if (model === "Butterfly") return (await Api()).Get("v1/creator/photooxy/butterfly", { text }); + if (model === "NightSky") return (await Api()).Get("v1/creator/photooxy/night-sky", { text }); + if (model === "CarvedWood") return (await Api()).Get("v1/creator/photooxy/carved-wood", { text }); + if (model === "IlluminatedMetallic") return (await Api()).Get("v1/creator/photooxy/illuminated-metallic", { text }); + if (model === "SweetCandy") return (await Api()).Get("v1/creator/photooxy/sweet-candy", { text }); + if (model === "Coffee") return (await Api()).Get("v1/creator/photooxy/coffee", { text }); + if (model === "QuotedWood") return (await Api()).Get("v1/creator/photooxy/quoted-wood", { text }); + if (model === "SlideText") return (await Api()).Get("v1/creator/photooxy/slide-text", { text }); + if (model === "Graffiti") return (await Api()).Get("v1/creator/photooxy/graffiti", { text }); + if (model === "Rainbow") return (await Api()).Get("v1/creator/photooxy/rainbow", { text }); + if (model === "OceanSea") return (await Api()).Get("v1/creator/photooxy/ocean-sea", { text }); + if (model === "Romantic") return (await Api()).Get("v1/creator/photooxy/romantic", { text }); + if (model === "Smoke") return (await Api()).Get("v1/creator/photooxy/smoke", { text }); + if (model === "BurnPaper") return (await Api()).Get("v1/creator/photooxy/burn-paper", { text }); + if (model === "LoveMessage") return (await Api()).Get("v1/creator/photooxy/love-message", { text }); + if (model === "LoveText") return (await Api()).Get("v1/creator/photooxy/love-text", { text }); + if (model === "Shadow") return (await Api()).Get("v1/creator/photooxy/shadow", { text }); + } + }, + UrlOnly: { + Generate: async function(options) { + const { model, url } = options; + + if (model === "Flame") return (await Api()).Get("v1/creator/photooxy/flame", { url }); + if (model === "Frame") return (await Api()).Get("v1/creator/photooxy/frame", { url }); + if (model === "Memory") return (await Api()).Get("v1/creator/photooxy/memory", { url }); + if (model === "Nature") return (await Api()).Get("v1/creator/photooxy/nature", { url }); + if (model === "Ripped") return (await Api()).Get("v1/creator/photooxy/ripped", { url }); + if (model === "Tearing") return (await Api()).Get("v1/creator/photooxy/tearing", { url }); + if (model === "Iphone") return (await Api()).Get("v1/creator/photooxy/iphone", { url }); + if (model === "Anaglyph") return (await Api()).Get("v1/creator/photooxy/anaglyph", { url }); + if (model === "Mirrors") return (await Api()).Get("v1/creator/photooxy/mirrors", { url }); + if (model === "Shattered") return (await Api()).Get("v1/creator/photooxy/shattered", { url }); + if (model === "Burning") return (await Api()).Get("v1/creator/photooxy/burning", { url }); + if (model === "Place") return (await Api()).Get("v1/creator/photooxy/place", { url }); + if (model === "Toilet") return (await Api()).Get("v1/creator/photooxy/toilet", { url }); + if (model === "Exposure") return (await Api()).Get("v1/creator/photooxy/exposure", { url }); + } + }, + DoubleText: { + Generate: async function(options) { + const { model, text1, text2 } = options; + + if (model === "Pubg") return (await Api()).Get("v1/creator/photooxy/pubg", { text1, text2 }); + if (model === "Glitch") return (await Api()).Get("v1/creator/photooxy/glitch", { text1, text2 }); + } + }, } }; \ No newline at end of file diff --git a/src/v1/Creator/Textpro.js b/src/v1/Creator/Textpro.js index c7066a5..6552b68 100644 --- a/src/v1/Creator/Textpro.js +++ b/src/v1/Creator/Textpro.js @@ -1,57 +1,69 @@ module.exports = function(Api) { return { - Pencil: async (text) => (await Api()).Get("v1/creator/textpro/pencil", { text }), - Glitch1: async (text) => (await Api()).Get("v1/creator/textpro/glitch1", { text }), - Glitch2: async (text) => (await Api()).Get("v1/creator/textpro/glitch2", { text }), - GlitchTiktok: async (text1, text2) => (await Api()).Get("v1/creator/textpro/glitch-tiktok", { text1, text2 }), - Blackpink: async (text) => (await Api()).Get("v1/creator/textpro/blackpink", { text }), - Berry: async (text) => (await Api()).Get("v1/creator/textpro/berry", { text }), - Neon: async (text) => (await Api()).Get("v1/creator/textpro/neon", { text }), - LogoBear: async (text) => (await Api()).Get("v1/creator/textpro/logo-bear", { text }), - LogoNinja: async (text1, text2) => (await Api()).Get("v1/creator/textpro/logo-ninja", { text1, text2 }), - Christmas3D: async (text) => (await Api()).Get("v1/creator/textpro/3d-christmas", { text }), - Boxtext3D: async (text) => (await Api()).Get("v1/creator/textpro/3d-boxtext", { text }), - NeonLight3D: async (text) => (await Api()).Get("v1/creator/textpro/3d-neon-light", { text }), - OrangeJuice3D: async (text) => (await Api()).Get("v1/creator/textpro/3d-orange-juice", { text }), - Thunder1: async (text) => (await Api()).Get("v1/creator/textpro/thunder1", { text }), - Thunder2: async (text) => (await Api()).Get("v1/creator/textpro/thunder2", { text }), - VideoGameClassic: async (text1, text2) => (await Api()).Get("v1/creator/textpro/video-game-classic", { text1, text2 }), - MarvelStudios: async (text1, text2) => (await Api()).Get("v1/creator/textpro/marvel-studios", { text1, text2 }), - GreenHorror: async (text) => (await Api()).Get("v1/creator/textpro/green-horror", { text }), - Magma: async (text) => (await Api()).Get("v1/creator/textpro/magma", { text }), - ChocolateCake: async (text) => (await Api()).Get("v1/creator/textpro/chocolate-cake", { text }), - Strawberry: async (text) => (await Api()).Get("v1/creator/textpro/strawberry", { text }), - Layered: async (text1, text2) => (await Api()).Get("v1/creator/textpro/layered", { text1, text2 }), - Paper: async (text) => (await Api()).Get("v1/creator/textpro/paper", { text }), - Pornhub: async (text1, text2) => (await Api()).Get("v1/creator/textpro/pornhub", { text1, text2 }), - HarryPotter: async (text) => (await Api()).Get("v1/creator/textpro/harry-potter", { text }), - Embossed: async (text) => (await Api()).Get("v1/creator/textpro/embossed", { text }), - Broken: async (text) => (await Api()).Get("v1/creator/textpro/broken", { text }), - Glosy: async (text) => (await Api()).Get("v1/creator/textpro/glosy", { text }), - Bear: async (text) => (await Api()).Get("v1/creator/textpro/bear", { text }), - Devil: async (text) => (await Api()).Get("v1/creator/textpro/devil", { text }), - Christmas: async (text) => (await Api()).Get("v1/creator/textpro/christmas", { text }), - Dropwater: async (text) => (await Api()).Get("v1/creator/textpro/dropwater", { text }), - Carbon: async (text) => (await Api()).Get("v1/creator/textpro/carbon", { text }), - ImgGlitch: async (text) => (await Api()).Get("v1/creator/textpro/img-glitch", { text }), - AGlitch: async (text1, text2) => (await Api()).Get("v1/creator/textpro/aglitch", { text1, text2 }), - Gradient: async (text) => (await Api()).Get("v1/creator/textpro/gradient", { text }), - Glue: async (text) => (await Api()).Get("v1/creator/textpro/glue", { text }), - Bood: async (text) => (await Api()).Get("v1/creator/textpro/bood", { text }), - Firework: async (text) => (await Api()).Get("v1/creator/textpro/firework", { text }), - Stone: async (text) => (await Api()).Get("v1/creator/textpro/stone", { text }), - Light: async (text) => (await Api()).Get("v1/creator/textpro/light", { text }), - Transformer: async (text) => (await Api()).Get("v1/creator/textpro/transformer", { text }), - VideoGame: async (text) => (await Api()).Get("v1/creator/textpro/video-game", { text }), - Fiction: async (text) => (await Api()).Get("v1/creator/textpro/fiction", { text }), - CaptainAmerica: async (text) => (await Api()).Get("v1/creator/textpro/captain-america", { text }), - Metalic: async (text) => (await Api()).Get("v1/creator/textpro/metalic", { text }), - Metallic: async (text) => (await Api()).Get("v1/creator/textpro/metallic", { text }), - Discovery: async (text) => (await Api()).Get("v1/creator/textpro/discovery", { text }), - Circuit: async (text) => (await Api()).Get("v1/creator/textpro/circuit", { text }), - Sketch: async (text) => (await Api()).Get("v1/creator/textpro/sketch", { text }), - CHoror: async (text1, text2) => (await Api()).Get("v1/creator/textpro/choror", { text1, text2 }), - Spooky: async (text1, text2) => (await Api()).Get("v1/creator/textpro/spooky", { text1, text2 }), - Skeleton: async (text) => (await Api()).Get("v1/creator/textpro/skeleton", { text }) + TextOnly: { + Generate: async function(options) { + const { model, text } = options; + + if (model === "Pencil") return (await Api()).Get("v1/creator/textpro/pencil", { text }); + if (model === "Glitch1") return (await Api()).Get("v1/creator/textpro/glitch1", { text }); + if (model === "Glitch2") return (await Api()).Get("v1/creator/textpro/glitch2", { text }); + if (model === "Blackpink") return (await Api()).Get("v1/creator/textpro/blackpink", { text }); + if (model === "Berry") return (await Api()).Get("v1/creator/textpro/berry", { text }); + if (model === "Neon") return (await Api()).Get("v1/creator/textpro/neon", { text }); + if (model === "LogoBear") return (await Api()).Get("v1/creator/textpro/logo-bear", { text }); + if (model === "Christmas3D") return (await Api()).Get("v1/creator/textpro/3d-christmas", { text }); + if (model === "Boxtext3D") return (await Api()).Get("v1/creator/textpro/3d-boxtext", { text }); + if (model === "NeonLight3D") return (await Api()).Get("v1/creator/textpro/3d-neon-light", { text }); + if (model === "OrangeJuice3D") return (await Api()).Get("v1/creator/textpro/3d-orange-juice", { text }); + if (model === "Thunder1") return (await Api()).Get("v1/creator/textpro/thunder1", { text }); + if (model === "Thunder2") return (await Api()).Get("v1/creator/textpro/thunder2", { text }); + if (model === "GreenHorror") return (await Api()).Get("v1/creator/textpro/green-horror", { text }); + if (model === "Magma") return (await Api()).Get("v1/creator/textpro/magma", { text }); + if (model === "ChocolateCake") return (await Api()).Get("v1/creator/textpro/chocolate-cake", { text }); + if (model === "Strawberry") return (await Api()).Get("v1/creator/textpro/strawberry", { text }); + if (model === "Paper") return (await Api()).Get("v1/creator/textpro/paper", { text }); + if (model === "HarryPotter") return (await Api()).Get("v1/creator/textpro/harry-potter", { text }); + if (model === "Embossed") return (await Api()).Get("v1/creator/textpro/embossed", { text }); + if (model === "Broken") return (await Api()).Get("v1/creator/textpro/broken", { text }); + if (model === "Glosy") return (await Api()).Get("v1/creator/textpro/glosy", { text }); + if (model === "Bear") return (await Api()).Get("v1/creator/textpro/bear", { text }); + if (model === "Devil") return (await Api()).Get("v1/creator/textpro/devil", { text }); + if (model === "Christmas") return (await Api()).Get("v1/creator/textpro/christmas", { text }); + if (model === "Dropwater") return (await Api()).Get("v1/creator/textpro/dropwater", { text }); + if (model === "Carbon") return (await Api()).Get("v1/creator/textpro/carbon", { text }); + if (model === "ImgGlitch") return (await Api()).Get("v1/creator/textpro/img-glitch", { text }); + if (model === "Gradient") return (await Api()).Get("v1/creator/textpro/gradient", { text }); + if (model === "Glue") return (await Api()).Get("v1/creator/textpro/glue", { text }); + if (model === "Bood") return (await Api()).Get("v1/creator/textpro/bood", { text }); + if (model === "Firework") return (await Api()).Get("v1/creator/textpro/firework", { text }); + if (model === "Stone") return (await Api()).Get("v1/creator/textpro/stone", { text }); + if (model === "Metalic") return (await Api()).Get("v1/creator/textpro/metalic", { text }); + if (model === "Metallic") return (await Api()).Get("v1/creator/textpro/metallic", { text }); + if (model === "Discovery") return (await Api()).Get("v1/creator/textpro/discovery", { text }); + if (model === "Circuit") return (await Api()).Get("v1/creator/textpro/circuit", { text }); + if (model === "Sketch") return (await Api()).Get("v1/creator/textpro/sketch", { text }); + if (model === "Skeleton") return (await Api()).Get("v1/creator/textpro/skeleton", { text }); + if (model === "Light") return (await Api()).Get("v1/creator/textpro/light", { text }); + if (model === "Transformer") return (await Api()).Get("v1/creator/textpro/transformer", { text }); + if (model === "VideoGame") return (await Api()).Get("v1/creator/textpro/video-game", { text }); + if (model === "Fiction") return (await Api()).Get("v1/creator/textpro/fiction", { text }); + if (model === "CaptainAmerica") return (await Api()).Get("v1/creator/textpro/captain-america", { text }); + } + }, + DoubleText: { + Generate: async function(options) { + const { model, text1, text2 } = options; + + if (model === "GlitchTiktok") return (await Api()).Get("v1/creator/textpro/glitch-tiktok", { text1, text2 }); + if (model === "LogoNinja") return (await Api()).Get("v1/creator/textpro/logo-ninja", { text1, text2 }); + if (model === "VideoGameClassic") return (await Api()).Get("v1/creator/textpro/video-game-classic", { text1, text2 }); + if (model === "MarvelStudios") return (await Api()).Get("v1/creator/textpro/marvel-studios", { text1, text2 }); + if (model === "Layered") return (await Api()).Get("v1/creator/textpro/layered", { text1, text2 }); + if (model === "Pornhub") return (await Api()).Get("v1/creator/textpro/pornhub", { text1, text2 }); + if (model === "AGlitch") return (await Api()).Get("v1/creator/textpro/aglitch", { text1, text2 }); + if (model === "CHoror") return (await Api()).Get("v1/creator/textpro/choror", { text1, text2 }); + if (model === "Spooky") return (await Api()).Get("v1/creator/textpro/spooky", { text1, text2 }); + } + }, } }; \ No newline at end of file diff --git a/src/v1/Detector/NSFW.js b/src/v1/Detector/NSFW.js new file mode 100644 index 0000000..55cbe3d --- /dev/null +++ b/src/v1/Detector/NSFW.js @@ -0,0 +1,9 @@ +module.exports = function(Api) { + return { + Analysis: async function(options) { + const { version, url } = options; + + if (version === 1) return (await Api()).Get("v1/detector/nsfw/model1", { url }); + } + } +}; \ No newline at end of file diff --git a/src/v1/Download/AIO.js b/src/v1/Download/AIO.js index 35f68f0..14d9405 100644 --- a/src/v1/Download/AIO.js +++ b/src/v1/Download/AIO.js @@ -1,9 +1,12 @@ module.exports = function(Api) { return { - Pinterest: async (url) => (await Api()).Get("v1/download/aio/pinterest", { url }), - IFunny: async (url) => (await Api()).Get("v1/download/aio/ifunny", { url }), - ImDB: async (url) => (await Api()).Get("v1/download/aio/imdb", { url }), - Cocofun: async (url) => (await Api()).Get("v1/download/aio/cocofun", { url }), - LineSticker: async (url) => (await Api()).Get("v1/download/aio/line-sticker", { url }) + Analysis: async function(options) { + const { model, url } = options; + + if (model === "IFunny") return (await Api()).Get("v1/download/aio/ifunny", { url }); + if (model === "ImDB") return (await Api()).Get("v1/download/aio/imdb", { url }); + if (model === "Cocofun") return (await Api()).Get("v1/download/aio/cocofun", { url }); + if (model === "LineSticker") return (await Api()).Get("v1/download/aio/line-sticker", { url }); + } } }; \ No newline at end of file diff --git a/src/v1/Download/Audio.js b/src/v1/Download/Audio.js index 949411e..59b100f 100644 --- a/src/v1/Download/Audio.js +++ b/src/v1/Download/Audio.js @@ -1,9 +1,33 @@ module.exports = function(Api) { return { - SoundCloud1: async (url) => (await Api()).Get("v1/download/audio/soundcloud1", { url }), - SoundCloud2: async (url) => (await Api()).Get("v1/download/audio/soundcloud2", { url }), - Ringtone: async (query) => (await Api()).Get("v1/download/audio/ringtone", { query }), - SoundOfText: async (text, language) => (await Api()).Get("v1/download/audio/soundoftext", { text, language }), - Joox: async (query) => (await Api()).Get("v1/download/audio/joox", { query }) + SoundCloud: { + Analysis: async function(options) { + const { version, url } = options; + + if (version === 1) return (await Api()).Get("v1/download/audio/soundcloud1", { url }); + if (version === 2) return (await Api()).Get("v1/download/audio/soundcloud2", { url }); + } + }, + Ringtone: { + Analysis: async function(options) { + const { version, query } = options; + + if (version === 1) return (await Api()).Get("v1/download/audio/ringtone", { query }); + } + }, + Ntts: { + Generate: async function(options) { + const { version, text, language } = options; + + if (version === 1) return (await Api()).Get("v1/download/audio/soundoftext", { text, language }); + } + }, + Joox: { + Generate: async function(options) { + const { version, query } = options; + + if (version === 1) return (await Api()).Get("v1/download/audio/joox", { query }); + } + }, } }; \ No newline at end of file diff --git a/src/v1/Download/Facebook.js b/src/v1/Download/Facebook.js index 0765401..0662fbd 100644 --- a/src/v1/Download/Facebook.js +++ b/src/v1/Download/Facebook.js @@ -1,7 +1,11 @@ module.exports = function(Api) { return { - Model1: async (url) => (await Api()).Get("v1/download/facebook/model1", { url }), - Model2: async (url) => (await Api()).Get("v1/download/facebook/model2", { url }), - Model3: async (url) => (await Api()).Get("v1/download/facebook/model3", { url }) + Analysis: async function(options) { + const { version, url } = options; + + if (version === 1) return (await Api()).Get("v1/download/facebook/model1", { url }); + if (version === 2) return (await Api()).Get("v1/download/facebook/model2", { url }); + if (version === 3) return (await Api()).Get("v1/download/facebook/model3", { url }); + } } }; \ No newline at end of file diff --git a/src/v1/Download/File.js b/src/v1/Download/File.js index ffb9536..4426257 100644 --- a/src/v1/Download/File.js +++ b/src/v1/Download/File.js @@ -1,11 +1,53 @@ module.exports = function(Api) { return { - SFileMobiSearch: async (query) => (await Api()).Get("v1/download/file/sfilemobisearch", { query }), - SFileMobi: async (url) => (await Api()).Get("v1/download/file/sfilemobi", { url }), - ZippyShare: async (url) => (await Api()).Get("v1/download/file/zippyshare", { url }), - MediaFire: async (url) => (await Api()).Get("v1/download/file/mediafire", { url }), - Apkdl: async (url) => (await Api()).Get("v1/download/file/apkdl", { url }), - GoogleDrive: async (url) => (await Api()).Get("v1/download/file/gdrive", { url }), - Gore: async (url) => (await Api()).Get("v1/download/file/gore", { url }) + GoogleDrive: { + Analysis: async function(options) { + const { version, url } = options; + + if (version === 1) return (await Api()).Get("v1/download/file/gdrive", { url }); + } + }, + MediaFire: { + Analysis: async function(options) { + const { version, url } = options; + + if (version === 1) return (await Api()).Get("v1/download/file/mediafire", { url }); + } + }, + SFileMobiSearch: { + Analysis: async function(options) { + const { version, query } = options; + + if (version === 1) return (await Api()).Get("v1/download/file/sfilemobisearch", { query }); + } + }, + SFileMobiDownload: { + Analysis: async function(options) { + const { version, url } = options; + + if (version === 1) return (await Api()).Get("v1/download/file/sfilemobi", { url }); + } + }, + APKDL: { + Analysis: async function(options) { + const { version, url } = options; + + if (version === 1) return (await Api()).Get("v1/download/file/apkdl", { url }); + } + }, + Gore: { + Analysis: async function(options) { + const { version, url } = options; + + if (version === 1) return (await Api()).Get("v1/download/file/gore", { url }); + } + }, + ZippyShare: { + Analysis: async function(options) { + const { version, url } = options; + + if (version === 1) return (await Api()).Get("v1/download/file/zippyshare_deprecated", { url }); + } + } } }; \ No newline at end of file diff --git a/src/v1/Download/Instagram.js b/src/v1/Download/Instagram.js index 2804501..68246e8 100644 --- a/src/v1/Download/Instagram.js +++ b/src/v1/Download/Instagram.js @@ -1,10 +1,22 @@ module.exports = function(Api) { return { - Model1: async (url) => (await Api()).Get("v1/download/instagram/model1", { url }), - Model2: async (url) => (await Api()).Get("v1/download/instagram/model2", { url }), - Model3: async (url) => (await Api()).Get("v1/download/instagram/model3", { url }), - Model4: async (url) => (await Api()).Get("v1/download/instagram/model4", { url }), - Model5TV: async (url) => (await Api()).Get("v1/download/instagram/model5-tv", { url }), - Model6Stories: async (username) => (await Api()).Get("v1/download/instagram/model6-stories", { username }) + Reels: { + Analysis: async function(options) { + const { version, url } = options; + + if (version === 1) return (await Api()).Get("v1/download/instagram/model1", { url }); + if (version === 2) return (await Api()).Get("v1/download/instagram/model2", { url }); + if (version === 3) return (await Api()).Get("v1/download/instagram/model3", { url }); + if (version === 4) return (await Api()).Get("v1/download/instagram/model4", { url }); + if (version === 5) return (await Api()).Get("v1/download/instagram/model5-tv", { url }); + }, + }, + Stories: { + Analysis: async function(options) { + const { version, username } = options; + + if (version === 1) return (await Api()).Get("v1/download/instagram/model6-stories", { username }); + } + } } }; \ No newline at end of file diff --git a/src/v1/Download/Pinterest.js b/src/v1/Download/Pinterest.js index 27fb937..52bc1c2 100644 --- a/src/v1/Download/Pinterest.js +++ b/src/v1/Download/Pinterest.js @@ -1,5 +1,12 @@ module.exports = function(Api) { return { - Model1: async (url) => (await Api()).Get("v1/download/pinterest/model1", { url }) + Video: { + Analysis: async function(options) { + const { version, url } = options; + + if (version === 1) return (await Api()).Get("v1/download/pinterest/model1", { url }); + if (version === 2) return (await Api()).Get("v1/download/pinterest/model2", { url }); + } + } } }; \ No newline at end of file diff --git a/src/v1/Download/Porn.js b/src/v1/Download/Porn.js index c9b3b15..5849e6b 100644 --- a/src/v1/Download/Porn.js +++ b/src/v1/Download/Porn.js @@ -1,6 +1,18 @@ module.exports = function(Api) { return { - XNXX: async (url) => (await Api()).Get("v1/download/porn/xnxx", { url }), - XVideos: async (url) => (await Api()).Get("v1/download/porn/xvideos", { url }) + XNXX: { + Analysis: async function(options) { + const { version, url } = options; + + if (version === 1) return (await Api()).Get("v1/download/porn/xnxx", { url }); + } + }, + XVideos: { + Analysis: async function(options) { + const { version, url } = options; + + if (version === 1) return (await Api()).Get("v1/download/porn/xvideos", { url }); + } + } } }; \ No newline at end of file diff --git a/src/v1/Download/Thread.js b/src/v1/Download/Thread.js index 21833bc..6e59d94 100644 --- a/src/v1/Download/Thread.js +++ b/src/v1/Download/Thread.js @@ -1,5 +1,9 @@ module.exports = function(Api) { return { - Model1: async (url) => (await Api()).Get("v1/download/thread/model1", { url }) + Analysis: async function(options) { + const { version, url } = options; + + if (version === 1) return (await Api()).Get("v1/download/thread/model1", { url }); + } } }; \ No newline at end of file diff --git a/src/v1/Download/Tiktok.js b/src/v1/Download/Tiktok.js index 8d48a04..b423856 100644 --- a/src/v1/Download/Tiktok.js +++ b/src/v1/Download/Tiktok.js @@ -1,14 +1,18 @@ module.exports = function(Api) { return { - Model1: async (url) => (await Api()).Get("v1/download/tiktok/model1", { url }), - Model2: async (url) => (await Api()).Get("v1/download/tiktok/model2", { url }), - Model3: async (url) => (await Api()).Get("v1/download/tiktok/model3", { url }), - Model4: async (url) => (await Api()).Get("v1/download/tiktok/model4", { url }), - Model5: async (url) => (await Api()).Get("v1/download/tiktok/model5", { url }), - Model6: async (url) => (await Api()).Get("v1/download/tiktok/model6", { url }), - Model7: async (url) => (await Api()).Get("v1/download/tiktok/model7", { url }), - Model8: async (url) => (await Api()).Get("v1/download/tiktok/model8", { url }), - Model9Music: async (url) => (await Api()).Get("v1/download/tiktok/model9-music", { url }), - Model10Slide: async (url) => (await Api()).Get("v1/download/tiktok/model10-slide", { url }) + Analysis: async function(options) { + const { version, url } = options; + + if (version === 1) return (await Api()).Get("v1/download/tiktok/model1", { url }); + if (version === 2) return (await Api()).Get("v1/download/tiktok/model2", { url }); + if (version === 3) return (await Api()).Get("v1/download/tiktok/model3", { url }); + if (version === 4) return (await Api()).Get("v1/download/tiktok/model4", { url }); + if (version === 5) return (await Api()).Get("v1/download/tiktok/model5", { url }); + if (version === 6) return (await Api()).Get("v1/download/tiktok/model6", { url }); + if (version === 7) return (await Api()).Get("v1/download/tiktok/model7", { url }); + if (version === 8) return (await Api()).Get("v1/download/tiktok/model8", { url }); + if (version === 9) return (await Api()).Get("v1/download/tiktok/model9-music", { url }); + if (version === 10) return (await Api()).Get("v1/download/tiktok/model10-slide", { url }); + } } }; \ No newline at end of file diff --git a/src/v1/Download/Twitter.js b/src/v1/Download/Twitter.js index 4d6fd7d..6b94caf 100644 --- a/src/v1/Download/Twitter.js +++ b/src/v1/Download/Twitter.js @@ -1,7 +1,11 @@ module.exports = function(Api) { return { - Model1: async (url) => (await Api()).Get("v1/download/twitter/model1", { url }), - Model2: async (url) => (await Api()).Get("v1/download/twitter/model2", { url }), - Model3: async (url) => (await Api()).Get("v1/download/twitter/model3", { url }) + Analysis: async function(options) { + const { version, url } = options; + + if (version === 1) return (await Api()).Get("v1/download/twitter/model1", { url }); + if (version === 2) return (await Api()).Get("v1/download/twitter/model2", { url }); + if (version === 3) return (await Api()).Get("v1/download/twitter/model3", { url }); + } } }; \ No newline at end of file diff --git a/src/v1/Download/Youtube.js b/src/v1/Download/Youtube.js index 48407e4..192d782 100644 --- a/src/v1/Download/Youtube.js +++ b/src/v1/Download/Youtube.js @@ -1,7 +1,25 @@ module.exports = function(Api) { return { - Play: async (query) => (await Api()).Get("v1/download/youtube/play", { query }), - MP3: async (url) => (await Api()).Get("v1/download/youtube/mp3", { url }), - MP4: async (url) => (await Api()).Get("v1/download/youtube/mp4", { url }) + Video: { + Analysis: async function(options) { + const { version, url } = options; + + if (version === 1) (await Api()).Get("v1/download/youtube/mp4", { url }); + } + }, + Audio: { + Analysis: async function(options) { + const { version, url } = options; + + if (version === 1) (await Api()).Get("v1/download/youtube/mp3", { url }); + } + }, + Play: { + Analysis: async function(options) { + const { version, query } = options; + + if (version === 1) (await Api()).Get("v1/download/youtube/play", { query }); + } + }, } }; \ No newline at end of file diff --git a/src/v1/Game/SusunKata.js b/src/v1/Game/SusunKata.js deleted file mode 100644 index dd9c5e8..0000000 --- a/src/v1/Game/SusunKata.js +++ /dev/null @@ -1,5 +0,0 @@ -module.exports = function(Api) { - return { - Main: async () => (await Api()).Get("v1/game/susunkata/") - } -}; \ No newline at end of file diff --git a/src/v1/Game/Tebakan.js b/src/v1/Game/Tebakan.js deleted file mode 100644 index 6a74d9c..0000000 --- a/src/v1/Game/Tebakan.js +++ /dev/null @@ -1,11 +0,0 @@ -module.exports = function(Api) { - return { - Bendera: async () => (await Api()).Get("v1/game/tebakan/bendera"), - Gambar: async () => (await Api()).Get("v1/game/tebakan/gambar"), - Game: async () => (await Api()).Get("v1/game/tebakan/game"), - Kata: async () => (await Api()).Get("v1/game/tebakan/kata"), - Kimia: async () => (await Api()).Get("v1/game/tebakan/kimia"), - Lagu: async () => (await Api()).Get("v1/game/tebakan/lagu"), - Lirik: async () => (await Api()).Get("v1/game/tebakan/lirik") - } -}; \ No newline at end of file diff --git a/src/v1/Games/SusunKata.js b/src/v1/Games/SusunKata.js new file mode 100644 index 0000000..3ea99ce --- /dev/null +++ b/src/v1/Games/SusunKata.js @@ -0,0 +1,5 @@ +module.exports = function(Api) { + return { + Main: async () => (await Api()).Get("v1/games/susunkata/") + } +}; \ No newline at end of file diff --git a/src/v1/Games/Tebakan.js b/src/v1/Games/Tebakan.js new file mode 100644 index 0000000..78c3c2c --- /dev/null +++ b/src/v1/Games/Tebakan.js @@ -0,0 +1,11 @@ +module.exports = function(Api) { + return { + Bendera: async () => (await Api()).Get("v1/games/tebakan/bendera"), + Gambar: async () => (await Api()).Get("v1/games/tebakan/gambar"), + Game: async () => (await Api()).Get("v1/games/tebakan/game"), + Kata: async () => (await Api()).Get("v1/games/tebakan/kata"), + Kimia: async () => (await Api()).Get("v1/games/tebakan/kimia"), + Lagu: async () => (await Api()).Get("v1/games/tebakan/lagu"), + Lirik: async () => (await Api()).Get("v1/games/tebakan/lirik") + } +}; \ No newline at end of file diff --git a/src/v1/Image/Pinterest.js b/src/v1/Image/Pinterest.js deleted file mode 100644 index bee226c..0000000 --- a/src/v1/Image/Pinterest.js +++ /dev/null @@ -1,6 +0,0 @@ -module.exports = function(Api) { - return { - Find: async (query) => (await Api()).Get("v1/image/pinterest/find", { query }), - RandomCouple: async () => (await Api()).Get("v1/image/pinterest/random-couple") - } -}; \ No newline at end of file diff --git a/src/v1/Image/Remini.js b/src/v1/Image/Remini.js deleted file mode 100644 index 2de2672..0000000 --- a/src/v1/Image/Remini.js +++ /dev/null @@ -1,12 +0,0 @@ -module.exports = function(Api) { - return { - Attach: async (image) => (await Api()).Post("v1/image/remini/attach", { image }), - Url: async (image) => (await Api()).Get("v1/image/remini/url", { image }), - HdrAttach: async (image) => (await Api()).Post("v1/image/remini/hdr-attach", { image }), - HdrUrl: async (image) => (await Api()).Get("v1/image/remini/hdr-url", { image }), - RecolorAttach: async (image) => (await Api()).Post("v1/image/remini/recolor-attach", { image }), - RecolorUrl: async (image) => (await Api()).Get("v1/image/remini/recolor-url", { image }), - DehazeAttach: async (image) => (await Api()).Post("v1/image/remini/dehaze-attach", { image }), - DehazeUrl: async (image) => (await Api()).Get("v1/image/remini/dehaze-url", { image }) - } -}; \ No newline at end of file diff --git a/src/v1/Image/Wallpaper.js b/src/v1/Image/Wallpaper.js deleted file mode 100644 index 3705fe0..0000000 --- a/src/v1/Image/Wallpaper.js +++ /dev/null @@ -1,6 +0,0 @@ -module.exports = function(Api) { - return { - Find: async (query) => (await Api()).Get("v1/image/wallpaper/find", { query }), - Random: async (query) => (await Api()).Get("v1/image/wallpaper/random", { query }) - } -}; \ No newline at end of file diff --git a/src/v1/Image/Wikipedia.js b/src/v1/Image/Wikipedia.js deleted file mode 100644 index 0316799..0000000 --- a/src/v1/Image/Wikipedia.js +++ /dev/null @@ -1,5 +0,0 @@ -module.exports = function(Api) { - return { - Find: async (query) => (await Api()).Get("v1/image/wallpaper/find", { query }) - } -}; \ No newline at end of file diff --git a/src/v1/Images/Pinterest.js b/src/v1/Images/Pinterest.js new file mode 100644 index 0000000..20177a8 --- /dev/null +++ b/src/v1/Images/Pinterest.js @@ -0,0 +1,6 @@ +module.exports = function(Api) { + return { + Find: async (query) => (await Api()).Get("v1/images/pinterest/find", { query }), + RandomCouple: async () => (await Api()).Get("v1/images/pinterest/random-couple") + } +}; \ No newline at end of file diff --git a/src/v1/Images/Remini.js b/src/v1/Images/Remini.js new file mode 100644 index 0000000..3d12c4a --- /dev/null +++ b/src/v1/Images/Remini.js @@ -0,0 +1,36 @@ +module.exports = function(Api) { + return { + RANDOM: { + Generate: async function(options) { + const { model, image } = options; + + if (model === "Attach") return (await Api()).Post("v1/images/remini/attach", { image }); + if (model === "Url") return (await Api()).Get("v1/images/remini/url", { image }); + } + }, + HDR: { + Generate: async function(options) { + const { model, image } = options; + + if (model === "Attach") return (await Api()).Post("v1/images/remini/hdr/attach", { image }); + if (model === "Url") return (await Api()).Get("v1/images/remini/hdr/url", { image }); + } + }, + RECOLOR: { + Generate: async function(options) { + const { model, image } = options; + + if (model === "Attach") return (await Api()).Post("v1/images/remini/recolor/attach", { image }); + if (model === "Url") return (await Api()).Get("v1/images/remini/recolor/url", { image }); + } + }, + DEHAZE: { + Generate: async function(options) { + const { model, image } = options; + + if (model === "Attach") return (await Api()).Post("v1/images/remini/dehaze/attach", { image }); + if (model === "Url") return (await Api()).Get("v1/images/remini/dehaze/url", { image }); + } + }, + } +}; \ No newline at end of file diff --git a/src/v1/Images/Wallpaper.js b/src/v1/Images/Wallpaper.js new file mode 100644 index 0000000..dc09f54 --- /dev/null +++ b/src/v1/Images/Wallpaper.js @@ -0,0 +1,6 @@ +module.exports = function(Api) { + return { + Find: async (query) => (await Api()).Get("v1/images/wallpaper/find", { query }), + Random: async (query) => (await Api()).Get("v1/images/wallpaper/random", { query }) + } +}; \ No newline at end of file diff --git a/src/v1/Images/Wikipedia.js b/src/v1/Images/Wikipedia.js new file mode 100644 index 0000000..56fd29f --- /dev/null +++ b/src/v1/Images/Wikipedia.js @@ -0,0 +1,5 @@ +module.exports = function(Api) { + return { + Find: async (query) => (await Api()).Get("v1/images/wallpaper/find", { query }) + } +}; \ No newline at end of file diff --git a/src/v1/Stalk/Instagram.js b/src/v1/Stalk/Instagram.js index e270be0..a28a2f8 100644 --- a/src/v1/Stalk/Instagram.js +++ b/src/v1/Stalk/Instagram.js @@ -1,7 +1,11 @@ module.exports = function(Api) { return { - Model1: async (username) => (await Api()).Get("v1/stalk/instagram/model1", { username }), - Model2: async (username) => (await Api()).Get("v1/stalk/instagram/model2", { username }), - Model3: async (username) => (await Api()).Get("v1/stalk/instagram/model3", { username }) + Analysis: async function(options) { + const { version, username } = options; + + if (version === 1) return (await Api()).Get("v1/stalk/instagram/model1", { username }); + if (version === 2) return (await Api()).Get("v1/stalk/instagram/model2", { username }); + if (version === 3) return (await Api()).Get("v1/stalk/instagram/model3", { username }); + } } }; \ No newline at end of file diff --git a/src/v1/Stalk/Tiktok.js b/src/v1/Stalk/Tiktok.js index de1d8ef..73f2435 100644 --- a/src/v1/Stalk/Tiktok.js +++ b/src/v1/Stalk/Tiktok.js @@ -1,6 +1,10 @@ module.exports = function(Api) { return { - Model1: async (username) => (await Api()).Get("v1/stalk/tiktok/model1", { username }), - Model2: async (username) => (await Api()).Get("v1/stalk/tiktok/model2", { username }) + Analysis: async function(options) { + const { version, username } = options; + + if (version === 1) return (await Api()).Get("v1/stalk/tiktok/model1", { username }); + if (version === 2) return (await Api()).Get("v1/stalk/tiktok/model2", { username }); + } } }; \ No newline at end of file diff --git a/src/v1/Stalk/Twitter.js b/src/v1/Stalk/Twitter.js index cf9e72a..fa3d0ac 100644 --- a/src/v1/Stalk/Twitter.js +++ b/src/v1/Stalk/Twitter.js @@ -1,5 +1,9 @@ module.exports = function(Api) { return { - Model1: async (username) => (await Api()).Get("v1/stalk/twitter/model1", { username }) + Analysis: async function(options) { + const { version, username } = options; + + if (version === 1) return (await Api()).Get("v1/stalk/twitter/model1", { username }); + } } }; \ No newline at end of file diff --git a/tsconfig.json b/tsconfig.json new file mode 100644 index 0000000..be3cead --- /dev/null +++ b/tsconfig.json @@ -0,0 +1,19 @@ +{ + "compilerOptions": { + "esModuleInterop": true, + "allowSyntheticDefaultImports": true, + "target": "es5", + "module": "commonjs", + "strict": true, + "moduleResolution": "node", + "resolveJsonModule": true, + "declaration": true, + "outDir": "./src", + "rootDir": "./src", + "sourceMap": true, + "removeComments": true, + "forceConsistentCasingInFileNames": true + }, + "include": ["src/**/*.ts", "typings/**/*.d.ts"], + "exclude": ["node_modules"] +} \ No newline at end of file diff --git a/typings/index.d.ts b/typings/index.d.ts index e2b46d0..2ffb560 100644 --- a/typings/index.d.ts +++ b/typings/index.d.ts @@ -1,387 +1,86 @@ declare module "@mgalacyber/universeapi" { - export class universeAPIClient { + export class UniverseClient { + /** + * @requires A valid API token is required for accessing the API. + * @param {string} token The API token provided by https://api.universebot.space. + * @description This function initializes the universeAPI client with the provided token. + * @returns {void} + * @example + * const { UniverseClient } = require("@mgalacyber/universeapi"); + * const ApiToken = "UniverseAPI.XXXXXXXXXXXXX.XXXXXXXXXXXXX.XXXXXXXXXXXXX.XXXXXXXXXXXXX"; + * const uAPI = new UniverseClient(ApiToken); + * + * uAPI.V1.AI.OpenAI.GPT.Text({ + * model: "gpt4", // Type of model used + * version: 1, // Model version of rest api + * prompt: "Hello!" // Enter Your prompt here + * + * }).then((result) => console.log(result)); + */ public constructor(token: string); private token: string; public V1: { AI: { - - /** - * AI operations using Blackbox. - * - * @example - * // Example of using the Model1 operation - * const prompt = "Generate creative website"; - * const result = await UniverseAPI.AI.Blackbox.Model1(prompt); - * console.log(result); - */ - Blackbox: import("./v1/AI/Blackbox").Blackbox, - - /** - * AI operations using ChatGPT. - * - * @example - * // Example of using the Model1 operation - * const prompt = "Generate creative content"; - * const result = await UniverseAPI.AI.ChatGPT.Model1(prompt); - * console.log(result); - */ - ChatGPT: import("./v1/AI/ChatGPT").ChatGPT, - - Google: { - - /** - * AI operations using Google Gemini. - * - * @example - * // Example of using the Pro operation - * const prompt = "Generate creative content"; - * const result = await UniverseAPI.AI.Google.Gemini.Pro(prompt); - * console.log(result); - */ - Gemini: import("./v1/AI/Google").Gemini, - - /** - * AI operations using Google Bard. - * - * @example - * // Example of using the Pro operation - * const prompt = "Generate creative content"; - * const result = await UniverseAPI.AI.Google.Bard.Model1(prompt); - * console.log(result); - */ - Bard: import("./v1/AI/Google").Bard, - }, - - /** - * AI operations using Microsoft. - * - * @example - * // Example of using the Model1 operation - * const prompt = "Generate creative content"; - * const result = await UniverseAPI.AI.Microsoft.Bing.Model1(prompt); - * console.log(result); - */ - Microsoft: { - Bing: import("./v1/AI/Microsoft").Bing - }, - + Blackbox: typeof import("./v1/AI/Blackbox"), + OpenAI: typeof import("./v1/AI/OpenAI"), + Google: typeof import("./v1/AI/Google"), + Microsoft: typeof import("./v1/AI/Microsoft"), + StableDiffusion: typeof import("./v1/AI/StableDiffusion"), + TextToImage: typeof import("./v1/AI/TextToImage"), /** - * AI operations using Stable Diffusion. - * - * @example - * // Example of using the Model1 operation - * const prompt = "Generate creative image"; - * const result = await UniverseAPI.AI.StableDiffusion.Model1(prompt); - * console.log(result); + * @deprecated */ - StableDiffusion: import("./v1/AI/StableDiffusion").StableDiffusion, - - /** - * AI operations using Text 2 Image. - * - * @example - * // Example of using the Model1 operation - * const prompt = "Generate creative image"; - * const result = await UniverseAPI.AI.TextToImage.Model1(prompt); - * console.log(result); - */ - TextToImage: import("./v1/AI/TextToImage").TextToImage, - - /** - * AI operations using To Anime. - * - * @example - * // Example of using the Model1 operation - * const prompt = "https://domain.com/image.png"; - * const result = await UniverseAPI.AI.ToAnime.Model1(prompt); - * console.log(result); - */ - ToAnime: import("./v1/AI/ToAnime").TextToImage, + ToAnime: typeof import("./v1/AI/ToAnime"), }, Creator: { - - /** - * Create text image using ephoto creator. - * - * @example - * const text = "Universe API"; - * const result = await UniverseAPI.V1.Creator.Ephoto.Artistic(text, url); - * console.log(result); - */ - Ephoto: import("./v1/Creator/Ephoto").Ephoto, - - /** - * Create text image using photooxy creator. - * - * @example - * const text = "Universe API"; - * const result = await UniverseAPI.V1.Creator.Photooxy.Flaming(text); - * console.log(result); - */ - Photooxy: import("./v1/Creator/Photooxy").Photooxy, - - /** - * Create text image using textpro.me creator. - * - * @example - * const text = "Universe API"; - * const result = await UniverseAPI.V1.Creator.Textpro.Pencil(text); - * console.log(result); - */ - Textpro: import("./v1/Creator/Textpro").TextPro + Ephoto: typeof import("./v1/Creator/Ephoto"), + Photooxy: typeof import("./v1/Creator/Photooxy"), + Textpro: typeof import("./v1/Creator/Textpro") + }, + Detector: { + NSFW: typeof import("./v1/Detector/NSFW"), }, Download: { - - /** - * Download content using various sources through AIO (All-In-One). - * - * @example - * const url = "https://example.com/content"; - * const result = await UniverseAPI.V1.Download.AIO.Pinterest(url); - * console.log(result); - */ - AIO: import("./v1/Download/AIO").AIO, - - /** - * Download audio content from different platforms. - * - * @example - * const url = "https://soundcloud.com/example/track"; - * const result = await UniverseAPI.V1.Download.Audio.SoundCloud1(url); - * console.log(result); - */ - Audio: import("./v1/Download/Audio").Audio, - - /** - * Download content from Facebook. - * - * @example - * const url = "https://facebook.com/example/video"; - * const result = await UniverseAPI.V1.Download.Facebook.Model1(url); - * console.log(result); - */ - Facebook: import("./v1/Download/Facebook").Facebook, - - /** - * Download various file types from different sources. - * - * @example - * const url = "https://example.com/file"; - * const result = await UniverseAPI.V1.Download.File.SFileMobi(url); - * console.log(result); - */ - File: import("./v1/Download/File").File, - - /** - * Download content from Instagram. - * - * @example - * const url = "https://instagram.com/example/post"; - * const result = await UniverseAPI.V1.Download.Instagram.Model1(url); - * console.log(result); - */ - Instagram: import("./v1/Download/Instagram").Instagram, - - /** - * Download content from Pinterest. - * - * @example - * const url = "https://pinterest.com/example/post"; - * const result = await UniverseAPI.V1.Download.Pinterest.Model1(url); - * console.log(result); - */ - Pinterest: import("./v1/Download/Pinterest").Pinterest, - - /** - * Download adult content from various sources. - * - * @example - * const url = "https://xnxx.com/videos/example"; - * const result = await UniverseAPI.V1.Download.Porn.XNXX(url); - * console.log(result); - */ - Porn: import("./v1/Download/Porn").Porn, - - /** - * Download content from Thread. - * - * @example - * const url = "https://threads.com/example/post"; - * const result = await UniverseAPI.V1.Download.Thread.Model1(url); - * console.log(result); - */ - Thread: import("./v1/Download/Thread").Thread, - - /** - * Download content from TikTok. - * - * @example - * const url = "https://tiktok.com/@example/video"; - * const result = await UniverseAPI.V1.Download.TikTok.Model1(url); - * console.log(result); - */ - Tiktok: import("./v1/Download/Tiktok").Tiktok, - - /** - * Download content from Twitter. - * - * @example - * const url = "https://twitter.com/example/status"; - * const result = await UniverseAPI.V1.Download.Twitter.Model1(url); - * console.log(result); - */ - Twitter: import("./v1/Download/Twitter").Twitter, - - /** - * Download content from YouTube. - * - * @example - * const query = "Universe API introduction"; - * const result = await UniverseAPI.V1.Download.YouTube.Play(query); - * console.log(result); - */ - Youtube: import("./v1/Download/Youtube").Youtube + AIO: typeof import("./v1/Download/AIO"), + Audio: typeof import("./v1/Download/Audio"), + Facebook: typeof import("./v1/Download/Facebook"), + File: typeof import("./v1/Download/File"), + Instagram: typeof import("./v1/Download/Instagram"), + Pinterest: typeof import("./v1/Download/Pinterest"), + Porn: typeof import("./v1/Download/Porn"), + Thread: typeof import("./v1/Download/Thread"), + Tiktok: typeof import("./v1/Download/Tiktok"), + Twitter: typeof import("./v1/Download/Twitter"), + Youtube: typeof import("./v1/Download/Youtube") }, Game: { - - /** - * Play a game to arrange shuffled words in the correct order. - * - * @example - * const result = await UniverseAPI.V1.Game.SusunKata.Main(); - * console.log(result); - */ - SusunKata: import("./v1/Game/SusunKata").SusunKata, - - /** - * Play a guessing game. - * - * @example - * const result = await UniverseAPI.V1.Game.Tebakan.Bendera(); - * console.log(result); - */ - Tebakan: import("./v1/Game/Tebakan").Tebakan, + SusunKata: import("./v1/Games/SusunKata").SusunKata, + Tebakan: import("./v1/Games/Tebakan").Tebakan, }, Image: { - - /** - * Search and download images from Pinterest. - * - * @example - * const query = "Nature"; - * const result = await UniverseAPI.V1.Image.Pinterest.Find(query); - * console.log(result); - */ - Pinterest: import("./v1/Image/Pinterest").Pinterest, - - /** - * Enhance or restore images using Remini. - * - * @example - * const image = "https://example.com/photo.jpg"; - * const result = await UniverseAPI.V1.Image.Remini.Url(image); - * console.log(result); - */ - Remini: import("./v1/Image/Remini").Remini, - - /** - * Get wallpapers from various categories. - * - * @example - * const query = "Nature"; - * const result = await UniverseAPI.V1.Image.Wallpaper.Find(query); - * console.log(result); - */ - Wallpaper: import("./v1/Image/Wallpaper").Wallpaper, - - /** - * Search and download images from Wikipedia. - * - * @example - * const query = "Albert Einstein"; - * const result = await UniverseAPI.V1.Image.Wikipedia.Find(query); - * console.log(result); - */ - Wikipedia: import("./v1/Image/Wikipedia").Wikipedia, + Pinterest: import("./v1/Images/Pinterest").Pinterest, + Remini: typeof import("./v1/Images/Remini"), + Wallpaper: import("./v1/Images/Wallpaper").Wallpaper, + Wikipedia: import("./v1/Images/Wikipedia").Wikipedia, }, Search: { - - /** - * Perform a Google search and get search results. - * - * @example - * const query = "Universe API"; - * const result = await UniverseAPI.V1.Search.Google.Find(query); - * console.log(result); - */ Google: import("./v1/Search/Google").Google, }, Stalk: { - - /** - * Stalk a user on GitHub and get user details. - * - * @example - * const username = "mgalacyber"; - * const result = await UniverseAPI.V1.Stalk.Github.User(username); - * console.log(result); - */ Github: import("./v1/Stalk/Github").GitHub, - - /** - * Stalk a user on Instagram and get user details. - * - * @example - * const username = "instagramuser"; - * const result = await UniverseAPI.V1.Stalk.Instagram.Model1(username); - * console.log(result); - */ - Instagram: import("./v1/Stalk/Instagram").Instagram, - - /** - * Stalk a package on NPM (Node Package Manager) and get package details. - * - * @example - * const packageName = "axios"; - * const result = await UniverseAPI.V1.Stalk.NPM.Find(packageName); - * console.log(result); - */ + Instagram: typeof import("./v1/Stalk/Instagram"), NPM: import("./v1/Stalk/NPM").NPM, - - /** - * Stalk a user on TikTok and get user details. - * - * @example - * const username = "tiktokuser"; - * const result = await UniverseAPI.V1.Stalk.Tiktok.Find(username); - * console.log(result); - */ - TikTok: import("./v1/Stalk/Tiktok").TikTok, - - /** - * Stalk a user on Twitter and get user details. - * - * @example - * const username = "twitteruser"; - * const result = await UniverseAPI.V1.Stalk.Twitter.Find(username); - * console.log(result); - */ - Twitter: import("./v1/Stalk/Twitter").Twitter, + TikTok: typeof import("./v1/Stalk/Tiktok"), + Twitter: typeof import("./v1/Stalk/Twitter"), }, }; public V2: { Download: { - /** - * Download content from YouTube. - * - * @example - * const query = "Universe API introduction"; - * const result = await UniverseAPI.V1.Download.YouTube.PlayMp3(query); - * console.log(result); + * @deprecated */ Youtube: import("./v2/Download/Youtube").Youtube }, diff --git a/typings/utils/Result.d.ts b/typings/utils/Result.d.ts new file mode 100644 index 0000000..421db04 --- /dev/null +++ b/typings/utils/Result.d.ts @@ -0,0 +1,10 @@ +interface Result { + status: boolean; + code: number; + speed: string; + author: string; + message: string; + data: object; +} + +export = Result; \ No newline at end of file diff --git a/typings/v1/AI/Blackbox.d.ts b/typings/v1/AI/Blackbox.d.ts index 83f8a45..a2acb80 100644 --- a/typings/v1/AI/Blackbox.d.ts +++ b/typings/v1/AI/Blackbox.d.ts @@ -1,4 +1,13 @@ -export class Blackbox { - Model1: (prompt: string) => Promise; - Model2v4: (prompt: string) => Promise; -} \ No newline at end of file +import Result from "../../utils/Result"; + +export interface TextOptions { + version: number; + prompt: string; +} + +/** + * Generate text based on the specified options. + * @param {TextOptions} options - The options for generating text. + * @returns {Promise} - A promise that resolves with the generated text. + */ +export function Text(options: TextOptions): Promise; \ No newline at end of file diff --git a/typings/v1/AI/ChatGPT.d.ts b/typings/v1/AI/ChatGPT.d.ts deleted file mode 100644 index a14ffd0..0000000 --- a/typings/v1/AI/ChatGPT.d.ts +++ /dev/null @@ -1,15 +0,0 @@ -export class ChatGPT { - Model1: (prompt: string) => Promise; - Model2: (prompt: string) => Promise; - Model3: (prompt: string) => Promise; - Model4: (prompt: string) => Promise; - Model5: (prompt: string) => Promise; - Model6: (prompt: string) => Promise; - Model7Go: (prompt: string) => Promise; - Model8Prompt: (prompt: string, text: string) => Promise; - Model9v4: (prompt: string) => Promise; - Model10v4: (prompt: string) => Promise; - Model11Dalle: (prompt: string) => Promise; - Model12Turbo: (prompt: string) => Promise; - Model13Turbo: (prompt: string) => Promise; -} \ No newline at end of file diff --git a/typings/v1/AI/Google.d.ts b/typings/v1/AI/Google.d.ts index 043362b..84d959c 100644 --- a/typings/v1/AI/Google.d.ts +++ b/typings/v1/AI/Google.d.ts @@ -1,10 +1,48 @@ -export class Gemini { - Pro: (prompt: string) => Promise; - ProVisionModelAttach: (image: string, prompt: string) => Promise; - ProVisionModelUrl: (image: string, prompt: string) => Promise; +import Result from "../../utils/Result"; + +export namespace Gemini { + export type ModelOptions = "1.0-pro" | "1.0-pro-vision"; + export type TypeOptions = "attacment" | "url"; + + export interface TextOptions { + model: ModelOptions; + version: number; + prompt: string; + } + export interface VisionOptions { + model: ModelOptions; + type: TypeOptions; + version: number; + image: string, + prompt: string; + } + + /** + * Generate text based on the specified options. + * @param {TextOptions} options - The options for generating text. + * @returns {Promise} - A promise that resolves with the generated text. + */ + export function Text(options: TextOptions): Promise; + + /** + * Describe the content of an image based on the specified options. + * @param {VisionOptions} options - The options for describing the image. + * @returns {Promise} - A promise that resolves with the description of the image. + */ + export function Vision(options: VisionOptions): Promise; } -export class Bard { - Model1: (prompt: string) => Promise; - Model2Image: (url: string, prompt: string) => Promise; +export namespace Bard { + export interface Options { + version: number; + prompt: string; + } + + /** + * Generate text based on the specified options. + * @param {TextOptions} options - The options for generating text. + * @returns {Promise} - A promise that resolves with the generated text. + * @description Deprecated + */ + export function Text(options: Options): Promise; } \ No newline at end of file diff --git a/typings/v1/AI/Microsoft.d.ts b/typings/v1/AI/Microsoft.d.ts index 4a3bee4..f990811 100644 --- a/typings/v1/AI/Microsoft.d.ts +++ b/typings/v1/AI/Microsoft.d.ts @@ -1,4 +1,27 @@ -export class Bing { - Model1: (prompt: string) => Promise; - Model2Image: (url: string, prompt: string) => Promise; +import Result from "../../utils/Result"; + +export namespace BING { + export interface TextOptions { + version: number; + prompt: string; + } + export interface ImageOptions { + version: number; + url: string; + prompt: string; + } + + /** + * Generate text based on the specified options. + * @param {TextOptions} options - The options for generating text. + * @returns {Promise} - A promise that resolves with the generated text. + */ + export function Text(options: TextOptions): Promise; + + /** + * Generate text based on the specified options. + * @param {ImageOptions} options - The options for generating text. + * @returns {Promise} - A promise that resolves with the generated text. + */ + export function Image(options: ImageOptions): Promise; } \ No newline at end of file diff --git a/typings/v1/AI/OpenAI.d.ts b/typings/v1/AI/OpenAI.d.ts new file mode 100644 index 0000000..236db6a --- /dev/null +++ b/typings/v1/AI/OpenAI.d.ts @@ -0,0 +1,35 @@ +import Result from "../../utils/Result"; + +export namespace GPT { + export type ModelOptions = "gpt3.5-turbo" | "gpt4"; + + export interface TextOptions { + model: ModelOptions; + version: number; + prompt: string; + } + + /** + * Generate text based on the specified options. + * @param {TextOptions} options - The options for generating text. + * @returns {Promise} - A promise that resolves with the generated text. + */ + export function Text(options: TextOptions): Promise; +} + +export namespace DALLE { + export type ModelOptions = "dalle-2"; + + export interface Options { + model: ModelOptions; + version: number; + prompt: string; + } + + /** + * Generate image based on the specified options. + * @param {Options} options - The options for generating image. + * @returns {Promise} - A promise that resolves with the generated image. + */ + export function Generate(options: Options): Promise; +} \ No newline at end of file diff --git a/typings/v1/AI/StableDiffusion.d.ts b/typings/v1/AI/StableDiffusion.d.ts index 27ef06e..9782b3c 100644 --- a/typings/v1/AI/StableDiffusion.d.ts +++ b/typings/v1/AI/StableDiffusion.d.ts @@ -1,3 +1,13 @@ -export class StableDiffusion { - Model1: (prompt: string) => Promise; -} \ No newline at end of file +import Result from "../../utils/Result"; + +export interface GenerateOptions { + version: number; + prompt: string; +} + +/** + * Generate text based on the specified options. + * @param {GenerateOptions} options - The options for generating text. + * @returns {Promise} - A promise that resolves with the generated text. + */ +export function Generate(options: GenerateOptions): Promise; \ No newline at end of file diff --git a/typings/v1/AI/TextToImage.d.ts b/typings/v1/AI/TextToImage.d.ts index 479ee10..9782b3c 100644 --- a/typings/v1/AI/TextToImage.d.ts +++ b/typings/v1/AI/TextToImage.d.ts @@ -1,8 +1,13 @@ -export class TextToImage { - Model1: (prompt: string) => Promise; - Model2: (prompt: string) => Promise; - Model3: (prompt: string) => Promise; - Model4: (prompt: string) => Promise; - Model5: (prompt: string) => Promise; - Model6: (prompt: string) => Promise; -} \ No newline at end of file +import Result from "../../utils/Result"; + +export interface GenerateOptions { + version: number; + prompt: string; +} + +/** + * Generate text based on the specified options. + * @param {GenerateOptions} options - The options for generating text. + * @returns {Promise} - A promise that resolves with the generated text. + */ +export function Generate(options: GenerateOptions): Promise; \ No newline at end of file diff --git a/typings/v1/AI/ToAnime.d.ts b/typings/v1/AI/ToAnime.d.ts index 5efd55a..c0e2daf 100644 --- a/typings/v1/AI/ToAnime.d.ts +++ b/typings/v1/AI/ToAnime.d.ts @@ -1,3 +1,13 @@ -export class TextToImage { - Model1: (url: string) => Promise; -} \ No newline at end of file +import Result from "../../utils/Result"; + +export interface GenerateOptions { + version: number; + url: string; +} + +/** + * Generate text based on the specified options. + * @param {GenerateOptions} options - The options for generating text. + * @returns {Promise} - A promise that resolves with the generated text. + */ +export function Generate(options: GenerateOptions): Promise; \ No newline at end of file diff --git a/typings/v1/Creator/Ephoto.d.ts b/typings/v1/Creator/Ephoto.d.ts index b3d1559..64b547f 100644 --- a/typings/v1/Creator/Ephoto.d.ts +++ b/typings/v1/Creator/Ephoto.d.ts @@ -1,74 +1,108 @@ -export class Ephoto { - Artistic: (text: string, url: string) => Promise; - Diary: (text: string, url: string) => Promise; - Cyberpunk: (url: string) => Promise; - Billboard: (url: string) => Promise; - Fire: (url: string) => Promise; - Rain: (url: string) => Promise; - Cat: (url: string) => Promise; - Ring: (url: string) => Promise; - Collage: (url: string) => Promise; - Sad: (url: string) => Promise; - CinemaGraph: (url: string) => Promise; - DiaryFrame: (text: string, url: string) => Promise; - Wood: (text1: string, text2: string) => Promise; - Television: (text: string) => Promise; - Glasses: (text: string) => Promise; - Blackpink: (text: string) => Promise; - Neonbp: (text: string) => Promise; - Juventus: (text: string, number: number) => Promise; - CoverPUBG: (text: string) => Promise; - GreenBrush: (text: string) => Promise; - Eraser: (text: string) => Promise; - DragonFire: (text: string) => Promise; - Incandescent: (text: string) => Promise; - Typography1: (text: string) => Promise; - Typography2: (text: string) => Promise; - Letters: (text: string) => Promise; - Cloth: (text: string) => Promise; - Graffiti: (text: string) => Promise; - Metals: (text: string) => Promise; - BlueNeon: (text: string) => Promise; - NightStars: (text: string) => Promise; - Cloud: (text: string) => Promise; - Caper: (text: string) => Promise; - Horror: (text: string) => Promise; - Sunlight: (text: string) => Promise; - Cake: (text: string) => Promise; - Pig: (text: string) => Promise; - Hallowen: (text: string) => Promise; - LeafGraphy: (text: string) => Promise; - Water: (text: string) => Promise; - WriteStatus: (text1: string, text2: string) => Promise; - Scholes: (text: string, number: number) => Promise; - Heated: (text1: string, text2: string) => Promise; - Buoys: (text1: string, text2: string) => Promise; - QuotesStatus: (text1: string, text2: string) => Promise; - NeonBlue: (text: string) => Promise; - Foggy: (text: string) => Promise; - Crack: (text: string) => Promise; - Puppy: (text: string) => Promise; - Metals: (text: string) => Promise; - PUBGAvatar: (text: string) => Promise; - Adventure: (text1: string, text2: string, url: string) => Promise; - Notebook: (text1: string, text2: string, url: string) => Promise; - WPoster: (text1: string, text2: string, url: string) => Promise; - VHS: (url: string) => Promise; - Memories: (url: string) => Promise; - Glazing: (text: string, url: string) => Promise; - Flower: (url: string) => Promise; - Heart: (url: string) => Promise; - Smoke: (url: string) => Promise; - HandleFire: (url: string) => Promise; - Specturm: (url: string) => Promise; - Painting: (url: string) => Promise; - Tiger: (text: string) => Promise; - American: (text: string) => Promise; - Pencil: (text1: string, text2: string) => Promise; - Arrow1: (text: string) => Promise; - Arrow2: (text: string) => Promise; - Anonymous: (text: string) => Promise; - AOV: (text: string) => Promise; - Warface: (text: string) => Promise; - MobileLegend: (text: string) => Promise; +import Result from "../../utils/Result"; + +export namespace TextOnly { + export type ModelOptions = "Television" | "Glasses" | "Blackpink" | "Neonbp" | "CoverPUBG" | "GreenBrush" | "Eraser" | "DragonFire" + | "Incandescent" | "Typography1" | "Typography2" | "Letters" | "Cloth" | "Graffiti" | "Metals" | "BlueNeon" | "NightStars" + | "Cloud" | "Caper" | "Horror" | "Sunlight" | "Cake" | "Pig" | "Hallowen" | "LeafGraphy" | "Water" | "NeonBlue" + | "Foggy" | "Crack" | "Puppy" | "PUBGAvatar" | "Tiger" | "American" | "Arrow1" | "Arrow2" | "Anonymous" + | "AOV" | "Warface" | "MobileLegend"; + + export interface GenerateOptions { + model: ModelOptions; + text: string; + } + + /** + * Generate image based on the specified options. + * @param {GenerateOptions} options - The options for generating image. + * @returns {Promise} - A promise that resolves with the generated image. + */ + export function Generate(options: GenerateOptions): Promise; +} + +export namespace UrlOnly { + export type ModelOptions = "Cyberpunk" | "Billboard" | "Fire" | "Rain" | "Cat" | "Ring" + | "Collage" | "Sad" | "CinemaGraph" | "VHS" | "Memories" | "Flower" | "Heart" + | "Smoke" | "HandleFire" | "Specturm" | "Painting"; + + export interface GenerateOptions { + model: ModelOptions; + url: string; + } + + /** + * Generate image based on the specified options. + * @param {GenerateOptions} options - The options for generating image. + * @returns {Promise} - A promise that resolves with the generated image. + */ + export function Generate(options: GenerateOptions): Promise; +} + +export namespace TextWithUrl { + export type ModelOptions = "Artistic" | "Diary" | "DiaryFrame" | "Glazing"; + + export interface GenerateOptions { + model: ModelOptions; + text: string; + url: string; + } + + /** + * Generate image based on the specified options. + * @param {GenerateOptions} options - The options for generating image. + * @returns {Promise} - A promise that resolves with the generated image. + */ + export function Generate(options: GenerateOptions): Promise; +} + +export namespace TextWithNumber { + export type ModelOptions = "Juventus" | "Scholes"; + + export interface GenerateOptions { + model: ModelOptions; + text: string; + number: number; + } + + /** + * Generate image based on the specified options. + * @param {GenerateOptions} options - The options for generating image. + * @returns {Promise} - A promise that resolves with the generated image. + */ + export function Generate(options: GenerateOptions): Promise; +} + +export namespace DoubleText { + export type ModelOptions = "Wood" | "WriteStatus" | "Heated" | "Buoys" | "QuotesStatus" | "Pencil"; + + export interface GenerateOptions { + model: ModelOptions; + text1: string; + text2: string; + } + + /** + * Generate image based on the specified options. + * @param {GenerateOptions} options - The options for generating image. + * @returns {Promise} - A promise that resolves with the generated image. + */ + export function Generate(options: GenerateOptions): Promise; +} + +export namespace DoubleTextWithUrl { + export type ModelOptions = "Adventure" | "Notebook" | "WPoster"; + + export interface GenerateOptions { + model: ModelOptions; + text1: string; + text2: string; + url: number; + } + + /** + * Generate image based on the specified options. + * @param {GenerateOptions} options - The options for generating image. + * @returns {Promise} - A promise that resolves with the generated image. + */ + export function Generate(options: GenerateOptions): Promise; } \ No newline at end of file diff --git a/typings/v1/Creator/Photooxy.d.ts b/typings/v1/Creator/Photooxy.d.ts index b3516d1..736712e 100644 --- a/typings/v1/Creator/Photooxy.d.ts +++ b/typings/v1/Creator/Photooxy.d.ts @@ -1,44 +1,54 @@ -export class Photooxy { - Flaming: (text: string) => Promise; - ShadowSky: (text: string) => Promise; - Metallic: (text: string) => Promise; - Naruto: (text: string) => Promise; - Pubg: (text1: string, text2: string) => Promise; - UnderGrass: (text: string) => Promise; - HarryPotter: (text: string) => Promise; - FlowerTypography: (text: string) => Promise; - PictureOfLove: (text: string) => Promise; - CoffeeCup: (text: string) => Promise; - Butterfly: (text: string) => Promise; - NightSky: (text: string) => Promise; - CarvedWood: (text: string) => Promise; - IlluminatedMetallic: (text: string) => Promise; - SweetCandy: (text: string) => Promise; - Coffee: (text: string) => Promise; - QuotedWood: (text: string) => Promise; - Flame: (url: string) => Promise; - Frame: (url: string) => Promise; - Memory: (url: string) => Promise; - Nature: (url: string) => Promise; - Ripped: (url: string) => Promise; - Tearing: (url: string) => Promise; - Iphone: (url: string) => Promise; - Anaglyph: (url: string) => Promise; - Mirrors: (url: string) => Promise; - Shattered: (url: string) => Promise; - Burning: (url: string) => Promise; - Place: (url: string) => Promise; - Toilet: (url: string) => Promise; - Exposure: (url: string) => Promise; - SlideText: (text: string) => Promise; - Graffiti: (text: string) => Promise; - Rainbow: (text: string) => Promise; - OceanSea: (text: string) => Promise; - Romantic: (text: string) => Promise; - Smoke: (text: string) => Promise; - Glitch: (text1: string, text2: string) => Promise; - BurnPaper: (text: string) => Promise; - LoveMessage: (text: string) => Promise; - LoveText: (text: string) => Promise; - Shadow: (text: string) => Promise; +import Result from "../../utils/Result"; + +export namespace TextOnly { + export type ModelOptions = "Flaming" | "ShadowSky" | "Metallic" | "Naruto" | "UnderGrass" | "HarryPotter" | "FlowerTypography" + | "PictureOfLove" | "CoffeeCup" | "Butterfly" | "NightSky" | "CarvedWood" | "IlluminatedMetallic" | "SweetCandy" + | "Coffee" | "QuotedWood" | "SlideText" | "Graffiti" | "Rainbow" | "OceanSea" | "Romantic" | "Smoke" + | "BurnPaper" | "LoveMessage" | "LoveText" | "Shadow"; + + export interface GenerateOptions { + model: ModelOptions; + text: string; + } + + /** + * Generate image based on the specified options. + * @param {GenerateOptions} options - The options for generating image. + * @returns {Promise} - A promise that resolves with the generated image. + */ + export function Generate(options: GenerateOptions): Promise; +} + +export namespace UrlOnly { + export type ModelOptions = "Flame" | "Frame" | "Memory" | "Nature" | "Ripped" | "Tearing" | "Iphone" + | "Anaglyph" | "Mirrors" | "Shattered" | "Burning" | "Place" | "Toilet" | "Exposure"; + + export interface GenerateOptions { + model: ModelOptions; + url: string; + } + + /** + * Generate image based on the specified options. + * @param {GenerateOptions} options - The options for generating image. + * @returns {Promise} - A promise that resolves with the generated image. + */ + export function Generate(options: GenerateOptions): Promise; +} + +export namespace DoubleText { + export type ModelOptions = "Pubg" | "Glitch"; + + export interface GenerateOptions { + model: ModelOptions; + text1: string; + text2: string; + } + + /** + * Generate image based on the specified options. + * @param {GenerateOptions} options - The options for generating image. + * @returns {Promise} - A promise that resolves with the generated image. + */ + export function Generate(options: GenerateOptions): Promise; } \ No newline at end of file diff --git a/typings/v1/Creator/Textpro.d.ts b/typings/v1/Creator/Textpro.d.ts index cc704c2..e7ca3f2 100644 --- a/typings/v1/Creator/Textpro.d.ts +++ b/typings/v1/Creator/Textpro.d.ts @@ -1,55 +1,41 @@ -export class TextPro { - Pencil: (text: string) => Promise; - Glitch1: (text: string) => Promise; - Glitch2: (text: string) => Promise; - GlitchTiktok: (text1: string, text2: string) => Promise; - Blackpink: (text: string) => Promise; - Berry: (text: string) => Promise; - Neon: (text: string) => Promise; - LogoBear: (text: string) => Promise; - LogoNinja: (text1: string, text2: string) => Promise; - Christmas3D: (text: string) => Promise; - Boxtext3D: (text: string) => Promise; - NeonLight3D: (text: string) => Promise; - OrangeJuice3D: (text: string) => Promise; - Thunder1: (text: string) => Promise; - Thunder2: (text: string) => Promise; - VideoGameClassic: (text1: string, text2: string) => Promise; - MarvelStudios: (text1: string, text2: string) => Promise; - GreenHorror: (text: string) => Promise; - Magma: (text: string) => Promise; - ChocolateCake: (text: string) => Promise; - Strawberry: (text: string) => Promise; - Layered: (text1: string, text2: string) => Promise; - Paper: (text: string) => Promise; - Pornhub: (text1: string, text2: string) => Promise; - HarryPotter: (text: string) => Promise; - Embossed: (text: string) => Promise; - Broken: (text: string) => Promise; - Glosy: (text: string) => Promise; - Bear: (text: string) => Promise; - Devil: (text: string) => Promise; - Christmas: (text: string) => Promise; - Dropwater: (text: string) => Promise; - Carbon: (text: string) => Promise; - ImgGlitch: (text: string) => Promise; - AGlitch: (text1: string, text2: string) => Promise; - Gradient: (text: string) => Promise; - Glue: (text: string) => Promise; - Bood: (text: string) => Promise; - Firework: (text: string) => Promise; - Stone: (text: string) => Promise; - Light: (text: string) => Promise; - Transformer: (text: string) => Promise; - VideoGame: (text: string) => Promise; - Fiction: (text: string) => Promise; - CaptainAmerica: (text: string) => Promise; - Metalic: (text: string) => Promise; - Metallic: (text: string) => Promise; - Discovery: (text: string) => Promise; - Circuit: (text: string) => Promise; - Sketch: (text: string) => Promise; - CHoror: (text1: string, text2: string) => Promise; - Spooky: (text1: string, text2: string) => Promise; - Skeleton: (text: string) => Promise; +import Result from "../../utils/Result"; + +export namespace TextOnly { + export type ModelOptions = "Pencil" | "Glitch1" | "Glitch2" | "Blackpink" | "Berry" | "Neon" | "LogoBear" + | "Christmas3D" | "Boxtext3D" | "NeonLight3D" | "OrangeJuice3D" | "Thunder1" | "Thunder2" + | "GreenHorror" | "Magma" | "ChocolateCake" | "Strawberry" | "Paper" | "HarryPotter" + | "Embossed" | "Broken" | "Glosy" | "Bear" | "Devil" | "Christmas" | "Dropwater" + | "Carbon" | "ImgGlitch" | "Gradient" | "Glue" | "Bood" | "Firework" | "Stone" + | "Metalic" | "Metallic" | "Discovery" | "Circuit" | "Sketch" | "Skeleton" + | "Light" | "Transformer" | "VideoGame" | "Fiction" | "CaptainAmerica"; + + export interface GenerateOptions { + model: ModelOptions; + text: string; + } + + /** + * Generate image based on the specified options. + * @param {GenerateOptions} options - The options for generating image. + * @returns {Promise} - A promise that resolves with the generated image. + */ + export function Generate(options: GenerateOptions): Promise; +} + +export namespace DoubleText { + export type ModelOptions = "GlitchTiktok" | "LogoNinja" | "VideoGameClassic" | "MarvelStudios" + | "Layered" | "Pornhub" | "AGlitch" | "CHoror" | "Spooky"; + + export interface GenerateOptions { + model: ModelOptions; + text1: string; + text2: string; + } + + /** + * Generate image based on the specified options. + * @param {GenerateOptions} options - The options for generating image. + * @returns {Promise} - A promise that resolves with the generated image. + */ + export function Generate(options: GenerateOptions): Promise; } \ No newline at end of file diff --git a/typings/v1/Detector/NSFW.d.ts b/typings/v1/Detector/NSFW.d.ts new file mode 100644 index 0000000..838c9d4 --- /dev/null +++ b/typings/v1/Detector/NSFW.d.ts @@ -0,0 +1,13 @@ +import Result from "../../utils/Result"; + +export interface AnalysisOptions { + version: number; + url: string; +} + +/** + * Analyze image score based on the specified options. + * @param {AnalysisOptions} options - The options for analyzing the image score. + * @returns {Promise} - A promise that resolves with the analyzed image score. + */ +export function Analysis(options: AnalysisOptions): Promise; \ No newline at end of file diff --git a/typings/v1/Download/AIO.d.ts b/typings/v1/Download/AIO.d.ts index bec8da6..03e7356 100644 --- a/typings/v1/Download/AIO.d.ts +++ b/typings/v1/Download/AIO.d.ts @@ -1,7 +1,15 @@ -export class AIO { - Pinterest: (url: string) => Promise; - IFunny: (url: string) => Promise; - ImDB: (url: string) => Promise; - Cocofun: (url: string) => Promise; - LineSticker: (url: string) => Promise; -} \ No newline at end of file +import Result from "../../utils/Result"; + +export type ModelOptions = "IFunny" | "ImDB" | "Cocofun" | "LineSticker"; + +export interface AnalysisOptions { + model: ModelOptions; + url: string; +} + +/** + * Download an media based on the specified options. + * @param {DownloadOptions} options - The options for downloading the media. + * @returns {Promise} - A promise that resolves with the downloaded media. + */ +export function Analysis(options: AnalysisOptions): Promise; \ No newline at end of file diff --git a/typings/v1/Download/Audio.d.ts b/typings/v1/Download/Audio.d.ts index f83740c..613432a 100644 --- a/typings/v1/Download/Audio.d.ts +++ b/typings/v1/Download/Audio.d.ts @@ -1,7 +1,58 @@ -export class Audio { - SoundCloud1: (url: string) => Promise; - SoundCloud2: (url: string) => Promise; - Ringtone: (query: string) => Promise; - SoundOfText: (text: string, language: string) => Promise; - Joox: (query: string) => Promise; +import Result from "../../utils/Result"; + +export namespace SoundCloud { + export interface AnalysisOptions { + version: number; + url: string; + } + + /** + * Analyze audio from SoundCloud based on the specified options. + * @param {AnalysisOptions} options - The options for analyzing audio from SoundCloud. + * @returns {Promise} - A promise that resolves with the analysis result. + */ + export function Analysis(options: AnalysisOptions): Promise; +} + +export namespace Ringtone { + export interface AnalysisOptions { + version: number; + query: string; + } + + /** + * Analyze audio for a ringtone based on the specified options. + * @param {AnalysisOptions} options - The options for analyzing audio for a ringtone. + * @returns {Promise} - A promise that resolves with the analysis result. + */ + export function Analysis(options: AnalysisOptions): Promise; +} + +export namespace Ntts { + export interface GenerateOptions { + version: number; + text: string; + language: string; + } + + /** + * Generate audio using Ntts (Sound of Text) based on the specified options. + * @param {GenerateOptions} options - The options for generating audio using Ntts. + * @returns {Promise} - A promise that resolves with the generated audio. + */ + export function Generate(options: GenerateOptions): Promise; +} + +export namespace Joox { + export interface GenerateOptions { + version: number; + query: string; + } + + /** + * Generate audio from Joox based on the specified options. + * @param {GenerateOptions} options - The options for generating audio from Joox. + * @returns {Promise} - A promise that resolves with the generated audio. + */ + export function Generate(options: GenerateOptions): Promise; } \ No newline at end of file diff --git a/typings/v1/Download/Facebook.d.ts b/typings/v1/Download/Facebook.d.ts index 6341334..e01f68b 100644 --- a/typings/v1/Download/Facebook.d.ts +++ b/typings/v1/Download/Facebook.d.ts @@ -1,5 +1,13 @@ -export class Facebook { - Model1: (url: string) => Promise; - Model2: (url: string) => Promise; - Model3: (url: string) => Promise; -} \ No newline at end of file +import Result from "../../utils/Result"; + +export interface AnalysisOptions { + version: number; + url: string; +} + +/** + * Download content from Facebook models based on the specified options. + * @param {AnalysisOptions} options - The options for analyzing content using Facebook models. + * @returns {Promise} - A promise that resolves with the analysis result. + */ +export function Analysis(options: AnalysisOptions): Promise; \ No newline at end of file diff --git a/typings/v1/Download/File.d.ts b/typings/v1/Download/File.d.ts index 903faf4..776fcac 100644 --- a/typings/v1/Download/File.d.ts +++ b/typings/v1/Download/File.d.ts @@ -1,9 +1,74 @@ -export class File { - SFileMobiSearch: (query: string) => Promise; - SFileMobi: (url: string) => Promise; - ZippyShare: (url: string) => Promise; - MediaFire: (url: string) => Promise; - Apkdl: (url: string) => Promise; - GoogleDrive: (url: string) => Promise; - Gore: (url: string) => Promise; +import Result from "../../utils/Result"; + +export interface AnalysisOptions { + version: number; + url: string; +} + +export namespace GoogleDrive { + /** + * Download file from Google Drive based on the specified options. + * @param {AnalysisOptions} options - The options for analyzing file from Google Drive. + * @returns {Promise} - A promise that resolves with the analysis result. + */ + export function Analysis(options: AnalysisOptions): Promise; +} + +export namespace MediaFire { + /** + * Download file from MediaFire based on the specified options. + * @param {AnalysisOptions} options - The options for analyzing file from MediaFire. + * @returns {Promise} - A promise that resolves with the analysis result. + */ + export function Analysis(options: AnalysisOptions): Promise; +} + +export namespace SFileMobiSearch { + export interface AnalysisOptions { + version: number; + query: string; + } + + /** + * Download file from SFileMobiSearch based on the specified options. + * @param {AnalysisOptions} options - The options for analyzing file from SFileMobiSearch. + * @returns {Promise} - A promise that resolves with the analysis result. + */ + export function Analysis(options: AnalysisOptions): Promise; +} + +export namespace SFileMobiDownload { + /** + * Download file from SFileMobiDownload based on the specified options. + * @param {AnalysisOptions} options - The options for analyzing file from SFileMobiDownload. + * @returns {Promise} - A promise that resolves with the analysis result. + */ + export function Analysis(options: AnalysisOptions): Promise; +} + +export namespace APKDL { + /** + * Download file from APKDL based on the specified options. + * @param {AnalysisOptions} options - The options for analyzing file from APKDL. + * @returns {Promise} - A promise that resolves with the analysis result. + */ + export function Analysis(options: AnalysisOptions): Promise; +} + +export namespace Gore { + /** + * Download file from Gore based on the specified options. + * @param {AnalysisOptions} options - The options for analyzing file from Gore. + * @returns {Promise} - A promise that resolves with the analysis result. + */ + export function Analysis(options: AnalysisOptions): Promise; +} + +export namespace ZippyShare { + /** + * Download file from ZippyShare based on the specified options. + * @param {AnalysisOptions} options - The options for analyzing file from ZippyShare. + * @returns {Promise} - A promise that resolves with the analysis result. + */ + export function Analysis(options: AnalysisOptions): Promise; } \ No newline at end of file diff --git a/typings/v1/Download/Instagram.d.ts b/typings/v1/Download/Instagram.d.ts index d1b2c04..d20664c 100644 --- a/typings/v1/Download/Instagram.d.ts +++ b/typings/v1/Download/Instagram.d.ts @@ -1,8 +1,29 @@ -export class Instagram { - Model1: (url: string) => Promise; - Model2: (url: string) => Promise; - Model3: (url: string) => Promise; - Model4: (url: string) => Promise; - Model5TV: (url: string) => Promise; - Model6Stories: (username: string) => Promise; +import Result from "../../utils/Result"; + +export namespace Reels { + export interface AnalysisOptions { + version: number; + url: string; + } + + /** + * Download reels from Instagram based on the specified options. + * @param {AnalysisOptions} options - The options for analyzing reels from Instagram. + * @returns {Promise} - A promise that resolves with the analysis result. + */ + export function Analysis(options: AnalysisOptions): Promise; +} + +export namespace Stories { + export interface AnalysisOptions { + version: number; + username: string; + } + + /** + * Download stories from Instagram based on the specified options. + * @param {AnalysisOptions} options - The options for analyzing stories from Instagram. + * @returns {Promise} - A promise that resolves with the analysis result. + */ + export function Analysis(options: AnalysisOptions): Promise; } \ No newline at end of file diff --git a/typings/v1/Download/Pinterest.d.ts b/typings/v1/Download/Pinterest.d.ts index ff6fa1f..32065d5 100644 --- a/typings/v1/Download/Pinterest.d.ts +++ b/typings/v1/Download/Pinterest.d.ts @@ -1,3 +1,15 @@ -export class Pinterest { - Model1: (url: string) => Promise; +import Result from "../../utils/Result"; + +export namespace Video { + export interface AnalysisOptions { + version: number; + url: string; + } + + /** + * Download video from Pinterest based on the specified options. + * @param {AnalysisOptions} options - The options for analyzing video from Pinterest. + * @returns {Promise} - A promise that resolves with the analysis result. + */ + export function Analysis(options: AnalysisOptions): Promise; } \ No newline at end of file diff --git a/typings/v1/Download/Porn.d.ts b/typings/v1/Download/Porn.d.ts index 3071a0c..a56182d 100644 --- a/typings/v1/Download/Porn.d.ts +++ b/typings/v1/Download/Porn.d.ts @@ -1,4 +1,24 @@ -export class Porn { - XNXX: (url: string) => Promise; - XVideos: (url: string) => Promise; +import Result from "../../utils/Result"; + +export interface AnalysisOptions { + version: number; + url: string; +} + +export namespace XNXX { + /** + * Analyze audio from XNXX based on the specified options. + * @param {AnalysisOptions} options - The options for analyzing audio from XNXX. + * @returns {Promise} - A promise that resolves with the analysis result. + */ + export function Analysis(options: AnalysisOptions): Promise; +} + +export namespace XVideos { + /** + * Analyze audio from XVideos based on the specified options. + * @param {AnalysisOptions} options - The options for analyzing audio from XVideos. + * @returns {Promise} - A promise that resolves with the analysis result. + */ + export function Analysis(options: AnalysisOptions): Promise; } \ No newline at end of file diff --git a/typings/v1/Download/Thread.d.ts b/typings/v1/Download/Thread.d.ts index 5df31f6..0e280b6 100644 --- a/typings/v1/Download/Thread.d.ts +++ b/typings/v1/Download/Thread.d.ts @@ -1,3 +1,13 @@ -export class Thread { - Model1: (url: string) => Promise; -} \ No newline at end of file +import Result from "../../utils/Result"; + +export interface AnalysisOptions { + version: number; + url: string; +} + +/** + * Download thread based on the specified options. + * @param {AnalysisOptions} options - The options for analyzing thread. + * @returns {Promise} - A promise that resolves with the analysis result. + */ +export function Analysis(options: AnalysisOptions): Promise; \ No newline at end of file diff --git a/typings/v1/Download/Tiktok.d.ts b/typings/v1/Download/Tiktok.d.ts index f03ed49..42e3087 100644 --- a/typings/v1/Download/Tiktok.d.ts +++ b/typings/v1/Download/Tiktok.d.ts @@ -1,12 +1,13 @@ -export class Tiktok { - Model1: (url: string) => Promise; - Model2: (url: string) => Promise; - Model3: (url: string) => Promise; - Model4: (url: string) => Promise; - Model5: (url: string) => Promise; - Model6: (url: string) => Promise; - Model7: (url: string) => Promise; - Model8: (url: string) => Promise; - Model9Music: (url: string) => Promise; - Model10Slide: (url: string) => Promise; -} \ No newline at end of file +import Result from "../../utils/Result"; + +export interface AnalysisOptions { + version: number; + url: string; +} + +/** + * Analyze TikTok content based on the specified options. + * @param {AnalysisOptions} options - The options for analyzing TikTok content. + * @returns {Promise} - A promise that resolves with the analysis result. + */ +export function Analysis(options: AnalysisOptions): Promise; \ No newline at end of file diff --git a/typings/v1/Download/Twitter.d.ts b/typings/v1/Download/Twitter.d.ts index f502240..51b3196 100644 --- a/typings/v1/Download/Twitter.d.ts +++ b/typings/v1/Download/Twitter.d.ts @@ -1,5 +1,13 @@ -export class Twitter { - Model1: (url: string) => Promise; - Model2: (url: string) => Promise; - Model3: (url: string) => Promise; -} \ No newline at end of file +import Result from "../../utils/Result"; + +export interface AnalysisOptions { + version: number; + url: string; +} + +/** + * Analyze tweet from Twitter based on the specified options. + * @param {AnalysisOptions} options - The options for analyzing tweet from Twitter. + * @returns {Promise} - A promise that resolves with the analysis result. + */ +export function Analysis(options: AnalysisOptions): Promise; \ No newline at end of file diff --git a/typings/v1/Download/Youtube.d.ts b/typings/v1/Download/Youtube.d.ts index 700ab84..3e43cb4 100644 --- a/typings/v1/Download/Youtube.d.ts +++ b/typings/v1/Download/Youtube.d.ts @@ -1,5 +1,38 @@ -export class Youtube { - Play: (query: string) => Promise; - MP3: (url: string) => Promise; - MP4: (url: string) => Promise; +import Result from "../../utils/Result"; + +export interface AnalysisOptions { + version: number; + url: string; +} + +export namespace Video { + /** + * Analyze video from YouTube based on the specified options. + * @param {AnalysisOptions} options - The options for analyzing video from YouTube. + * @returns {Promise} - A promise that resolves with the analysis result. + */ + export function Analysis(options: AnalysisOptions): Promise; +} + +export namespace Audio { + /** + * Analyze audio from YouTube based on the specified options. + * @param {AnalysisOptions} options - The options for analyzing audio from YouTube. + * @returns {Promise} - A promise that resolves with the analysis result. + */ + export function Analysis(options: AnalysisOptions): Promise; +} + +export namespace Play { + export interface AnalysisOptions { + version: number; + query: string; + } + + /** + * Analyze YouTube playlist based on the specified options. + * @param {AnalysisOptions} options - The options for analyzing YouTube playlist. + * @returns {Promise} - A promise that resolves with the analysis result. + */ + export function Analysis(options: AnalysisOptions): Promise; } \ No newline at end of file diff --git a/typings/v1/Game/SusunKata.d.ts b/typings/v1/Games/SusunKata.d.ts similarity index 100% rename from typings/v1/Game/SusunKata.d.ts rename to typings/v1/Games/SusunKata.d.ts diff --git a/typings/v1/Game/Tebakan.d.ts b/typings/v1/Games/Tebakan.d.ts similarity index 100% rename from typings/v1/Game/Tebakan.d.ts rename to typings/v1/Games/Tebakan.d.ts diff --git a/typings/v1/Image/Remini.d.ts b/typings/v1/Image/Remini.d.ts deleted file mode 100644 index f2eeb1b..0000000 --- a/typings/v1/Image/Remini.d.ts +++ /dev/null @@ -1,10 +0,0 @@ -export class Remini { - Attach: (image: string) => Promise; - Url: (image: string) => Promise; - HdrAttach: (image: string) => Promise; - HdrUrl: (image: string) => Promise; - RecolorAttach: (image: string) => Promise; - RecolorUrl: (image: string) => Promise; - DehazeAttach: (image: string) => Promise; - DehazeUrl: (image: string) => Promise; -} \ No newline at end of file diff --git a/typings/v1/Image/Pinterest.d.ts b/typings/v1/Images/Pinterest.d.ts similarity index 100% rename from typings/v1/Image/Pinterest.d.ts rename to typings/v1/Images/Pinterest.d.ts diff --git a/typings/v1/Images/Remini.d.ts b/typings/v1/Images/Remini.d.ts new file mode 100644 index 0000000..f3233eb --- /dev/null +++ b/typings/v1/Images/Remini.d.ts @@ -0,0 +1,42 @@ +import Result from "../../utils/Result"; + +export interface GenerateOptions { + model: "Attach" | "Url"; + image: string; +} + +export namespace Random { + /** + * Enhance image based on the specified options. + * @param {GenerateOptions} options - The options for enhance image. + * @returns {Promise} - A promise that resolves with the enhance image. + */ + export function Generate(options: GenerateOptions): Promise; +} + +export namespace HDR { + /** + * Enhance HDR image based on the specified options. + * @param {GenerateOptions} options - The options for generating HDR image. + * @returns {Promise} - A promise that resolves with the generated HDR image. + */ + export function Generate(options: GenerateOptions): Promise; +} + +export namespace Recolor { + /** + * Enhance recolored image based on the specified options. + * @param {GenerateOptions} options - The options for generating recolored image. + * @returns {Promise} - A promise that resolves with the generated recolored image. + */ + export function Generate(options: GenerateOptions): Promise; +} + +export namespace Dehaze { + /** + * Enhance dehazed image based on the specified options. + * @param {GenerateOptions} options - The options for generating dehazed image. + * @returns {Promise} - A promise that resolves with the generated dehazed image. + */ + export function Generate(options: GenerateOptions): Promise; +} \ No newline at end of file diff --git a/typings/v1/Image/Wallpaper.d.ts b/typings/v1/Images/Wallpaper.d.ts similarity index 100% rename from typings/v1/Image/Wallpaper.d.ts rename to typings/v1/Images/Wallpaper.d.ts diff --git a/typings/v1/Image/Wikipedia.d.ts b/typings/v1/Images/Wikipedia.d.ts similarity index 100% rename from typings/v1/Image/Wikipedia.d.ts rename to typings/v1/Images/Wikipedia.d.ts diff --git a/typings/v1/Stalk/Instagram.d.ts b/typings/v1/Stalk/Instagram.d.ts index ba7dc8a..39dbd3d 100644 --- a/typings/v1/Stalk/Instagram.d.ts +++ b/typings/v1/Stalk/Instagram.d.ts @@ -1,5 +1,13 @@ -export class Instagram { - Model1: (username: string) => Promise; - Model2: (username: string) => Promise; - Model3: (username: string) => Promise; -} \ No newline at end of file +import Result from "../../utils/Result"; + +export interface AnalysisOptions { + version: number; + username: string; +} + +/** + * Analyze Instagram account based on the specified options. + * @param {AnalysisOptions} options - The options for analyzing Instagram account. + * @returns {Promise} - A promise that resolves with the analysis result. + */ +export function Analysis(options: AnalysisOptions): Promise; \ No newline at end of file diff --git a/typings/v1/Stalk/Tiktok.d.ts b/typings/v1/Stalk/Tiktok.d.ts index 671ebd6..0818556 100644 --- a/typings/v1/Stalk/Tiktok.d.ts +++ b/typings/v1/Stalk/Tiktok.d.ts @@ -1,4 +1,13 @@ -export class TikTok { - Model1: (username: string) => Promise; - Model2: (username: string) => Promise; -} \ No newline at end of file +import Result from "../../utils/Result"; + +export interface AnalysisOptions { + version: number; + username: string; +} + +/** + * Analyze TikTok account based on the specified options. + * @param {AnalysisOptions} options - The options for analyzing TikTok account. + * @returns {Promise} - A promise that resolves with the analysis result. + */ +export function Analysis(options: AnalysisOptions): Promise; \ No newline at end of file diff --git a/typings/v1/Stalk/Twitter.d.ts b/typings/v1/Stalk/Twitter.d.ts index 1905aa2..edd6d85 100644 --- a/typings/v1/Stalk/Twitter.d.ts +++ b/typings/v1/Stalk/Twitter.d.ts @@ -1,3 +1,13 @@ -export class Twitter { - Model1: (username: string) => Promise; -} \ No newline at end of file +import Result from "../../utils/Result"; + +export interface AnalysisOptions { + version: number; + username: string; +} + +/** + * S Twitter account based on the specified options. + * @param {AnalysisOptions} options - The options for analyzing Twitter account. + * @returns {Promise} - A promise that resolves with the analysis result. + */ +export function Analysis(options: AnalysisOptions): Promise; \ No newline at end of file