Interface Data

interface Data {
    cache?: Cache<undefined | null | string, undefined | null | CacheLyrics>;
    getMusixmatchToken?: (() =>
        | undefined
        | null
        | TokenData
        | Promise<undefined | null | TokenData>);
    instrumentalLyricsIndicator?: string;
    logLevel?: LogLevel;
    saveMusixmatchToken?: ((tokenData: TokenData) => void | Promise<void>);
    sources?: Sources;
}

Properties

cache?: Cache<undefined | null | string, undefined | null | CacheLyrics>

Any method that can store data and has .set(), .get() and .has() functions

getMusixmatchToken?: (() =>
    | undefined
    | null
    | TokenData
    | Promise<undefined | null | TokenData>)

Function used to fetch the Musixmatch token (required to fetch the lyrics data from Musixmatch)

instrumentalLyricsIndicator?: string

The character to use for instrumental lyrics (more than 3 seconds of music without any voice)

logLevel?: LogLevel

The level of the logging

saveMusixmatchToken?: ((tokenData: TokenData) => void | Promise<void>)

Function used to save the Musixmatch token (required to fetch the lyrics data from Musixmatch)

sources?: Sources

Array of sources to use, in the order they have to be fetched