node-lyrics
Advanced tools
+123
| # 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 | ||
| ```js | ||
| const lyrics = require('node-lyrics'); | ||
| const albums = await lyrics.getAlbums('Local Natives'); | ||
| /* | ||
| [ | ||
| 'Gorilla Manor', | ||
| 'Hummingbird', | ||
| 'Sunlit Youth', | ||
| 'Violet Street' | ||
| ] | ||
| */ | ||
| ``` | ||
| ## Usage CLI | ||
| ```bash | ||
| $ 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 |
+5
-5
| { | ||
| "name": "node-lyrics", | ||
| "version": "2.1.1", | ||
| "version": "2.1.2", | ||
| "description": "Get the lyrics to your favorite songs", | ||
@@ -34,3 +34,3 @@ "main": "index.js", | ||
| "dependencies": { | ||
| "chalk": "^2.4.2", | ||
| "chalk": "^4.1.0", | ||
| "cheerio": "1.0.0-rc.3", | ||
@@ -42,9 +42,9 @@ "lodash.assign": "^4.2.0", | ||
| "lodash.map": "^4.6.0", | ||
| "meow": "^5.0.0", | ||
| "superagent": "5.1.0" | ||
| "meow": "^7.1.1", | ||
| "superagent": "6.1.0" | ||
| }, | ||
| "devDependencies": { | ||
| "chai": "^4.2.0", | ||
| "mocha": "^6.2.0" | ||
| "mocha": "^8.1.3" | ||
| } | ||
| } |
-123
| # 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 | ||
| ```js | ||
| const lyrics = require('node-lyrics'); | ||
| const albums = await lyrics.getAlbums('Local Natives'); | ||
| /* | ||
| [ | ||
| 'Gorilla Manor', | ||
| 'Hummingbird', | ||
| 'Sunlit Youth', | ||
| 'Violet Street' | ||
| ] | ||
| */ | ||
| ``` | ||
| ## Usage CLI | ||
| ```bash | ||
| $ 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 |
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
Updated
Updated
Updated