koja-api
Version:
A complete Node.js wrapper for Koja API services including Ephoto generation, YouTube MP4 and MP3 downloads
24 lines (21 loc) • 616 B
JavaScript
const koja = require('./index');
require('dotenv').config();
(async () => {
try {
// Test ephoto
const ephoto = await koja.ephoto(
'https://en.ephoto360.com/ice-text-effect-online-101.html',
'Koja'
);
console.log('Ephoto Result:', ephoto);
// Test ytmp4
const ytUrl = 'https://youtu.be/dovWTFlRIWs?si=9DStVzGBfr2-mDfz';
const mp4 = await koja.ytmp4(ytUrl);
console.log('MP4 Result:', mp4);
// Test ytmp3
const mp3 = await koja.ytmp3(ytUrl, '320kbps');
console.log('MP3 Result:', mp3);
} catch (error) {
console.error('Test Error:', error);
}
})();