1.0.0-dev • Published 3 years ago

@alufi/lyrics-api v1.0.0-dev

Weekly downloads
-
License
ISC
Repository
github
Last release
3 years ago

@alufi/lyrics-api

An official Lyrics API wrapper of Alufi Bot

Example

  • Check About Npm
console.log(require('@alufi/lyrics-api'));
  • For Usage Basics
const lyrics = require('@alufi/lyrics-api');

// Only Lyrics
lyrics.get("SongTitle").then(console.log).catch(console.error);

// With Lyrics Data. optional default is false
lyrics.get("SongTitle", true).then(console.log).catch(console.error);
  • For Usage With Asynchronus System JS
const lyrics = require('@alufi/lyrics-api');

(async() => {
    try {
        const result = await lyrics.get("SongTitle");
        console.log(result); // get Lyrics
    } catch(Error) {
        console.error(Error); // get Error
    }
})();

Example Result

  • Only Lyrics (text)
Lyrics Content...
...
  • With Lyrics Data (JSON)
{
    data: {
        title: Lyrics Title,
        artist: Lyrics Artist Name,
        thumbnails: Lyrics Thumbnail URL,
        lyrics: Lyrics Content
    }
    response: Lyrics Result Latency 
}