From f21de224ecd86d0228415922cf73fe1f9f38b061 Mon Sep 17 00:00:00 2001 From: scf4 Date: Thu, 27 Apr 2017 02:36:28 +0100 Subject: [PATCH] updated README.md --- README.md | 4 ++-- lib/index.test.js | 2 +- package.json | 1 + yarn.lock | 7 +++++++ 4 files changed, 11 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 754653b..7a10daf 100644 --- a/README.md +++ b/README.md @@ -41,8 +41,8 @@ lyricist.song(714198).then(song => console.log(song.title)); ## Get song lyrics The Genius API doesn't offer lyrics, but Lyricist can scrape Genius.com for you. Simply provide the `fetchLyrics` option like this: ```js -const lyrics = await lyricist.song(714198, { fetchLyrics: true }); - +const song = await lyricist.song(714198, { fetchLyrics: true }); +console.log(song.lyrics); // output: Spirit of my silence I can hear you... ``` ## Look up an album diff --git a/lib/index.test.js b/lib/index.test.js index 11cfea6..121f8ad 100644 --- a/lib/index.test.js +++ b/lib/index.test.js @@ -1,4 +1,4 @@ -import Lyricist from './index'; +import Lyricist from 'lyricist'; import authKey from './test_key'; describe('Lyricist', () => { diff --git a/package.json b/package.json index 2ecb1f1..522288f 100644 --- a/package.json +++ b/package.json @@ -27,6 +27,7 @@ "homepage": "https://github.com/scf4/lyricist#readme", "dependencies": { "cheerio": "^0.22.0", + "lyricist": "^2.0.0", "node-fetch": "^1.6.3" }, "devDependencies": { diff --git a/yarn.lock b/yarn.lock index b94988c..f521fe6 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1790,6 +1790,13 @@ loose-envify@^1.0.0: dependencies: js-tokens "^3.0.0" +lyricist@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/lyricist/-/lyricist-2.0.0.tgz#787976ba6cc77d1d173f7fd25492207d9575173e" + dependencies: + cheerio "^0.22.0" + node-fetch "^1.6.3" + makeerror@1.0.x: version "1.0.11" resolved "https://registry.yarnpkg.com/makeerror/-/makeerror-1.0.11.tgz#e01a5c9109f2af79660e4e8b9587790184f5a96c"