lastfm-nodejs-client 1.6.0 → 1.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +140 -74
- package/dist/@types/album/addTags.d.ts +11 -0
- package/dist/@types/album/getInfo.d.ts +11 -0
- package/dist/@types/album/getTags.d.ts +11 -0
- package/dist/@types/album/getTopTags.d.ts +10 -0
- package/dist/@types/album/removeTag.d.ts +11 -0
- package/dist/@types/album/search.d.ts +10 -0
- package/dist/@types/artist/addTags.d.ts +10 -0
- package/dist/@types/artist/getCorrection.d.ts +9 -0
- package/dist/@types/artist/getInfo.d.ts +10 -0
- package/dist/@types/artist/getSimilar.d.ts +10 -0
- package/dist/@types/artist/getTags.d.ts +10 -0
- package/dist/@types/artist/getTopAlbums.d.ts +11 -0
- package/dist/@types/artist/getTopTags.d.ts +9 -0
- package/dist/@types/artist/getTopTracks.d.ts +11 -0
- package/dist/@types/artist/removeTag.d.ts +10 -0
- package/dist/@types/artist/search.d.ts +10 -0
- package/dist/@types/auth/getMobileSession.d.ts +11 -0
- package/dist/@types/auth/getSession.d.ts +10 -0
- package/dist/@types/auth.d.ts +9 -6
- package/dist/@types/chart/topArtists.d.ts +11 -0
- package/dist/@types/chart/topTags.d.ts +8 -0
- package/dist/@types/chart/topTracks.d.ts +8 -0
- package/dist/@types/config.d.ts +13 -11
- package/dist/@types/createOptions.d.ts +23 -0
- package/dist/@types/geo/getTopArtists.d.ts +10 -0
- package/dist/@types/geo/getTopTracks.d.ts +10 -0
- package/dist/@types/getFriends.d.ts +6 -3
- package/dist/@types/getInfo.d.ts +5 -3
- package/dist/@types/getLovedTracks.d.ts +7 -3
- package/dist/@types/getRecentTracks.d.ts +7 -3
- package/dist/@types/getTopAlbums.d.ts +7 -3
- package/dist/@types/getTopArtists.d.ts +7 -3
- package/dist/@types/getTopTracks.d.ts +7 -3
- package/dist/@types/getUserTopTags.d.ts +6 -3
- package/dist/@types/getWeeklyAlbumChart.d.ts +7 -3
- package/dist/@types/getWeeklyArtistChart.d.ts +7 -3
- package/dist/@types/getWeeklyChartList.d.ts +8 -3
- package/dist/@types/getWeeklyTrackChart.d.ts +7 -3
- package/dist/@types/index.d.ts +31 -89
- package/dist/@types/library/getArtists.d.ts +10 -0
- package/dist/@types/method.d.ts +25 -77
- package/dist/@types/request.d.ts +23 -0
- package/dist/@types/tag/getInfo.d.ts +9 -0
- package/dist/@types/tag/getSimilar.d.ts +8 -0
- package/dist/@types/tag/getTopAlbums.d.ts +10 -0
- package/dist/@types/tag/getTopArtists.d.ts +10 -0
- package/dist/@types/tag/getTopTags.d.ts +7 -0
- package/dist/@types/tag/getWeeklyChartList.d.ts +9 -0
- package/dist/@types/tag/topTracks.d.ts +6 -3
- package/dist/@types/track/addTags.d.ts +11 -0
- package/dist/@types/track/getCorrection.d.ts +10 -0
- package/dist/@types/track/getInfo.d.ts +11 -0
- package/dist/@types/track/getSimilar.d.ts +11 -0
- package/dist/@types/track/getTags.d.ts +11 -0
- package/dist/@types/track/getTopTags.d.ts +10 -0
- package/dist/@types/track/love.d.ts +10 -0
- package/dist/@types/track/removeTag.d.ts +11 -0
- package/dist/@types/track/scrobble.d.ts +12 -0
- package/dist/@types/track/search.d.ts +11 -0
- package/dist/@types/track/unlove.d.ts +10 -0
- package/dist/@types/track/updateNowPlaying.d.ts +11 -0
- package/dist/@types/user/getPersonalTags.d.ts +12 -0
- package/dist/album/addTags.js +11 -0
- package/dist/album/addTags.js.map +1 -1
- package/dist/album/getInfo.js +11 -0
- package/dist/album/getInfo.js.map +1 -1
- package/dist/album/getTags.js +11 -0
- package/dist/album/getTags.js.map +1 -1
- package/dist/album/getTopTags.js +10 -0
- package/dist/album/getTopTags.js.map +1 -1
- package/dist/album/removeTag.js +11 -0
- package/dist/album/removeTag.js.map +1 -1
- package/dist/album/search.js +10 -0
- package/dist/album/search.js.map +1 -1
- package/dist/artist/addTags.js +10 -0
- package/dist/artist/addTags.js.map +1 -1
- package/dist/artist/getCorrection.js +9 -0
- package/dist/artist/getCorrection.js.map +1 -1
- package/dist/artist/getInfo.js +10 -0
- package/dist/artist/getInfo.js.map +1 -1
- package/dist/artist/getSimilar.js +10 -0
- package/dist/artist/getSimilar.js.map +1 -1
- package/dist/artist/getTags.js +10 -0
- package/dist/artist/getTags.js.map +1 -1
- package/dist/artist/getTopAlbums.js +11 -0
- package/dist/artist/getTopAlbums.js.map +1 -1
- package/dist/artist/getTopTags.js +9 -0
- package/dist/artist/getTopTags.js.map +1 -1
- package/dist/artist/getTopTracks.js +11 -0
- package/dist/artist/getTopTracks.js.map +1 -1
- package/dist/artist/removeTag.js +10 -0
- package/dist/artist/removeTag.js.map +1 -1
- package/dist/artist/search.js +10 -0
- package/dist/artist/search.js.map +1 -1
- package/dist/auth/getMobileSession.js +11 -0
- package/dist/auth/getMobileSession.js.map +1 -1
- package/dist/auth/getSession.js +10 -0
- package/dist/auth/getSession.js.map +1 -1
- package/dist/auth.js +9 -6
- package/dist/auth.js.map +1 -1
- package/dist/chart/topArtists.js +11 -0
- package/dist/chart/topArtists.js.map +1 -1
- package/dist/chart/topTags.js +8 -0
- package/dist/chart/topTags.js.map +1 -1
- package/dist/chart/topTracks.js +8 -0
- package/dist/chart/topTracks.js.map +1 -1
- package/dist/cjs/album/addTags.js +11 -0
- package/dist/cjs/album/addTags.js.map +1 -1
- package/dist/cjs/album/getInfo.js +11 -0
- package/dist/cjs/album/getInfo.js.map +1 -1
- package/dist/cjs/album/getTags.js +11 -0
- package/dist/cjs/album/getTags.js.map +1 -1
- package/dist/cjs/album/getTopTags.js +10 -0
- package/dist/cjs/album/getTopTags.js.map +1 -1
- package/dist/cjs/album/removeTag.js +11 -0
- package/dist/cjs/album/removeTag.js.map +1 -1
- package/dist/cjs/album/search.js +10 -0
- package/dist/cjs/album/search.js.map +1 -1
- package/dist/cjs/artist/addTags.js +10 -0
- package/dist/cjs/artist/addTags.js.map +1 -1
- package/dist/cjs/artist/getCorrection.js +9 -0
- package/dist/cjs/artist/getCorrection.js.map +1 -1
- package/dist/cjs/artist/getInfo.js +10 -0
- package/dist/cjs/artist/getInfo.js.map +1 -1
- package/dist/cjs/artist/getSimilar.js +10 -0
- package/dist/cjs/artist/getSimilar.js.map +1 -1
- package/dist/cjs/artist/getTags.js +10 -0
- package/dist/cjs/artist/getTags.js.map +1 -1
- package/dist/cjs/artist/getTopAlbums.js +11 -0
- package/dist/cjs/artist/getTopAlbums.js.map +1 -1
- package/dist/cjs/artist/getTopTags.js +9 -0
- package/dist/cjs/artist/getTopTags.js.map +1 -1
- package/dist/cjs/artist/getTopTracks.js +11 -0
- package/dist/cjs/artist/getTopTracks.js.map +1 -1
- package/dist/cjs/artist/removeTag.js +10 -0
- package/dist/cjs/artist/removeTag.js.map +1 -1
- package/dist/cjs/artist/search.js +10 -0
- package/dist/cjs/artist/search.js.map +1 -1
- package/dist/cjs/auth/getMobileSession.js +11 -0
- package/dist/cjs/auth/getMobileSession.js.map +1 -1
- package/dist/cjs/auth/getSession.js +10 -0
- package/dist/cjs/auth/getSession.js.map +1 -1
- package/dist/cjs/auth.js +9 -6
- package/dist/cjs/auth.js.map +1 -1
- package/dist/cjs/chart/topArtists.js +11 -0
- package/dist/cjs/chart/topArtists.js.map +1 -1
- package/dist/cjs/chart/topTags.js +8 -0
- package/dist/cjs/chart/topTags.js.map +1 -1
- package/dist/cjs/chart/topTracks.js +8 -0
- package/dist/cjs/chart/topTracks.js.map +1 -1
- package/dist/cjs/config.js.map +1 -1
- package/dist/cjs/createOptions.js +23 -0
- package/dist/cjs/createOptions.js.map +1 -1
- package/dist/cjs/geo/getTopArtists.js +10 -0
- package/dist/cjs/geo/getTopArtists.js.map +1 -1
- package/dist/cjs/geo/getTopTracks.js +10 -0
- package/dist/cjs/geo/getTopTracks.js.map +1 -1
- package/dist/cjs/getFriends.js +6 -3
- package/dist/cjs/getFriends.js.map +1 -1
- package/dist/cjs/getInfo.js +5 -3
- package/dist/cjs/getInfo.js.map +1 -1
- package/dist/cjs/getLovedTracks.js +7 -3
- package/dist/cjs/getLovedTracks.js.map +1 -1
- package/dist/cjs/getRecentTracks.js +7 -3
- package/dist/cjs/getRecentTracks.js.map +1 -1
- package/dist/cjs/getTopAlbums.js +7 -3
- package/dist/cjs/getTopAlbums.js.map +1 -1
- package/dist/cjs/getTopArtists.js +7 -3
- package/dist/cjs/getTopArtists.js.map +1 -1
- package/dist/cjs/getTopTracks.js +7 -3
- package/dist/cjs/getTopTracks.js.map +1 -1
- package/dist/cjs/getUserTopTags.js +6 -3
- package/dist/cjs/getUserTopTags.js.map +1 -1
- package/dist/cjs/getWeeklyAlbumChart.js +7 -3
- package/dist/cjs/getWeeklyAlbumChart.js.map +1 -1
- package/dist/cjs/getWeeklyArtistChart.js +7 -3
- package/dist/cjs/getWeeklyArtistChart.js.map +1 -1
- package/dist/cjs/getWeeklyChartList.js +8 -3
- package/dist/cjs/getWeeklyChartList.js.map +1 -1
- package/dist/cjs/getWeeklyTrackChart.js +7 -3
- package/dist/cjs/getWeeklyTrackChart.js.map +1 -1
- package/dist/cjs/index.js +21 -0
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/library/getArtists.js +10 -0
- package/dist/cjs/library/getArtists.js.map +1 -1
- package/dist/cjs/method.js +11 -0
- package/dist/cjs/method.js.map +1 -1
- package/dist/cjs/request.js +30 -0
- package/dist/cjs/request.js.map +1 -1
- package/dist/cjs/tag/getInfo.js +9 -0
- package/dist/cjs/tag/getInfo.js.map +1 -1
- package/dist/cjs/tag/getSimilar.js +8 -0
- package/dist/cjs/tag/getSimilar.js.map +1 -1
- package/dist/cjs/tag/getTopAlbums.js +10 -0
- package/dist/cjs/tag/getTopAlbums.js.map +1 -1
- package/dist/cjs/tag/getTopArtists.js +10 -0
- package/dist/cjs/tag/getTopArtists.js.map +1 -1
- package/dist/cjs/tag/getTopTags.js +7 -0
- package/dist/cjs/tag/getTopTags.js.map +1 -1
- package/dist/cjs/tag/getWeeklyChartList.js +9 -0
- package/dist/cjs/tag/getWeeklyChartList.js.map +1 -1
- package/dist/cjs/tag/topTracks.js +6 -3
- package/dist/cjs/tag/topTracks.js.map +1 -1
- package/dist/cjs/track/addTags.js +11 -0
- package/dist/cjs/track/addTags.js.map +1 -1
- package/dist/cjs/track/getCorrection.js +10 -0
- package/dist/cjs/track/getCorrection.js.map +1 -1
- package/dist/cjs/track/getInfo.js +11 -0
- package/dist/cjs/track/getInfo.js.map +1 -1
- package/dist/cjs/track/getSimilar.js +11 -0
- package/dist/cjs/track/getSimilar.js.map +1 -1
- package/dist/cjs/track/getTags.js +11 -0
- package/dist/cjs/track/getTags.js.map +1 -1
- package/dist/cjs/track/getTopTags.js +10 -0
- package/dist/cjs/track/getTopTags.js.map +1 -1
- package/dist/cjs/track/love.js +10 -0
- package/dist/cjs/track/love.js.map +1 -1
- package/dist/cjs/track/removeTag.js +11 -0
- package/dist/cjs/track/removeTag.js.map +1 -1
- package/dist/cjs/track/scrobble.js +12 -0
- package/dist/cjs/track/scrobble.js.map +1 -1
- package/dist/cjs/track/search.js +11 -0
- package/dist/cjs/track/search.js.map +1 -1
- package/dist/cjs/track/unlove.js +10 -0
- package/dist/cjs/track/unlove.js.map +1 -1
- package/dist/cjs/track/updateNowPlaying.js +11 -0
- package/dist/cjs/track/updateNowPlaying.js.map +1 -1
- package/dist/cjs/user/getPersonalTags.js +12 -0
- package/dist/cjs/user/getPersonalTags.js.map +1 -1
- package/dist/config.js.map +1 -1
- package/dist/createOptions.js +23 -0
- package/dist/createOptions.js.map +1 -1
- package/dist/geo/getTopArtists.js +10 -0
- package/dist/geo/getTopArtists.js.map +1 -1
- package/dist/geo/getTopTracks.js +10 -0
- package/dist/geo/getTopTracks.js.map +1 -1
- package/dist/getFriends.js +6 -3
- package/dist/getFriends.js.map +1 -1
- package/dist/getInfo.js +5 -3
- package/dist/getInfo.js.map +1 -1
- package/dist/getLovedTracks.js +7 -3
- package/dist/getLovedTracks.js.map +1 -1
- package/dist/getRecentTracks.js +7 -3
- package/dist/getRecentTracks.js.map +1 -1
- package/dist/getTopAlbums.js +7 -3
- package/dist/getTopAlbums.js.map +1 -1
- package/dist/getTopArtists.js +7 -3
- package/dist/getTopArtists.js.map +1 -1
- package/dist/getTopTracks.js +7 -3
- package/dist/getTopTracks.js.map +1 -1
- package/dist/getUserTopTags.js +6 -3
- package/dist/getUserTopTags.js.map +1 -1
- package/dist/getWeeklyAlbumChart.js +7 -3
- package/dist/getWeeklyAlbumChart.js.map +1 -1
- package/dist/getWeeklyArtistChart.js +7 -3
- package/dist/getWeeklyArtistChart.js.map +1 -1
- package/dist/getWeeklyChartList.js +8 -3
- package/dist/getWeeklyChartList.js.map +1 -1
- package/dist/getWeeklyTrackChart.js +7 -3
- package/dist/getWeeklyTrackChart.js.map +1 -1
- package/dist/index.js +21 -0
- package/dist/index.js.map +1 -1
- package/dist/library/getArtists.js +10 -0
- package/dist/library/getArtists.js.map +1 -1
- package/dist/method.js +11 -0
- package/dist/method.js.map +1 -1
- package/dist/request.js +30 -0
- package/dist/request.js.map +1 -1
- package/dist/tag/getInfo.js +9 -0
- package/dist/tag/getInfo.js.map +1 -1
- package/dist/tag/getSimilar.js +8 -0
- package/dist/tag/getSimilar.js.map +1 -1
- package/dist/tag/getTopAlbums.js +10 -0
- package/dist/tag/getTopAlbums.js.map +1 -1
- package/dist/tag/getTopArtists.js +10 -0
- package/dist/tag/getTopArtists.js.map +1 -1
- package/dist/tag/getTopTags.js +7 -0
- package/dist/tag/getTopTags.js.map +1 -1
- package/dist/tag/getWeeklyChartList.js +9 -0
- package/dist/tag/getWeeklyChartList.js.map +1 -1
- package/dist/tag/topTracks.js +6 -3
- package/dist/tag/topTracks.js.map +1 -1
- package/dist/track/addTags.js +11 -0
- package/dist/track/addTags.js.map +1 -1
- package/dist/track/getCorrection.js +10 -0
- package/dist/track/getCorrection.js.map +1 -1
- package/dist/track/getInfo.js +11 -0
- package/dist/track/getInfo.js.map +1 -1
- package/dist/track/getSimilar.js +11 -0
- package/dist/track/getSimilar.js.map +1 -1
- package/dist/track/getTags.js +11 -0
- package/dist/track/getTags.js.map +1 -1
- package/dist/track/getTopTags.js +10 -0
- package/dist/track/getTopTags.js.map +1 -1
- package/dist/track/love.js +10 -0
- package/dist/track/love.js.map +1 -1
- package/dist/track/removeTag.js +11 -0
- package/dist/track/removeTag.js.map +1 -1
- package/dist/track/scrobble.js +12 -0
- package/dist/track/scrobble.js.map +1 -1
- package/dist/track/search.js +11 -0
- package/dist/track/search.js.map +1 -1
- package/dist/track/unlove.js +10 -0
- package/dist/track/unlove.js.map +1 -1
- package/dist/track/updateNowPlaying.js +11 -0
- package/dist/track/updateNowPlaying.js.map +1 -1
- package/dist/user/getPersonalTags.js +12 -0
- package/dist/user/getPersonalTags.js.map +1 -1
- package/package.json +7 -10
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getSession.js","sourceRoot":"","sources":["../../src/auth/getSession.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAC9C,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"getSession.js","sourceRoot":"","sources":["../../src/auth/getSession.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAC9C,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AAEtC;;;;;;;;;GASG;AACH,MAAM,CAAC,KAAK,UAAU,cAAc,CAAC,MAAc,EAAE,KAAa;IAChE,OAAO,MAAM,aAAa,CAAsB,EAAE,MAAM,EAAE,KAAK,EAAE,EAAE,MAAM,CAAC,YAAY,CAAC,CAAC;AAC1F,CAAC"}
|
package/dist/auth.js
CHANGED
|
@@ -1,14 +1,17 @@
|
|
|
1
1
|
import { createOptions } from './createOptions.js';
|
|
2
2
|
import request from './request.js';
|
|
3
3
|
/**
|
|
4
|
-
*
|
|
4
|
+
* Fetch an unauthenticated token for the web auth flow.
|
|
5
5
|
*
|
|
6
|
-
*
|
|
6
|
+
* Tokens are API-account-specific, valid for 60 minutes, and consumed
|
|
7
|
+
* once a session is created via `auth.getSession`.
|
|
7
8
|
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
* @
|
|
9
|
+
* @see https://www.last.fm/api/show/auth.getToken
|
|
10
|
+
* @param method - The Last.fm API method string (`method.auth.getToken`)
|
|
11
|
+
* @param user - The Last.fm username
|
|
12
|
+
* @param period - The time period parameter
|
|
13
|
+
* @param limit - The limit parameter
|
|
14
|
+
* @returns An unauthenticated token to redirect the user to the Last.fm auth page
|
|
12
15
|
*/
|
|
13
16
|
export async function auth(method, user, period, limit) {
|
|
14
17
|
const options = createOptions(method, user, period, limit);
|
package/dist/auth.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"auth.js","sourceRoot":"","sources":["../src/auth.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACnD,OAAO,OAAO,MAAM,cAAc,CAAC;AAEnC
|
|
1
|
+
{"version":3,"file":"auth.js","sourceRoot":"","sources":["../src/auth.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACnD,OAAO,OAAO,MAAM,cAAc,CAAC;AAEnC;;;;;;;;;;;;GAYG;AACH,MAAM,CAAC,KAAK,UAAU,IAAI,CACxB,MAAc,EACd,IAAY,EACZ,MAAc,EACd,KAAa;IAEb,MAAM,OAAO,GAAG,aAAa,CAAC,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,KAAK,CAAC,CAAC;IAC3D,OAAO,MAAM,OAAO,CAAe,OAAO,CAAC,CAAC;AAC9C,CAAC"}
|
package/dist/chart/topArtists.js
CHANGED
|
@@ -1,5 +1,16 @@
|
|
|
1
1
|
import { createOptions } from '../createOptions.js';
|
|
2
2
|
import request from '../request.js';
|
|
3
|
+
/**
|
|
4
|
+
* Get the top artists chart on Last.fm.
|
|
5
|
+
*
|
|
6
|
+
* @see https://www.last.fm/api/show/chart.getTopArtists
|
|
7
|
+
* @param method - The Last.fm API method string (`method.chart.getTopArtists`)
|
|
8
|
+
* @param user - The Last.fm username
|
|
9
|
+
* @param period - The time period over which to retrieve the chart
|
|
10
|
+
* @param page - Page number to fetch
|
|
11
|
+
* @param limit - Number of results per page
|
|
12
|
+
* @returns Paginated list of the most popular artists globally
|
|
13
|
+
*/
|
|
3
14
|
export async function chartTopArtists(method, user, period, page, limit) {
|
|
4
15
|
const options = createOptions(method, user, period, page, limit);
|
|
5
16
|
return await request(options);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"topArtists.js","sourceRoot":"","sources":["../../src/chart/topArtists.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACpD,OAAO,OAAO,MAAM,eAAe,CAAC;AAEpC,MAAM,CAAC,KAAK,UAAU,eAAe,CACnC,MAAc,EACd,IAAY,EACZ,MAAc,EACd,IAAY,EACZ,KAAa;IAEb,MAAM,OAAO,GAAG,aAAa,CAAC,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,KAAK,CAAC,CAAC;IACjE,OAAO,MAAM,OAAO,CAAyB,OAAO,CAAC,CAAC;AACxD,CAAC"}
|
|
1
|
+
{"version":3,"file":"topArtists.js","sourceRoot":"","sources":["../../src/chart/topArtists.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACpD,OAAO,OAAO,MAAM,eAAe,CAAC;AAEpC;;;;;;;;;;GAUG;AACH,MAAM,CAAC,KAAK,UAAU,eAAe,CACnC,MAAc,EACd,IAAY,EACZ,MAAc,EACd,IAAY,EACZ,KAAa;IAEb,MAAM,OAAO,GAAG,aAAa,CAAC,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,KAAK,CAAC,CAAC;IACjE,OAAO,MAAM,OAAO,CAAyB,OAAO,CAAC,CAAC;AACxD,CAAC"}
|
package/dist/chart/topTags.js
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
import { createOptions } from '../createOptions.js';
|
|
2
2
|
import request from '../request.js';
|
|
3
|
+
/**
|
|
4
|
+
* Get the top tags chart on Last.fm, ordered by tag popularity.
|
|
5
|
+
*
|
|
6
|
+
* @see https://www.last.fm/api/show/chart.getTopTags
|
|
7
|
+
* @param method - The Last.fm API method string (`method.chart.getTopTags`)
|
|
8
|
+
* @param page - Page number to fetch
|
|
9
|
+
* @returns Paginated list of the most popular tags globally
|
|
10
|
+
*/
|
|
3
11
|
export async function chartTopTags(method, page) {
|
|
4
12
|
const options = createOptions(method, page);
|
|
5
13
|
return await request(options);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"topTags.js","sourceRoot":"","sources":["../../src/chart/topTags.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACpD,OAAO,OAAO,MAAM,eAAe,CAAC;AAEpC,MAAM,CAAC,KAAK,UAAU,YAAY,CAAC,MAAc,EAAE,IAAY;IAC7D,MAAM,OAAO,GAAG,aAAa,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC;IAC5C,OAAO,MAAM,OAAO,CAAuB,OAAO,CAAC,CAAC;AACtD,CAAC"}
|
|
1
|
+
{"version":3,"file":"topTags.js","sourceRoot":"","sources":["../../src/chart/topTags.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACpD,OAAO,OAAO,MAAM,eAAe,CAAC;AAEpC;;;;;;;GAOG;AACH,MAAM,CAAC,KAAK,UAAU,YAAY,CAAC,MAAc,EAAE,IAAY;IAC7D,MAAM,OAAO,GAAG,aAAa,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC;IAC5C,OAAO,MAAM,OAAO,CAAuB,OAAO,CAAC,CAAC;AACtD,CAAC"}
|
package/dist/chart/topTracks.js
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
import { createOptions } from '../createOptions.js';
|
|
2
2
|
import request from '../request.js';
|
|
3
|
+
/**
|
|
4
|
+
* Get the top tracks chart on Last.fm.
|
|
5
|
+
*
|
|
6
|
+
* @see https://www.last.fm/api/show/chart.getTopTracks
|
|
7
|
+
* @param method - The Last.fm API method string (`method.chart.getTopTracks`)
|
|
8
|
+
* @param page - Page number to fetch
|
|
9
|
+
* @returns Paginated list of the most popular tracks globally
|
|
10
|
+
*/
|
|
3
11
|
export async function chartTopTracks(method, page) {
|
|
4
12
|
const options = createOptions(method, page);
|
|
5
13
|
return await request(options);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"topTracks.js","sourceRoot":"","sources":["../../src/chart/topTracks.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACpD,OAAO,OAAO,MAAM,eAAe,CAAC;AAEpC,MAAM,CAAC,KAAK,UAAU,cAAc,CAAC,MAAc,EAAE,IAAY;IAC/D,MAAM,OAAO,GAAG,aAAa,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC;IAC5C,OAAO,MAAM,OAAO,CAAyB,OAAO,CAAC,CAAC;AACxD,CAAC"}
|
|
1
|
+
{"version":3,"file":"topTracks.js","sourceRoot":"","sources":["../../src/chart/topTracks.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACpD,OAAO,OAAO,MAAM,eAAe,CAAC;AAEpC;;;;;;;GAOG;AACH,MAAM,CAAC,KAAK,UAAU,cAAc,CAAC,MAAc,EAAE,IAAY;IAC/D,MAAM,OAAO,GAAG,aAAa,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC;IAC5C,OAAO,MAAM,OAAO,CAAyB,OAAO,CAAC,CAAC;AACxD,CAAC"}
|
|
@@ -3,6 +3,17 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.albumAddTags = albumAddTags;
|
|
4
4
|
const request_js_1 = require("../request.js");
|
|
5
5
|
const config_js_1 = require("../config.js");
|
|
6
|
+
/**
|
|
7
|
+
* Tag an album using a list of user-supplied tags. Requires authentication.
|
|
8
|
+
*
|
|
9
|
+
* @see https://www.last.fm/api/show/album.addTags
|
|
10
|
+
* @param method - The Last.fm API method string (`method.album.addTags`)
|
|
11
|
+
* @param artist - The artist name
|
|
12
|
+
* @param album - The album name
|
|
13
|
+
* @param tags - A comma-separated list of tags to apply (max 10)
|
|
14
|
+
* @param sk - A session key obtained via the auth flow
|
|
15
|
+
* @returns Authentication response confirming the operation
|
|
16
|
+
*/
|
|
6
17
|
async function albumAddTags(method, artist, album, tags, sk) {
|
|
7
18
|
return await (0, request_js_1.signedRequest)({ method, artist, album, tags, sk }, config_js_1.config.share_secret);
|
|
8
19
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"addTags.js","sourceRoot":"","sources":["../../../src/album/addTags.ts"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"addTags.js","sourceRoot":"","sources":["../../../src/album/addTags.ts"],"names":[],"mappings":";;AAeA,oCAEC;AAhBD,8CAA8C;AAC9C,4CAAsC;AAEtC;;;;;;;;;;GAUG;AACI,KAAK,UAAU,YAAY,CAAC,MAAc,EAAE,MAAc,EAAE,KAAa,EAAE,IAAY,EAAE,EAAU;IACxG,OAAO,MAAM,IAAA,0BAAa,EAAe,EAAE,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,IAAI,EAAE,EAAE,EAAE,EAAE,kBAAM,CAAC,YAAY,CAAC,CAAC;AACrG,CAAC"}
|
|
@@ -5,6 +5,17 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.albumGetInfo = albumGetInfo;
|
|
7
7
|
const request_js_1 = __importDefault(require("../request.js"));
|
|
8
|
+
/**
|
|
9
|
+
* Get the metadata and tracklist for an album on Last.fm.
|
|
10
|
+
*
|
|
11
|
+
* @see https://www.last.fm/api/show/album.getInfo
|
|
12
|
+
* @param method - The Last.fm API method string (`method.album.getInfo`)
|
|
13
|
+
* @param artist - The artist name
|
|
14
|
+
* @param album - The album name
|
|
15
|
+
* @param autocorrect - Set to `'1'` to auto-correct misspelled names (default `'1'`)
|
|
16
|
+
* @param lang - ISO 639 alpha-2 language code for the biography text (default `'en'`)
|
|
17
|
+
* @returns Album metadata including tracklist, wiki, and tags
|
|
18
|
+
*/
|
|
8
19
|
async function albumGetInfo(method, artist, album, autocorrect = '1', lang = 'en') {
|
|
9
20
|
return await (0, request_js_1.default)({ method, artist, album, autocorrect, lang });
|
|
10
21
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getInfo.js","sourceRoot":"","sources":["../../../src/album/getInfo.ts"],"names":[],"mappings":";;;;;
|
|
1
|
+
{"version":3,"file":"getInfo.js","sourceRoot":"","sources":["../../../src/album/getInfo.ts"],"names":[],"mappings":";;;;;AAcA,oCAEC;AAfD,+DAAoC;AAEpC;;;;;;;;;;GAUG;AACI,KAAK,UAAU,YAAY,CAAC,MAAc,EAAE,MAAc,EAAE,KAAa,EAAE,WAAW,GAAG,GAAG,EAAE,IAAI,GAAG,IAAI;IAC9G,OAAO,MAAM,IAAA,oBAAO,EAAoB,EAAE,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,WAAW,EAAE,IAAI,EAAE,CAAC,CAAC;AACxF,CAAC"}
|
|
@@ -5,6 +5,17 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.albumGetTags = albumGetTags;
|
|
7
7
|
const request_js_1 = __importDefault(require("../request.js"));
|
|
8
|
+
/**
|
|
9
|
+
* Get the tags applied by an individual user to an album on Last.fm.
|
|
10
|
+
*
|
|
11
|
+
* @see https://www.last.fm/api/show/album.getTags
|
|
12
|
+
* @param method - The Last.fm API method string (`method.album.getTags`)
|
|
13
|
+
* @param artist - The artist name
|
|
14
|
+
* @param album - The album name
|
|
15
|
+
* @param user - The Last.fm username whose tags to retrieve
|
|
16
|
+
* @param autocorrect - Set to `'1'` to auto-correct misspelled names (default `'1'`)
|
|
17
|
+
* @returns Tags applied by the user to this album
|
|
18
|
+
*/
|
|
8
19
|
async function albumGetTags(method, artist, album, user, autocorrect = '1') {
|
|
9
20
|
return await (0, request_js_1.default)({ method, artist, album, user, autocorrect });
|
|
10
21
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getTags.js","sourceRoot":"","sources":["../../../src/album/getTags.ts"],"names":[],"mappings":";;;;;
|
|
1
|
+
{"version":3,"file":"getTags.js","sourceRoot":"","sources":["../../../src/album/getTags.ts"],"names":[],"mappings":";;;;;AAcA,oCAEC;AAfD,+DAAoC;AAEpC;;;;;;;;;;GAUG;AACI,KAAK,UAAU,YAAY,CAAC,MAAc,EAAE,MAAc,EAAE,KAAa,EAAE,IAAY,EAAE,WAAW,GAAG,GAAG;IAC/G,OAAO,MAAM,IAAA,oBAAO,EAAoB,EAAE,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,IAAI,EAAE,WAAW,EAAE,CAAC,CAAC;AACxF,CAAC"}
|
|
@@ -5,6 +5,16 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.albumGetTopTags = albumGetTopTags;
|
|
7
7
|
const request_js_1 = __importDefault(require("../request.js"));
|
|
8
|
+
/**
|
|
9
|
+
* Get the top tags applied to an album on Last.fm, ordered by tag count.
|
|
10
|
+
*
|
|
11
|
+
* @see https://www.last.fm/api/show/album.getTopTags
|
|
12
|
+
* @param method - The Last.fm API method string (`method.album.getTopTags`)
|
|
13
|
+
* @param artist - The artist name
|
|
14
|
+
* @param album - The album name
|
|
15
|
+
* @param autocorrect - Set to `'1'` to auto-correct misspelled names (default `'1'`)
|
|
16
|
+
* @returns Top tags for the album ordered by tag count
|
|
17
|
+
*/
|
|
8
18
|
async function albumGetTopTags(method, artist, album, autocorrect = '1') {
|
|
9
19
|
return await (0, request_js_1.default)({ method, artist, album, autocorrect });
|
|
10
20
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getTopTags.js","sourceRoot":"","sources":["../../../src/album/getTopTags.ts"],"names":[],"mappings":";;;;;
|
|
1
|
+
{"version":3,"file":"getTopTags.js","sourceRoot":"","sources":["../../../src/album/getTopTags.ts"],"names":[],"mappings":";;;;;AAaA,0CAEC;AAdD,+DAAoC;AAEpC;;;;;;;;;GASG;AACI,KAAK,UAAU,eAAe,CAAC,MAAc,EAAE,MAAc,EAAE,KAAa,EAAE,WAAW,GAAG,GAAG;IACpG,OAAO,MAAM,IAAA,oBAAO,EAAuB,EAAE,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,WAAW,EAAE,CAAC,CAAC;AACrF,CAAC"}
|
|
@@ -3,6 +3,17 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.albumRemoveTag = albumRemoveTag;
|
|
4
4
|
const request_js_1 = require("../request.js");
|
|
5
5
|
const config_js_1 = require("../config.js");
|
|
6
|
+
/**
|
|
7
|
+
* Remove a user-applied tag from an album. Requires authentication.
|
|
8
|
+
*
|
|
9
|
+
* @see https://www.last.fm/api/show/album.removeTag
|
|
10
|
+
* @param method - The Last.fm API method string (`method.album.removeTag`)
|
|
11
|
+
* @param artist - The artist name
|
|
12
|
+
* @param album - The album name
|
|
13
|
+
* @param tag - A single tag to remove from the album
|
|
14
|
+
* @param sk - A session key obtained via the auth flow
|
|
15
|
+
* @returns Authentication response confirming the operation
|
|
16
|
+
*/
|
|
6
17
|
async function albumRemoveTag(method, artist, album, tag, sk) {
|
|
7
18
|
return await (0, request_js_1.signedRequest)({ method, artist, album, tag, sk }, config_js_1.config.share_secret);
|
|
8
19
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"removeTag.js","sourceRoot":"","sources":["../../../src/album/removeTag.ts"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"removeTag.js","sourceRoot":"","sources":["../../../src/album/removeTag.ts"],"names":[],"mappings":";;AAeA,wCAEC;AAhBD,8CAA8C;AAC9C,4CAAsC;AAEtC;;;;;;;;;;GAUG;AACI,KAAK,UAAU,cAAc,CAAC,MAAc,EAAE,MAAc,EAAE,KAAa,EAAE,GAAW,EAAE,EAAU;IACzG,OAAO,MAAM,IAAA,0BAAa,EAAe,EAAE,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,GAAG,EAAE,EAAE,EAAE,EAAE,kBAAM,CAAC,YAAY,CAAC,CAAC;AACpG,CAAC"}
|
package/dist/cjs/album/search.js
CHANGED
|
@@ -5,6 +5,16 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.albumSearch = albumSearch;
|
|
7
7
|
const request_js_1 = __importDefault(require("../request.js"));
|
|
8
|
+
/**
|
|
9
|
+
* Search for an album by name on Last.fm. Returns paginated results.
|
|
10
|
+
*
|
|
11
|
+
* @see https://www.last.fm/api/show/album.search
|
|
12
|
+
* @param method - The Last.fm API method string (`method.album.search`)
|
|
13
|
+
* @param album - The album name to search for
|
|
14
|
+
* @param limit - Number of results per page (default `'30'`)
|
|
15
|
+
* @param page - Page number to fetch (default `'1'`)
|
|
16
|
+
* @returns Paginated album search results
|
|
17
|
+
*/
|
|
8
18
|
async function albumSearch(method, album, limit = '30', page = '1') {
|
|
9
19
|
return await (0, request_js_1.default)({ method, album, limit, page });
|
|
10
20
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"search.js","sourceRoot":"","sources":["../../../src/album/search.ts"],"names":[],"mappings":";;;;;
|
|
1
|
+
{"version":3,"file":"search.js","sourceRoot":"","sources":["../../../src/album/search.ts"],"names":[],"mappings":";;;;;AAaA,kCAEC;AAdD,+DAAoC;AAEpC;;;;;;;;;GASG;AACI,KAAK,UAAU,WAAW,CAAC,MAAc,EAAE,KAAa,EAAE,KAAK,GAAG,IAAI,EAAE,IAAI,GAAG,GAAG;IACvF,OAAO,MAAM,IAAA,oBAAO,EAAsB,EAAE,MAAM,EAAE,KAAK,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC;AAC5E,CAAC"}
|
|
@@ -3,6 +3,16 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.artistAddTags = artistAddTags;
|
|
4
4
|
const request_js_1 = require("../request.js");
|
|
5
5
|
const config_js_1 = require("../config.js");
|
|
6
|
+
/**
|
|
7
|
+
* Tag an artist using a list of user-supplied tags. Requires authentication.
|
|
8
|
+
*
|
|
9
|
+
* @see https://www.last.fm/api/show/artist.addTags
|
|
10
|
+
* @param method - The Last.fm API method string (`method.artist.addTags`)
|
|
11
|
+
* @param artist - The artist name
|
|
12
|
+
* @param tags - A comma-separated list of tags to apply (max 10)
|
|
13
|
+
* @param sk - A session key obtained via the auth flow
|
|
14
|
+
* @returns Authentication response confirming the operation
|
|
15
|
+
*/
|
|
6
16
|
async function artistAddTags(method, artist, tags, sk) {
|
|
7
17
|
return await (0, request_js_1.signedRequest)({ method, artist, tags, sk }, config_js_1.config.share_secret);
|
|
8
18
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"addTags.js","sourceRoot":"","sources":["../../../src/artist/addTags.ts"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"addTags.js","sourceRoot":"","sources":["../../../src/artist/addTags.ts"],"names":[],"mappings":";;AAcA,sCAEC;AAfD,8CAA8C;AAC9C,4CAAsC;AAEtC;;;;;;;;;GASG;AACI,KAAK,UAAU,aAAa,CAAC,MAAc,EAAE,MAAc,EAAE,IAAY,EAAE,EAAU;IAC1F,OAAO,MAAM,IAAA,0BAAa,EAAe,EAAE,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,EAAE,EAAE,EAAE,kBAAM,CAAC,YAAY,CAAC,CAAC;AAC9F,CAAC"}
|
|
@@ -5,6 +5,15 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.artistGetCorrection = artistGetCorrection;
|
|
7
7
|
const request_js_1 = __importDefault(require("../request.js"));
|
|
8
|
+
/**
|
|
9
|
+
* Use the Last.fm corrections data to check whether the supplied artist has a correction
|
|
10
|
+
* to a canonical artist name.
|
|
11
|
+
*
|
|
12
|
+
* @see https://www.last.fm/api/show/artist.getCorrection
|
|
13
|
+
* @param method - The Last.fm API method string (`method.artist.getCorrection`)
|
|
14
|
+
* @param artist - The artist name to check for a correction
|
|
15
|
+
* @returns The corrected canonical artist name if one exists
|
|
16
|
+
*/
|
|
8
17
|
async function artistGetCorrection(method, artist) {
|
|
9
18
|
return await (0, request_js_1.default)({ method, artist });
|
|
10
19
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getCorrection.js","sourceRoot":"","sources":["../../../src/artist/getCorrection.ts"],"names":[],"mappings":";;;;;
|
|
1
|
+
{"version":3,"file":"getCorrection.js","sourceRoot":"","sources":["../../../src/artist/getCorrection.ts"],"names":[],"mappings":";;;;;AAYA,kDAEC;AAbD,+DAAoC;AAEpC;;;;;;;;GAQG;AACI,KAAK,UAAU,mBAAmB,CAAC,MAAc,EAAE,MAAc;IACtE,OAAO,MAAM,IAAA,oBAAO,EAA2B,EAAE,MAAM,EAAE,MAAM,EAAE,CAAC,CAAC;AACrE,CAAC"}
|
|
@@ -5,6 +5,16 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.artistGetInfo = artistGetInfo;
|
|
7
7
|
const request_js_1 = __importDefault(require("../request.js"));
|
|
8
|
+
/**
|
|
9
|
+
* Get the metadata for an artist on Last.fm. Includes biography, tags, and similar artists.
|
|
10
|
+
*
|
|
11
|
+
* @see https://www.last.fm/api/show/artist.getInfo
|
|
12
|
+
* @param method - The Last.fm API method string (`method.artist.getInfo`)
|
|
13
|
+
* @param artist - The artist name
|
|
14
|
+
* @param autocorrect - Set to `'1'` to auto-correct misspelled names (default `'1'`)
|
|
15
|
+
* @param lang - ISO 639 alpha-2 language code for the biography text (default `'en'`)
|
|
16
|
+
* @returns Artist metadata including biography, similar artists, and top tags
|
|
17
|
+
*/
|
|
8
18
|
async function artistGetInfo(method, artist, autocorrect = '1', lang = 'en') {
|
|
9
19
|
return await (0, request_js_1.default)({ method, artist, autocorrect, lang });
|
|
10
20
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getInfo.js","sourceRoot":"","sources":["../../../src/artist/getInfo.ts"],"names":[],"mappings":";;;;;
|
|
1
|
+
{"version":3,"file":"getInfo.js","sourceRoot":"","sources":["../../../src/artist/getInfo.ts"],"names":[],"mappings":";;;;;AAaA,sCAEC;AAdD,+DAAoC;AAEpC;;;;;;;;;GASG;AACI,KAAK,UAAU,aAAa,CAAC,MAAc,EAAE,MAAc,EAAE,WAAW,GAAG,GAAG,EAAE,IAAI,GAAG,IAAI;IAChG,OAAO,MAAM,IAAA,oBAAO,EAAqB,EAAE,MAAM,EAAE,MAAM,EAAE,WAAW,EAAE,IAAI,EAAE,CAAC,CAAC;AAClF,CAAC"}
|
|
@@ -5,6 +5,16 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.artistGetSimilar = artistGetSimilar;
|
|
7
7
|
const request_js_1 = __importDefault(require("../request.js"));
|
|
8
|
+
/**
|
|
9
|
+
* Get all the artists similar to this artist.
|
|
10
|
+
*
|
|
11
|
+
* @see https://www.last.fm/api/show/artist.getSimilar
|
|
12
|
+
* @param method - The Last.fm API method string (`method.artist.getSimilar`)
|
|
13
|
+
* @param artist - The artist name
|
|
14
|
+
* @param limit - Maximum number of similar artists to return (default `'30'`)
|
|
15
|
+
* @param autocorrect - Set to `'1'` to auto-correct misspelled names (default `'1'`)
|
|
16
|
+
* @returns A list of similar artists with match scores
|
|
17
|
+
*/
|
|
8
18
|
async function artistGetSimilar(method, artist, limit = '30', autocorrect = '1') {
|
|
9
19
|
return await (0, request_js_1.default)({ method, artist, limit, autocorrect });
|
|
10
20
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getSimilar.js","sourceRoot":"","sources":["../../../src/artist/getSimilar.ts"],"names":[],"mappings":";;;;;
|
|
1
|
+
{"version":3,"file":"getSimilar.js","sourceRoot":"","sources":["../../../src/artist/getSimilar.ts"],"names":[],"mappings":";;;;;AAaA,4CAEC;AAdD,+DAAoC;AAEpC;;;;;;;;;GASG;AACI,KAAK,UAAU,gBAAgB,CAAC,MAAc,EAAE,MAAc,EAAE,KAAK,GAAG,IAAI,EAAE,WAAW,GAAG,GAAG;IACpG,OAAO,MAAM,IAAA,oBAAO,EAAwB,EAAE,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,WAAW,EAAE,CAAC,CAAC;AACtF,CAAC"}
|
|
@@ -5,6 +5,16 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.artistGetTags = artistGetTags;
|
|
7
7
|
const request_js_1 = __importDefault(require("../request.js"));
|
|
8
|
+
/**
|
|
9
|
+
* Get the tags applied by an individual user to an artist on Last.fm.
|
|
10
|
+
*
|
|
11
|
+
* @see https://www.last.fm/api/show/artist.getTags
|
|
12
|
+
* @param method - The Last.fm API method string (`method.artist.getTags`)
|
|
13
|
+
* @param artist - The artist name
|
|
14
|
+
* @param user - The Last.fm username whose tags to retrieve
|
|
15
|
+
* @param autocorrect - Set to `'1'` to auto-correct misspelled names (default `'1'`)
|
|
16
|
+
* @returns Tags applied by the user to this artist
|
|
17
|
+
*/
|
|
8
18
|
async function artistGetTags(method, artist, user, autocorrect = '1') {
|
|
9
19
|
return await (0, request_js_1.default)({ method, artist, user, autocorrect });
|
|
10
20
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getTags.js","sourceRoot":"","sources":["../../../src/artist/getTags.ts"],"names":[],"mappings":";;;;;
|
|
1
|
+
{"version":3,"file":"getTags.js","sourceRoot":"","sources":["../../../src/artist/getTags.ts"],"names":[],"mappings":";;;;;AAaA,sCAEC;AAdD,+DAAoC;AAEpC;;;;;;;;;GASG;AACI,KAAK,UAAU,aAAa,CAAC,MAAc,EAAE,MAAc,EAAE,IAAY,EAAE,WAAW,GAAG,GAAG;IACjG,OAAO,MAAM,IAAA,oBAAO,EAAqB,EAAE,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,WAAW,EAAE,CAAC,CAAC;AAClF,CAAC"}
|
|
@@ -5,6 +5,17 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.artistGetTopAlbums = artistGetTopAlbums;
|
|
7
7
|
const request_js_1 = __importDefault(require("../request.js"));
|
|
8
|
+
/**
|
|
9
|
+
* Get the top albums for an artist on Last.fm, ordered by popularity.
|
|
10
|
+
*
|
|
11
|
+
* @see https://www.last.fm/api/show/artist.getTopAlbums
|
|
12
|
+
* @param method - The Last.fm API method string (`method.artist.getTopAlbums`)
|
|
13
|
+
* @param artist - The artist name
|
|
14
|
+
* @param limit - Number of results per page (default `'50'`)
|
|
15
|
+
* @param page - Page number to fetch (default `'1'`)
|
|
16
|
+
* @param autocorrect - Set to `'1'` to auto-correct misspelled names (default `'1'`)
|
|
17
|
+
* @returns Paginated list of the artist's top albums
|
|
18
|
+
*/
|
|
8
19
|
async function artistGetTopAlbums(method, artist, limit = '50', page = '1', autocorrect = '1') {
|
|
9
20
|
return await (0, request_js_1.default)({ method, artist, limit, page, autocorrect });
|
|
10
21
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getTopAlbums.js","sourceRoot":"","sources":["../../../src/artist/getTopAlbums.ts"],"names":[],"mappings":";;;;;
|
|
1
|
+
{"version":3,"file":"getTopAlbums.js","sourceRoot":"","sources":["../../../src/artist/getTopAlbums.ts"],"names":[],"mappings":";;;;;AAcA,gDAEC;AAfD,+DAAoC;AAEpC;;;;;;;;;;GAUG;AACI,KAAK,UAAU,kBAAkB,CAAC,MAAc,EAAE,MAAc,EAAE,KAAK,GAAG,IAAI,EAAE,IAAI,GAAG,GAAG,EAAE,WAAW,GAAG,GAAG;IAClH,OAAO,MAAM,IAAA,oBAAO,EAA0B,EAAE,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,IAAI,EAAE,WAAW,EAAE,CAAC,CAAC;AAC9F,CAAC"}
|
|
@@ -5,6 +5,15 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.artistGetTopTags = artistGetTopTags;
|
|
7
7
|
const request_js_1 = __importDefault(require("../request.js"));
|
|
8
|
+
/**
|
|
9
|
+
* Get the top tags for an artist on Last.fm, ordered by popularity.
|
|
10
|
+
*
|
|
11
|
+
* @see https://www.last.fm/api/show/artist.getTopTags
|
|
12
|
+
* @param method - The Last.fm API method string (`method.artist.getTopTags`)
|
|
13
|
+
* @param artist - The artist name
|
|
14
|
+
* @param autocorrect - Set to `'1'` to auto-correct misspelled names (default `'1'`)
|
|
15
|
+
* @returns Top tags for the artist ordered by tag count
|
|
16
|
+
*/
|
|
8
17
|
async function artistGetTopTags(method, artist, autocorrect = '1') {
|
|
9
18
|
return await (0, request_js_1.default)({ method, artist, autocorrect });
|
|
10
19
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getTopTags.js","sourceRoot":"","sources":["../../../src/artist/getTopTags.ts"],"names":[],"mappings":";;;;;
|
|
1
|
+
{"version":3,"file":"getTopTags.js","sourceRoot":"","sources":["../../../src/artist/getTopTags.ts"],"names":[],"mappings":";;;;;AAYA,4CAEC;AAbD,+DAAoC;AAEpC;;;;;;;;GAQG;AACI,KAAK,UAAU,gBAAgB,CAAC,MAAc,EAAE,MAAc,EAAE,WAAW,GAAG,GAAG;IACtF,OAAO,MAAM,IAAA,oBAAO,EAAwB,EAAE,MAAM,EAAE,MAAM,EAAE,WAAW,EAAE,CAAC,CAAC;AAC/E,CAAC"}
|
|
@@ -5,6 +5,17 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.artistGetTopTracks = artistGetTopTracks;
|
|
7
7
|
const request_js_1 = __importDefault(require("../request.js"));
|
|
8
|
+
/**
|
|
9
|
+
* Get the top tracks for an artist on Last.fm, ordered by popularity.
|
|
10
|
+
*
|
|
11
|
+
* @see https://www.last.fm/api/show/artist.getTopTracks
|
|
12
|
+
* @param method - The Last.fm API method string (`method.artist.getTopTracks`)
|
|
13
|
+
* @param artist - The artist name
|
|
14
|
+
* @param limit - Number of results per page (default `'50'`)
|
|
15
|
+
* @param page - Page number to fetch (default `'1'`)
|
|
16
|
+
* @param autocorrect - Set to `'1'` to auto-correct misspelled names (default `'1'`)
|
|
17
|
+
* @returns Paginated list of the artist's top tracks
|
|
18
|
+
*/
|
|
8
19
|
async function artistGetTopTracks(method, artist, limit = '50', page = '1', autocorrect = '1') {
|
|
9
20
|
return await (0, request_js_1.default)({ method, artist, limit, page, autocorrect });
|
|
10
21
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getTopTracks.js","sourceRoot":"","sources":["../../../src/artist/getTopTracks.ts"],"names":[],"mappings":";;;;;
|
|
1
|
+
{"version":3,"file":"getTopTracks.js","sourceRoot":"","sources":["../../../src/artist/getTopTracks.ts"],"names":[],"mappings":";;;;;AAcA,gDAEC;AAfD,+DAAoC;AAEpC;;;;;;;;;;GAUG;AACI,KAAK,UAAU,kBAAkB,CAAC,MAAc,EAAE,MAAc,EAAE,KAAK,GAAG,IAAI,EAAE,IAAI,GAAG,GAAG,EAAE,WAAW,GAAG,GAAG;IAClH,OAAO,MAAM,IAAA,oBAAO,EAA0B,EAAE,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,IAAI,EAAE,WAAW,EAAE,CAAC,CAAC;AAC9F,CAAC"}
|
|
@@ -3,6 +3,16 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.artistRemoveTag = artistRemoveTag;
|
|
4
4
|
const request_js_1 = require("../request.js");
|
|
5
5
|
const config_js_1 = require("../config.js");
|
|
6
|
+
/**
|
|
7
|
+
* Remove a user-applied tag from an artist. Requires authentication.
|
|
8
|
+
*
|
|
9
|
+
* @see https://www.last.fm/api/show/artist.removeTag
|
|
10
|
+
* @param method - The Last.fm API method string (`method.artist.removeTag`)
|
|
11
|
+
* @param artist - The artist name
|
|
12
|
+
* @param tag - A single tag to remove from the artist
|
|
13
|
+
* @param sk - A session key obtained via the auth flow
|
|
14
|
+
* @returns Authentication response confirming the operation
|
|
15
|
+
*/
|
|
6
16
|
async function artistRemoveTag(method, artist, tag, sk) {
|
|
7
17
|
return await (0, request_js_1.signedRequest)({ method, artist, tag, sk }, config_js_1.config.share_secret);
|
|
8
18
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"removeTag.js","sourceRoot":"","sources":["../../../src/artist/removeTag.ts"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"removeTag.js","sourceRoot":"","sources":["../../../src/artist/removeTag.ts"],"names":[],"mappings":";;AAcA,0CAEC;AAfD,8CAA8C;AAC9C,4CAAsC;AAEtC;;;;;;;;;GASG;AACI,KAAK,UAAU,eAAe,CAAC,MAAc,EAAE,MAAc,EAAE,GAAW,EAAE,EAAU;IAC3F,OAAO,MAAM,IAAA,0BAAa,EAAe,EAAE,MAAM,EAAE,MAAM,EAAE,GAAG,EAAE,EAAE,EAAE,EAAE,kBAAM,CAAC,YAAY,CAAC,CAAC;AAC7F,CAAC"}
|
|
@@ -5,6 +5,16 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.artistSearch = artistSearch;
|
|
7
7
|
const request_js_1 = __importDefault(require("../request.js"));
|
|
8
|
+
/**
|
|
9
|
+
* Search for an artist by name on Last.fm. Returns paginated results.
|
|
10
|
+
*
|
|
11
|
+
* @see https://www.last.fm/api/show/artist.search
|
|
12
|
+
* @param method - The Last.fm API method string (`method.artist.search`)
|
|
13
|
+
* @param artist - The artist name to search for
|
|
14
|
+
* @param limit - Number of results per page (default `'30'`)
|
|
15
|
+
* @param page - Page number to fetch (default `'1'`)
|
|
16
|
+
* @returns Paginated artist search results
|
|
17
|
+
*/
|
|
8
18
|
async function artistSearch(method, artist, limit = '30', page = '1') {
|
|
9
19
|
return await (0, request_js_1.default)({ method, artist, limit, page });
|
|
10
20
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"search.js","sourceRoot":"","sources":["../../../src/artist/search.ts"],"names":[],"mappings":";;;;;
|
|
1
|
+
{"version":3,"file":"search.js","sourceRoot":"","sources":["../../../src/artist/search.ts"],"names":[],"mappings":";;;;;AAaA,oCAEC;AAdD,+DAAoC;AAEpC;;;;;;;;;GASG;AACI,KAAK,UAAU,YAAY,CAAC,MAAc,EAAE,MAAc,EAAE,KAAK,GAAG,IAAI,EAAE,IAAI,GAAG,GAAG;IACzF,OAAO,MAAM,IAAA,oBAAO,EAAuB,EAAE,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC;AAC9E,CAAC"}
|
|
@@ -3,6 +3,17 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.authGetMobileSession = authGetMobileSession;
|
|
4
4
|
const request_js_1 = require("../request.js");
|
|
5
5
|
const config_js_1 = require("../config.js");
|
|
6
|
+
/**
|
|
7
|
+
* Create a session for a user using their username and password (mobile auth flow).
|
|
8
|
+
*
|
|
9
|
+
* The returned session key can be used for authenticated write operations.
|
|
10
|
+
*
|
|
11
|
+
* @see https://www.last.fm/api/show/auth.getMobileSession
|
|
12
|
+
* @param method - The Last.fm API method string (`method.auth.getMobileSession`)
|
|
13
|
+
* @param username - The Last.fm username
|
|
14
|
+
* @param password - The user's plaintext password
|
|
15
|
+
* @returns A session key valid for write operations
|
|
16
|
+
*/
|
|
6
17
|
async function authGetMobileSession(method, username, password) {
|
|
7
18
|
return await (0, request_js_1.signedRequest)({ method, username, password }, config_js_1.config.share_secret);
|
|
8
19
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getMobileSession.js","sourceRoot":"","sources":["../../../src/auth/getMobileSession.ts"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"getMobileSession.js","sourceRoot":"","sources":["../../../src/auth/getMobileSession.ts"],"names":[],"mappings":";;AAeA,oDAEC;AAhBD,8CAA8C;AAC9C,4CAAsC;AAEtC;;;;;;;;;;GAUG;AACI,KAAK,UAAU,oBAAoB,CAAC,MAAc,EAAE,QAAgB,EAAE,QAAgB;IAC3F,OAAO,MAAM,IAAA,0BAAa,EAA4B,EAAE,MAAM,EAAE,QAAQ,EAAE,QAAQ,EAAE,EAAE,kBAAM,CAAC,YAAY,CAAC,CAAC;AAC7G,CAAC"}
|
|
@@ -3,6 +3,16 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.authGetSession = authGetSession;
|
|
4
4
|
const request_js_1 = require("../request.js");
|
|
5
5
|
const config_js_1 = require("../config.js");
|
|
6
|
+
/**
|
|
7
|
+
* Fetch a session key for a user after they have authorised a token via the Last.fm web auth flow.
|
|
8
|
+
*
|
|
9
|
+
* Tokens are valid for 60 minutes and can only be used once.
|
|
10
|
+
*
|
|
11
|
+
* @see https://www.last.fm/api/show/auth.getSession
|
|
12
|
+
* @param method - The Last.fm API method string (`method.auth.getSession`)
|
|
13
|
+
* @param token - The token previously granted by `auth.getToken` and authorised by the user
|
|
14
|
+
* @returns A session key valid for write operations
|
|
15
|
+
*/
|
|
6
16
|
async function authGetSession(method, token) {
|
|
7
17
|
return await (0, request_js_1.signedRequest)({ method, token }, config_js_1.config.share_secret);
|
|
8
18
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getSession.js","sourceRoot":"","sources":["../../../src/auth/getSession.ts"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"getSession.js","sourceRoot":"","sources":["../../../src/auth/getSession.ts"],"names":[],"mappings":";;AAcA,wCAEC;AAfD,8CAA8C;AAC9C,4CAAsC;AAEtC;;;;;;;;;GASG;AACI,KAAK,UAAU,cAAc,CAAC,MAAc,EAAE,KAAa;IAChE,OAAO,MAAM,IAAA,0BAAa,EAAsB,EAAE,MAAM,EAAE,KAAK,EAAE,EAAE,kBAAM,CAAC,YAAY,CAAC,CAAC;AAC1F,CAAC"}
|
package/dist/cjs/auth.js
CHANGED
|
@@ -7,14 +7,17 @@ exports.auth = auth;
|
|
|
7
7
|
const createOptions_js_1 = require("./createOptions.js");
|
|
8
8
|
const request_js_1 = __importDefault(require("./request.js"));
|
|
9
9
|
/**
|
|
10
|
-
*
|
|
10
|
+
* Fetch an unauthenticated token for the web auth flow.
|
|
11
11
|
*
|
|
12
|
-
*
|
|
12
|
+
* Tokens are API-account-specific, valid for 60 minutes, and consumed
|
|
13
|
+
* once a session is created via `auth.getSession`.
|
|
13
14
|
*
|
|
14
|
-
*
|
|
15
|
-
*
|
|
16
|
-
*
|
|
17
|
-
* @
|
|
15
|
+
* @see https://www.last.fm/api/show/auth.getToken
|
|
16
|
+
* @param method - The Last.fm API method string (`method.auth.getToken`)
|
|
17
|
+
* @param user - The Last.fm username
|
|
18
|
+
* @param period - The time period parameter
|
|
19
|
+
* @param limit - The limit parameter
|
|
20
|
+
* @returns An unauthenticated token to redirect the user to the Last.fm auth page
|
|
18
21
|
*/
|
|
19
22
|
async function auth(method, user, period, limit) {
|
|
20
23
|
const options = (0, createOptions_js_1.createOptions)(method, user, period, limit);
|
package/dist/cjs/auth.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"auth.js","sourceRoot":"","sources":["../../src/auth.ts"],"names":[],"mappings":";;;;;
|
|
1
|
+
{"version":3,"file":"auth.js","sourceRoot":"","sources":["../../src/auth.ts"],"names":[],"mappings":";;;;;AAiBA,oBAQC;AAxBD,yDAAmD;AACnD,8DAAmC;AAEnC;;;;;;;;;;;;GAYG;AACI,KAAK,UAAU,IAAI,CACxB,MAAc,EACd,IAAY,EACZ,MAAc,EACd,KAAa;IAEb,MAAM,OAAO,GAAG,IAAA,gCAAa,EAAC,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,KAAK,CAAC,CAAC;IAC3D,OAAO,MAAM,IAAA,oBAAO,EAAe,OAAO,CAAC,CAAC;AAC9C,CAAC"}
|
|
@@ -6,6 +6,17 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
6
6
|
exports.chartTopArtists = chartTopArtists;
|
|
7
7
|
const createOptions_js_1 = require("../createOptions.js");
|
|
8
8
|
const request_js_1 = __importDefault(require("../request.js"));
|
|
9
|
+
/**
|
|
10
|
+
* Get the top artists chart on Last.fm.
|
|
11
|
+
*
|
|
12
|
+
* @see https://www.last.fm/api/show/chart.getTopArtists
|
|
13
|
+
* @param method - The Last.fm API method string (`method.chart.getTopArtists`)
|
|
14
|
+
* @param user - The Last.fm username
|
|
15
|
+
* @param period - The time period over which to retrieve the chart
|
|
16
|
+
* @param page - Page number to fetch
|
|
17
|
+
* @param limit - Number of results per page
|
|
18
|
+
* @returns Paginated list of the most popular artists globally
|
|
19
|
+
*/
|
|
9
20
|
async function chartTopArtists(method, user, period, page, limit) {
|
|
10
21
|
const options = (0, createOptions_js_1.createOptions)(method, user, period, page, limit);
|
|
11
22
|
return await (0, request_js_1.default)(options);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"topArtists.js","sourceRoot":"","sources":["../../../src/chart/topArtists.ts"],"names":[],"mappings":";;;;;
|
|
1
|
+
{"version":3,"file":"topArtists.js","sourceRoot":"","sources":["../../../src/chart/topArtists.ts"],"names":[],"mappings":";;;;;AAeA,0CASC;AAvBD,0DAAoD;AACpD,+DAAoC;AAEpC;;;;;;;;;;GAUG;AACI,KAAK,UAAU,eAAe,CACnC,MAAc,EACd,IAAY,EACZ,MAAc,EACd,IAAY,EACZ,KAAa;IAEb,MAAM,OAAO,GAAG,IAAA,gCAAa,EAAC,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,KAAK,CAAC,CAAC;IACjE,OAAO,MAAM,IAAA,oBAAO,EAAyB,OAAO,CAAC,CAAC;AACxD,CAAC"}
|
|
@@ -6,6 +6,14 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
6
6
|
exports.chartTopTags = chartTopTags;
|
|
7
7
|
const createOptions_js_1 = require("../createOptions.js");
|
|
8
8
|
const request_js_1 = __importDefault(require("../request.js"));
|
|
9
|
+
/**
|
|
10
|
+
* Get the top tags chart on Last.fm, ordered by tag popularity.
|
|
11
|
+
*
|
|
12
|
+
* @see https://www.last.fm/api/show/chart.getTopTags
|
|
13
|
+
* @param method - The Last.fm API method string (`method.chart.getTopTags`)
|
|
14
|
+
* @param page - Page number to fetch
|
|
15
|
+
* @returns Paginated list of the most popular tags globally
|
|
16
|
+
*/
|
|
9
17
|
async function chartTopTags(method, page) {
|
|
10
18
|
const options = (0, createOptions_js_1.createOptions)(method, page);
|
|
11
19
|
return await (0, request_js_1.default)(options);
|