🚨 Shai-Hulud Strikes Again:834 Packages Compromised.Technical Analysis →
Socket
Book a DemoInstallSign in
Socket

node-lyrics

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

node-lyrics

Get the lyrics to your favorite songs

latest
Source
npmnpm
Version
2.1.3
Version published
Weekly downloads
4.7K
8.64%
Maintainers
1
Weekly downloads
 
Created
Source

node-lyrics

Get the lyrics to your favorite songs (via LyricWikia API)

Requirements

  • node.js

Install

$ npm install --save node-lyrics

# OR (CLI)

$ npm install --global node-lyrics

Usage

const lyrics = require('node-lyrics');

const albums = await lyrics.getAlbums('Local Natives');
/*
[
    'Gorilla Manor',
    'Hummingbird',
    'Sunlit Youth',
    'Violet Street'
]
*/

Usage CLI

$ lyrics "james blake" retrograde
# > james blake - retrograde [Overgrown]

# > You're on your own,
# > In a world you've grown,
# > ...

v2

  • Supports Promises!
  • getTopSongs was deprecated

API

Besides the methods provided by default, I've added 2 new methods:

  • getAlbums
  • parseLyrics

getAlbums(artist, options, callback)

Fetches the artist albums. [Array]

options (object)

ignore: none (default), 'Unreleased', 'B-Sides', 'Other Songs'. (string or array)

getArtist(artist, options, callback)

Gets the artist albums. [Object]

options (object)

fmt (format): JSON (default), XML, HTML
ignore: none (default), 'Unreleased', 'B-Sides', 'Other Songs'. (string or array)

getHometown(artist, options, callback)

Gets the artist country, state and hometown info. [Object]

options (object)

fmt (format): JSON (default), XML, HTML

getSOTD(options, callback)

Returns the song of the day. [Object]

options (object)

fmt (format): JSON (default), XML, HTML

getSong(artist, song, options, callback)

Returns the URL to the song's lyrics and the lyric's beginning. [Object]

options (object)

fmt (format): JSON (default), XML, HTML

parseLyrics(artist, song, callback)

DISCLAIMER: This method uses web scraping to grab the song's lyrics.

Returns the lyrics for the song. [Object]

DEPRECATED

### getTopSongs(artist, options, callback)

License

MIT © Ricardo Matias

Keywords

lyrics

FAQs

Package last updated on 17 Sep 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts