@onepunya/onesytex_api
Advanced tools
Comparing version 1.4.5 to 1.4.6
55
index.js
@@ -1,4 +0,51 @@ | ||
const endpointFunctions = require('./lib/index'); | ||
module.exports = { | ||
api: endpointFunctions | ||
}; | ||
const axios = require('axios'); | ||
const baseURL = "https://api.onesytex.my.id/api/"; | ||
const Api = { | ||
betaCharacterAI: async (text, exid) => { | ||
const response = await axios.get(`${baseURL}beta-character-ai?text=${text}&external_id=${exid}`); | ||
return response.data; | ||
}, | ||
getCharacter: async (query) => { | ||
const response = await axios.get(`${baseURL}get-character?query=${query}`); | ||
return response.data; | ||
}, | ||
blackbox: async (text, webSearchMode) => { | ||
const response = await axios.get(`${baseURL}blackbox?text=${text}&webSearchMode=${webSearchMode}`); | ||
return response.data; | ||
}, | ||
prodia: async (prompt) => { | ||
const response = await axios.get(`${baseURL}prodia?prompt=${prompt}`); | ||
return response.data; | ||
}, | ||
image2hd: async (resolusi, url) => { | ||
const response = await axios.get(`${baseURL}image2hd?upscale=${resolusi}&url=${url}`); | ||
return response.data; | ||
}, | ||
voicevoxSynthesis: async (text, speaker) => { | ||
const response = await axios.get(`${baseURL}voicevox-synthesis?text=${encodeURIComponent(text)}&speaker=${speaker}`); | ||
return response.data; | ||
}, | ||
voicevoxSpeaker: async () => { | ||
const response = await axios.get(`${baseURL}voicevox-speaker`); | ||
return response.data; | ||
}, | ||
pixiv: async (query) => { | ||
const response = await axios.get(`${baseURL}pixiv?query=${query}`); | ||
return response.data; | ||
}, | ||
pixivR18: async (query) => { | ||
const response = await axios.get(`${baseURL}pixiv-r18?query=${query}`); | ||
return response.data; | ||
}, | ||
gemini: async (text) => { | ||
const response = await axios.get(`${baseURL}gemini?text=${text}`); | ||
return response.data; | ||
}, | ||
geminiVision: async (text, url) => { | ||
const response = await axios.get(`${baseURL}gemini-vision?text=${text}&url=${url}`); | ||
return response.data; | ||
} | ||
}; | ||
module.exports = Api; |
@@ -8,3 +8,3 @@ { | ||
"description": "FREE REST IS FREE AND OPEN FOR BOT AND OTHER NEEDS", | ||
"version": "1.4.5", | ||
"version": "1.4.6", | ||
"main": "index.js", | ||
@@ -11,0 +11,0 @@ "scripts": { |
6629
96
4