koja-api

2.0.0 • Public • Published

Koja API

A Node.js wrapper for Koja API services including Ephoto generation, YouTube MP4 and MP3 downloads.

Installation

npm install koja-api

Usage

const koja = require('koja-api');

// Example 1: Generate ephoto
(async () => {
  try {
    const ephotoResult = await koja.ephoto(
      'https://en.ephoto360.com/ice-text-effect-online-101.html',
      'Koja'
    );
    console.log(ephotoResult);
  } catch (error) {
    console.error(error);
  }
})();

// Example 2: Download YouTube video as MP4
(async () => {
  try {
    const mp4Result = await koja.ytmp4(
      'https://youtu.be/dovWTFlRIWs?si=9DStVzGBfr2-mDfz',
      '720p' // optional quality parameter
    );
    console.log(mp4Result);
  } catch (error) {
    console.error(error);
  }
})();

// Example 3: Download YouTube video as MP3
(async () => {
  try {
    const mp3Result = await koja.ytmp3(
      'https://youtu.be/dovWTFlRIWs?si=9DStVzGBfr2-mDfz',
      '320kbps' // optional quality parameter
    );
    console.log(mp3Result);
  } catch (error) {
    console.error(error);
  }
})();

API Methods

ephoto(url, text)

  • url (String): The ephoto360 effect URL
  • text (String): The text to apply the effect to

ytmp4(url, [quality])

  • url (String): YouTube video URL
  • quality (String, optional): Preferred quality (e.g., '360p', '720p')

ytmp3(url, [quality])

  • url (String): YouTube video URL
  • quality (String, optional): Preferred quality (e.g., '128kbps', '320kbps')

Response Structure

All methods return a Promise that resolves to an object with the following structure:

{
  creator: "ALI KOJA",
  status: 200,
  success: true,
  // Method-specific response data (result/download)
  // Metadata (for YouTube methods)
}

License

MIT

/koja-api/

    Package Sidebar

    Install

    npm i koja-api

    Weekly Downloads

    4

    Version

    2.0.0

    License

    MIT

    Unpacked Size

    5 kB

    Total Files

    4

    Last publish

    Collaborators

    • kojababu