azul-lyrics

0.0.2 • Public • Published

Azul Lyrics


Installation:

npm i azul-lyrics

Usage (without Callback):

const AzulLyrics = require("azul-lyrics");
const lyricsClient = new AzulLyrics(/* My API Key Goes Here*/);

// Search for Never Gonna Give You Up by Rick Astley
const query = {
    title: "Never Gonna Give You Up",
    artist: "Rick Astley"
}
// By Default, the provider is AUTO
const provider = AzulLyrics.PROVIDERS.AUTO;

// Provide the query and provider (optional)
const result = await lyricsClient.searchForLyrics(query, provider);
if ("error" in result) return console.error(result.error);
console.log("It works: %o", result);

Usage (with Callback)

const AzulLyrics = require("azul-lyrics");
const lyricsClient = new AzulLyrics(/* My API Key Goes Here*/);

// Search for Never Gonna Give You Up by Rick Astley
const query = {
    title: "Never Gonna Give You Up",
    artist: "Rick Astley"
}
// By Default, the provider is AUTO
const provider = AzulLyrics.PROVIDERS.AUTO;

// Add the 3rd Param: callback (optional)
lyricsClient.searchForLyrics(query, provider, function(result) {
    if ("error" in result) {
        return console.error(result.error);
    };
    return console.log("It works: %o", result);
});

Author:

TheRealGeoDash2019

/azul-lyrics/

    Package Sidebar

    Install

    npm i azul-lyrics

    Weekly Downloads

    2

    Version

    0.0.2

    License

    ISC

    Unpacked Size

    4.02 kB

    Total Files

    4

    Last publish

    Collaborators

    • therealgeodash