パッケージの詳細

koja-api

kojababu24MIT2.0.0

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

koja, ephoto, youtube-downloader, api-wrapper

readme

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