Skip to content

Commit

Permalink
Merge pull request #4 from juliangruber/add/page-option
Browse files Browse the repository at this point in the history
add page option
  • Loading branch information
feross authored Jan 28, 2018
2 parents b9953f7 + 361314b commit e228d2c
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -237,6 +237,7 @@ class LastFM {
const params = {
method: 'album.search',
limit: opts.limit,
page: opts.page,
album: opts.q
}
this._sendRequest(params, 'results', (err, data) => {
Expand Down Expand Up @@ -369,6 +370,7 @@ class LastFM {
const params = {
method: 'artist.search',
limit: opts.limit,
page: opts.page,
artist: opts.q
}
this._sendRequest(params, 'results', (err, data) => {
Expand All @@ -388,6 +390,7 @@ class LastFM {
const params = {
method: 'chart.getTopArtists',
limit: opts.limit,
page: opts.page,
autocorrect: 1
}
this._sendRequest(params, 'artists', (err, data) => {
Expand All @@ -403,6 +406,7 @@ class LastFM {
const params = {
method: 'chart.getTopTags',
limit: opts.limit,
page: opts.page,
autocorrect: 1
}
this._sendRequest(params, 'tags', cb)
Expand All @@ -412,6 +416,7 @@ class LastFM {
const params = {
method: 'chart.getTopTracks',
limit: opts.limit,
page: opts.page,
autocorrect: 1
}
this._sendRequest(params, 'tracks', (err, data) => {
Expand All @@ -435,6 +440,7 @@ class LastFM {
method: 'geo.getTopArtists',
country: opts.country,
limit: opts.limit,
page: opts.page,
autocorrect: 1
}
this._sendRequest(params, 'topartists', cb)
Expand All @@ -448,6 +454,7 @@ class LastFM {
method: 'geo.getTopTracks',
country: opts.country,
limit: opts.limit,
page: opts.page,
autocorrect: 1
}
this._sendRequest(params, 'tracks', cb)
Expand Down Expand Up @@ -486,6 +493,7 @@ class LastFM {
const params = {
method: 'tag.getTopAlbums',
limit: opts.limit,
page: opts.page,
tag: opts.tag
}
this._sendRequest(params, 'albums', cb)
Expand All @@ -498,6 +506,7 @@ class LastFM {
const params = {
method: 'tag.getTopArtists',
limit: opts.limit,
page: opts.page,
tag: opts.tag
}
this._sendRequest(params, 'topartists', cb)
Expand All @@ -517,6 +526,7 @@ class LastFM {
const params = {
method: 'tag.getTopTracks',
limit: opts.limit,
page: opts.page,
tag: opts.tag
}
this._sendRequest(params, 'tracks', cb)
Expand Down Expand Up @@ -603,6 +613,7 @@ class LastFM {
const params = {
method: 'track.search',
limit: opts.limit,
page: opts.page,
track: opts.q
}
this._sendRequest(params, 'results', (err, data) => {
Expand Down

0 comments on commit e228d2c

Please sign in to comment.