Skip to content
This repository has been archived by the owner on Jun 7, 2024. It is now read-only.

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
scf4 authored Apr 27, 2017
1 parent f21de22 commit 966064d
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ Use `song()` to fetch a song by ID:
```js
const song = await lyricist.song(714198);
console.log(song.title);

// output: Death with Dignity
```

Expand All @@ -43,6 +44,7 @@ The Genius API doesn't offer lyrics, but Lyricist can scrape Genius.com for you.
```js
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
Expand All @@ -51,7 +53,7 @@ Use `album()` to look up an album by ID. The Genius API doesn't allow you to sea

```js
const album = await lyricist.album(56682);
console.log('%s by %s, album.name, album.artist.name);
console.log('%s by %s', album.name, album.artist.name);

// output: Lanterns by Son Lux
```
Expand All @@ -69,15 +71,15 @@ console.log(album.songs);
## Look up an artist
Use `artist()` to look up an artist by ID:
```js
const artist = lyricist.artist(2);
const artist = await lyricist.artist(2);
console.log(artist.name);
// output: Jay Z
```

## Get songs by an artist
Use `songsByArtist()` to list an artist's songs. Example usage:
```js
const songs = lyricist.songsByArtist(2);
const songs = await lyricist.songsByArtist(2);
```
`songsByArtist()` will show **20 results per page** by default, and can be as high as 50.

Expand Down

0 comments on commit 966064d

Please sign in to comment.