diff --git a/routes/api.js b/routes/api.js index 3d41afc..06f286b 100644 --- a/routes/api.js +++ b/routes/api.js @@ -8,10 +8,13 @@ var zahirr = db.get("zahirr"); console.log('') } -var creator = "Rey" +var creator = "DaniGanz" var neoxr = "yntkts" var zeks = "administrator" var zeks2 = "apivinz" +var lolhuman = "50d177de421e061c8ff753c8" +var danikey = "NisaaCantik" +var dapakey = "SayuBotz" var secure = require('ssl-express-www'); var cors = require('cors'); var fetch = require('node-fetch'); @@ -227,7 +230,7 @@ Akhir Pesan Error //router.use(favicon(__path + "/views/favicon.ico")); -const listkey = ["apirey", "APIKEY", "ditofficial"]; +const listkey = ["DaniKey", "SayuBotz", "Fcx07Junior"]; router.post("/apikey", async (req, res, next) => { const key = req.query.key; @@ -464,11 +467,11 @@ router.get('/music/spotify', async(req, res, next) => { if(!query) return res.json(loghandler.notquery) if(listkey.includes(apikey)){ - fetch(encodeURI(`https://alpin-api-2021.herokuapp.com/api/spotify?apikey=alpin1&q=${query}`)) + fetch(encodeURI(`https://apidhani.herokuapp.com/api/music/joox?apikey=${danikey}&query=${query}`)) .then(response => response.json()) .then(hasil => { - var result = hasil.data; + var result = hasil.result; res.json({ status : true, creator : `${creator}`, @@ -666,34 +669,7 @@ router.get('/download/ig2', async(req, res, next) => { } }); -router.get('/download/stickerline', async(req, res, next) => { - const apikey = req.query.apikey; - const url = req.query.url; - - if(!url) return res.json(loghandler.noturl) - if(!apikey) return res.json(loghandler.notparam) - - if(listkey.includes(apikey)){ - fetch(encodeURI(`http://nzcha-apii.herokuapp.com/stickerline?url=${url}`)) - .then(response => response.json()) - .then(hasil => { - - var result = hasil.result; - res.json({ - status : true, - creator : `${creator}`, - result - }) - }) - .catch(e => { - res.json(loghandler.error) -}) -} else { - res.json(loghandler.invalidKey) -} -}) - -router.get('/download/smule', async(req, res, next) => { +router.get('/download/cocofun', async(req, res, next) => { const apikey = req.query.apikey; const url = req.query.url; @@ -701,11 +677,11 @@ router.get('/download/smule', async(req, res, next) => { if(!apikey) return res.json(loghandler.notparam) if(listkey.includes(apikey)){ - fetch(encodeURI(`https://mnazria.herokuapp.com/api/smule?link=${url}`)) + fetch(encodeURI(`https://x-restapi.herokuapp.com/api/video-dl?url=${url}&apikey=BETA`)) .then(response => response.json()) .then(hasil => { - var result = hasil.result; + var result = hasil; res.json({ status : true, creator : `${creator}`, @@ -747,7 +723,7 @@ router.get('/download/joox3', async(req, res, next) => { } }) -router.get('/download/joox2', async(req, res, next) => { +router.get('/download/jooxplay', async(req, res, next) => { const apikey = req.query.apikey; const query = req.query.query; @@ -755,11 +731,11 @@ router.get('/download/joox2', async(req, res, next) => { if(!apikey) return res.json(loghandler.notparam) if(listkey.includes(apikey)){ - fetch(encodeURI(`https://mnazria.herokuapp.com/api/jooxnich?search=${query}`)) + fetch(encodeURI(`https://api.lolhuman.xyz/api/jooxplay?apikey=${lolhuman}&query=${query}`)) .then(response => response.json()) .then(hasil => { - var result = hasil.lirik; + var result = hasil.result; res.json({ status : true, creator : `${creator}`, @@ -836,7 +812,7 @@ router.get('/download/googleimg', async(req, res, next) => { if(!apikey) return res.json(loghandler.notparam) if(listkey.includes(apikey)){ - fetch(encodeURI(`http://nzcha-apii.herokuapp.com/googleimage?q=${query}`)) + fetch(encodeURI(`https://api.dapuhy.xyz/api/search/googleimage?query=itsuki+nakano&apikey=SayuBotz`)) .then(response => response.json()) .then(hasil => { @@ -863,7 +839,7 @@ router.get('/download/mediafire', async(req, res, next) => { if(!apikey) return res.json(loghandler.notparam) if(listkey.includes(apikey)){ - fetch(encodeURI(`https://api-json-reysekha.herokuapp.com/api/mediafire/?url=${url}&apikey=Yuzzu`)) + fetch(encodeURI(`https://api.dapuhy.xyz/api/socialmedia/mediafire?url=${url}&apikey=SayuBotz`)) .then(response => response.json()) .then(hasil => { @@ -890,11 +866,11 @@ router.get('/stalk/github', async(req, res, next) => { if(!apikey) return res.json(loghandler.notparam) if(listkey.includes(apikey)){ - fetch(encodeURI(`https://free-restapii.herokuapp.com/docs/githubstalk?username=${username}&apikey=LoliKillers`)) + fetch(encodeURI(`https://api.zacros.my.id/info/ghstalk?username=DANIGANZBOT`)) .then(response => response.json()) .then(hasil => { - var result = hasil.data.result; + var result = hasil.result; res.json({ status : true, creator : `${creator}`, @@ -917,11 +893,11 @@ router.get('/stalk/ig', async(req, res, next) => { if(!apikey) return res.json(loghandler.notparam) if(listkey.includes(apikey)){ - fetch(encodeURI(`https://aqulzz.herokuapp.com/igstalk?username=${username}`)) + fetch(encodeURI(`https://hardianto.xyz/api/igstalk?username=xinzganz&apikey=hardianto`)) .then(response => response.json()) .then(hasil => { - var result = hasil.result; + var result = hasil; res.json({ status : true, creator : `${creator}`, @@ -971,7 +947,7 @@ router.get('/download/ytmp32', async(req, res, next) => { if(!apikey) return res.json(loghandler.notparam) if(listkey.includes(apikey)){ - fetch(encodeURI(`http://kocakz.herokuapp.com/api/media/ytaudio?url=${url}`)) + fetch(encodeURI(`https://api.dapuhy.xyz/api/socialmedia/ytmp3?url=https://youtu.be/7KrV0drYfz0&apikey=SayuBotz`)) .then(response => response.json()) .then(hasil => { @@ -998,7 +974,7 @@ router.get('/download/ytmp42', async(req, res, next) => { if(!apikey) return res.json(loghandler.notparam) if(listkey.includes(apikey)){ - fetch(encodeURI(`http://kocakz.herokuapp.com/api/media/ytvid?url=${url}`)) + fetch(encodeURI(`https://api.dapuhy.xyz/api/socialmedia/ytmp4?url=${url}&apikey=SayuBotz`)) .then(response => response.json()) .then(hasil => { @@ -1025,11 +1001,11 @@ router.get('/download/shoppe', async(req, res, next) => { if(!apikey) return res.json(loghandler.notparam) if(listkey.includes(apikey)){ - fetch(encodeURI(`https://api.zeks.me/api/shopee?apikey=reyterganz&q=${q}`)) + fetch(encodeURI(`https://x-restapi.herokuapp.com/api/shopee-search?q=${q}&apikey=BETA`)) .then(response => response.json()) .then(hasil => { - var result = hasil.data; + var result = hasil; res.json({ status : true, creator : `${creator}`, @@ -1052,7 +1028,7 @@ router.get('/primbon/zodiak', async(req, res, next) => { if(!apikey) return res.json(loghandler.notparam) if(listkey.includes(apikey)){ - fetch(encodeURI(`http://revita.herokuapp.com/api/primbon/zodiaku?mimpi=${text}`)) + fetch(encodeURI(`https://api.zacros.my.id/primbon/zodiakharian?zodiak=cancer`)) .then(response => response.json()) .then(hasil => { @@ -1079,7 +1055,7 @@ router.get('/primbon/artimimpi', async(req, res, next) => { if(!apikey) return res.json(loghandler.notparam) if(listkey.includes(apikey)){ - fetch(encodeURI(`http://kocakz.herokuapp.com/api/primbon/tafsirmimpi?mimpi=${text}`)) + fetch(encodeURI(`https://api.dapuhy.xyz/api/fun/artimimpi?mimpi=${text}&apikey=SayuBotz`)) .then(response => response.json()) .then(hasil => { @@ -1106,7 +1082,7 @@ router.get('/primbon/artinama', async(req, res, next) => { if(!apikey) return res.json(loghandler.notparam) if(listkey.includes(apikey)){ - fetch(encodeURI(`http://kocakz.herokuapp.com/api/primbon/artinama?name=${text}`)) + fetch(encodeURI(`https://api.dapuhy.xyz/api/fun/artinama?nama=${text}&apikey=SayuBotz`)) .then(response => response.json()) .then(hasil => { @@ -1160,11 +1136,11 @@ router.get('/download/sticker', async(req, res, next) => { if(!apikey) return res.json(loghandler.notparam) if(listkey.includes(apikey)){ - fetch(encodeURI(`https://api.zeks.me/api/searchsticker?apikey=reyterganz&q=${q}`)) + fetch(encodeURI(`https://api.dapuhy.xyz/api/search/searchsticker?query=${q}&apikey=SayuBotz`)) .then(response => response.json()) .then(hasil => { - var result = hasil.sticker; + var result = hasil; res.json({ status : true, creator : `${creator}`, @@ -1322,7 +1298,7 @@ router.get('/downloader/pinterest', async(req, res, next) => { if(!apikey) return res.json(loghandler.notparam) if(listkey.includes(apikey)){ - fetch(encodeURI(`https://aqulzz.herokuapp.com/pinterest?q=${q}`)) + fetch(encodeURI(`https://api.dapuhy.xyz/api/search/pinterest?query=${q}&apikey=SayuBotz`)) .then(response => response.json()) .then(hasil => { @@ -1341,6 +1317,33 @@ router.get('/downloader/pinterest', async(req, res, next) => { } }) +router.get('/downloader/pinterestimage', async(req, res, next) => { + const apikey = req.query.apikey; + const q = req.query.q; + + if(!q) return res.json(loghandler.notquery) + if(!apikey) return res.json(loghandler.notparam) + + if(listkey.includes(apikey)){ + fetch(encodeURI(`https://api.dapuhy.xyz/api/search/pinterest-image?query=${q}&apikey=SayuBotz`)) + .then(response => response.json()) + .then(hasil => { + + var result = hasil; + res.json({ + status : true, + creator : `${creator}`, + result + }) + }) + .catch(e => { + res.json(loghandler.error) +}) +} else { + res.json(loghandler.invalidKey) +} +}) + router.get('/downloader/igtv', async(req, res, next) => { const apikey = req.query.apikey; const url = req.query.url; @@ -1611,7 +1614,7 @@ router.get('/random/faktaunik', async (req, res, next) => { if(!Apikey) return res.json(loghandler.notparam) if(listkey.includes(Apikey)){ - fetch(encodeURI(`http://kocakz.herokuapp.com/api/random/text/faktaunik`)) + fetch(encodeURI(`https://apidhani.herokuapp.com/api/randomtext/faktaunik?apikey=NisaaCantik`)) .then(response => response.json()) .then(hasil => { var result = hasil.result; @@ -1633,7 +1636,7 @@ router.get('/random/katabijak', async (req, res, next) => { if(!Apikey) return res.json(loghandler.notparam) if(listkey.includes(Apikey)){ - fetch(encodeURI(`http://kocakz.herokuapp.com/api/random/text/katabijak`)) + fetch(encodeURI(`https://apidhani.herokuapp.com/api/randomtext/katabijak?apikey=NisaaCantik`)) .then(response => response.json()) .then(hasil => { var result = hasil.result; @@ -1655,7 +1658,7 @@ router.get('/random/pantun', async (req, res, next) => { if(!Apikey) return res.json(loghandler.notparam) if(listkey.includes(Apikey)){ - fetch(encodeURI(`http://kocakz.herokuapp.com/api/random/text/pantun`)) + fetch(encodeURI(`https://apidhani.herokuapp.com/api/randomtext/pantun?apikey=NisaaCantik`)) .then(response => response.json()) .then(hasil => { var result = hasil.result; @@ -1672,7 +1675,7 @@ res.json(loghandler.invalidKey) } }) -router.get('/random/fancytext', async (req, res, next) => { +router.get('/random/puisi', async (req, res, next) => { var Apikey = req.query.apikey text = req.query.text @@ -1680,7 +1683,7 @@ router.get('/random/fancytext', async (req, res, next) => { if(!text) return res.json(loghandler.nottext) if(listkey.includes(Apikey)){ - fetch(encodeURI(`http://kocakz.herokuapp.com/api/random/text/fancytext?text=${text}`)) + fetch(encodeURI(`https://apidhani.herokuapp.com/api/randomtext/puisi?apikey=NisaaCantik`)) .then(response => response.json()) .then(hasil => { var result = hasil.result; @@ -7012,7 +7015,7 @@ router.get("/maker/nulis", async (req, res, next) => { if(!apikey) return res.json(loghandler.notparam) if(listkey.includes(apikey)) { - let hasil = 'https://api.zeks.xyz/api/nulis?text='+ text +'&apikey=apivinz' + let hasil = 'https://api.dapuhy.xyz/api/maker/nulis?text=DaniEditz&apikey=SayuBotz' data = await fetch(hasil).then(v => v.buffer()) await fs.writeFileSync(__path +'/tmp/nulis.jpeg', data) res.sendFile(__path +'/tmp/nulis.jpeg') @@ -7080,7 +7083,7 @@ router.get('/maker/breakwall', async(req, res, next) => { if(!apikey) return res.json(loghandler.notparam) if(listkey.includes(apikey)) { - let hasil = 'https://api.zeks.xyz/api/breakwall?text='+ text +'&apikey=administrator' + let hasil = 'https://api.dapuhy.xyz/api/textpro/breakwall?text=DaniGanz&apikey=SayuBotz' data = await fetch(hasil).then(v => v.buffer()) await fs.writeFileSync(__path +'/tmp/breakwall.jpg', data) res.sendFile(__path +'/tmp/breakwall.jpg') @@ -7150,7 +7153,7 @@ router.get('/maker/pubglogo', async(req, res, next) => { if(!apikey) return res.json(loghandler.notparam) if(listkey.includes(apikey)) { - let hasil = 'https://api.zeks.xyz/api/pubglogo?text1='+ text1 + '&text2' +'&apikey=administrator' + let hasil = 'https://api.dapuhy.xyz/api/photooxy/pubg?text1=Dani&text2=Ganz&apikey=SayuBotz' data = await fetch(hasil).then(v => v.buffer()) await fs.writeFileSync(__path +'/tmp/pubglogo.jpg', data) res.sendFile(__path +'/tmp/pubglogo.jpg') diff --git a/views/docs-1.html b/views/docs-1.html index 6019259..be8ea5a 100644 --- a/views/docs-1.html +++ b/views/docs-1.html @@ -8,7 +8,7 @@ -