Skip to content
ZYROUGE edited this page Apr 10, 2020 · 7 revisions

Creating an Actual Client

const genius = require("genius-lyrics");
const Genius = new genius.Client('your-genius-token');

Visit Genius Developers Page for a Token


Properties

Methods


Properties

.key

Genius Lyrics Client's API Key

Returns: string

Example:

console.log(Genius.key)

.version

Genius Lyrics Package Version

Returns: string

Example:

console.log(Genius.version)

Methods

.fetcher(endpoint)

Fetches the Endpoint

Note: This is only for Advanced-Usage

Parameter Type Description
endpoint string Fetches using node-fetch

Returns: Promise {<pending>}

Example:

Genius.fetcher('https://api.genius.com/search?q=faded')
.then(res => console.log(res))
.catch(e => console.error(e));