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,2 +1,11 @@
|
|
|
1
1
|
import type { TagWeeklyChartListResponse } from '../lastfm.types.js';
|
|
2
|
+
/**
|
|
3
|
+
* Get a list of available charts for this tag, expressed as date ranges which can be
|
|
4
|
+
* sent to the chart services.
|
|
5
|
+
*
|
|
6
|
+
* @see https://www.last.fm/api/show/tag.getWeeklyChartList
|
|
7
|
+
* @param method - The Last.fm API method string (`method.tag.getWeeklyChartList`)
|
|
8
|
+
* @param tag - The tag name
|
|
9
|
+
* @returns A list of date ranges representing available weekly charts for this tag
|
|
10
|
+
*/
|
|
2
11
|
export declare function tagGetWeeklyChartList(method: string, tag: string): Promise<TagWeeklyChartListResponse>;
|
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
import type { TagTopTracksResponse } from '../lastfm.types.js';
|
|
2
2
|
/**
|
|
3
|
-
*
|
|
3
|
+
* Get the top tracks tagged with a given tag on Last.fm, ordered by tag count.
|
|
4
4
|
*
|
|
5
|
-
* https://www.last.fm/api/show/tag.getTopTracks
|
|
6
|
-
* @
|
|
5
|
+
* @see https://www.last.fm/api/show/tag.getTopTracks
|
|
6
|
+
* @param method - The Last.fm API method string (`method.tag.getTopTracks`)
|
|
7
|
+
* @param tag - The tag name
|
|
8
|
+
* @param limit - Number of results to return
|
|
9
|
+
* @returns Top tracks for the given tag ordered by tag count
|
|
7
10
|
*/
|
|
8
11
|
export declare function tagTopTracks(method: string, tag: string, limit: string): Promise<TagTopTracksResponse>;
|
|
@@ -1,2 +1,13 @@
|
|
|
1
1
|
import type { AuthResponse } from '../lastfm.types.js';
|
|
2
|
+
/**
|
|
3
|
+
* Tag a track using a list of user-supplied tags. Requires authentication.
|
|
4
|
+
*
|
|
5
|
+
* @see https://www.last.fm/api/show/track.addTags
|
|
6
|
+
* @param method - The Last.fm API method string (`method.track.addTags`)
|
|
7
|
+
* @param artist - The artist name
|
|
8
|
+
* @param track - The track name
|
|
9
|
+
* @param tags - A comma-separated list of tags to apply (max 10)
|
|
10
|
+
* @param sk - A session key obtained via the auth flow
|
|
11
|
+
* @returns Authentication response confirming the operation
|
|
12
|
+
*/
|
|
2
13
|
export declare function trackAddTags(method: string, artist: string, track: string, tags: string, sk: string): Promise<AuthResponse>;
|
|
@@ -1,2 +1,12 @@
|
|
|
1
1
|
import type { TrackCorrectionResponse } from '../lastfm.types.js';
|
|
2
|
+
/**
|
|
3
|
+
* Use the Last.fm corrections data to check whether the supplied track has a correction
|
|
4
|
+
* to a canonical track and artist name.
|
|
5
|
+
*
|
|
6
|
+
* @see https://www.last.fm/api/show/track.getCorrection
|
|
7
|
+
* @param method - The Last.fm API method string (`method.track.getCorrection`)
|
|
8
|
+
* @param artist - The artist name
|
|
9
|
+
* @param track - The track name to check for a correction
|
|
10
|
+
* @returns The corrected canonical track and artist name if one exists
|
|
11
|
+
*/
|
|
2
12
|
export declare function trackGetCorrection(method: string, artist: string, track: string): Promise<TrackCorrectionResponse>;
|
|
@@ -1,2 +1,13 @@
|
|
|
1
1
|
import type { TrackInfoResponse } from '../lastfm.types.js';
|
|
2
|
+
/**
|
|
3
|
+
* Get the metadata for a track on Last.fm. Includes wiki text, tags, and similar tracks.
|
|
4
|
+
*
|
|
5
|
+
* @see https://www.last.fm/api/show/track.getInfo
|
|
6
|
+
* @param method - The Last.fm API method string (`method.track.getInfo`)
|
|
7
|
+
* @param artist - The artist name
|
|
8
|
+
* @param track - The track name
|
|
9
|
+
* @param autocorrect - Set to `'1'` to auto-correct misspelled names (default `'1'`)
|
|
10
|
+
* @param lang - ISO 639 alpha-2 language code for the wiki text (default `'en'`)
|
|
11
|
+
* @returns Track metadata including duration, play count, wiki, and top tags
|
|
12
|
+
*/
|
|
2
13
|
export declare function trackGetInfo(method: string, artist: string, track: string, autocorrect?: string, lang?: string): Promise<TrackInfoResponse>;
|
|
@@ -1,2 +1,13 @@
|
|
|
1
1
|
import type { TrackSimilarResponse } from '../lastfm.types.js';
|
|
2
|
+
/**
|
|
3
|
+
* Get the similar tracks for this track on Last.fm, based on listening data.
|
|
4
|
+
*
|
|
5
|
+
* @see https://www.last.fm/api/show/track.getSimilar
|
|
6
|
+
* @param method - The Last.fm API method string (`method.track.getSimilar`)
|
|
7
|
+
* @param artist - The artist name
|
|
8
|
+
* @param track - The track name
|
|
9
|
+
* @param limit - Maximum number of similar tracks to return (default `'30'`)
|
|
10
|
+
* @param autocorrect - Set to `'1'` to auto-correct misspelled names (default `'1'`)
|
|
11
|
+
* @returns A list of similar tracks with match scores
|
|
12
|
+
*/
|
|
2
13
|
export declare function trackGetSimilar(method: string, artist: string, track: string, limit?: string, autocorrect?: string): Promise<TrackSimilarResponse>;
|
|
@@ -1,2 +1,13 @@
|
|
|
1
1
|
import type { TrackTagsResponse } from '../lastfm.types.js';
|
|
2
|
+
/**
|
|
3
|
+
* Get the tags applied by an individual user to a track on Last.fm.
|
|
4
|
+
*
|
|
5
|
+
* @see https://www.last.fm/api/show/track.getTags
|
|
6
|
+
* @param method - The Last.fm API method string (`method.track.getTags`)
|
|
7
|
+
* @param artist - The artist name
|
|
8
|
+
* @param track - The track name
|
|
9
|
+
* @param user - The Last.fm username whose tags to retrieve
|
|
10
|
+
* @param autocorrect - Set to `'1'` to auto-correct misspelled names (default `'1'`)
|
|
11
|
+
* @returns Tags applied by the user to this track
|
|
12
|
+
*/
|
|
2
13
|
export declare function trackGetTags(method: string, artist: string, track: string, user: string, autocorrect?: string): Promise<TrackTagsResponse>;
|
|
@@ -1,2 +1,12 @@
|
|
|
1
1
|
import type { TrackTopTagsResponse } from '../lastfm.types.js';
|
|
2
|
+
/**
|
|
3
|
+
* Get the top tags for a track on Last.fm, ordered by popularity.
|
|
4
|
+
*
|
|
5
|
+
* @see https://www.last.fm/api/show/track.getTopTags
|
|
6
|
+
* @param method - The Last.fm API method string (`method.track.getTopTags`)
|
|
7
|
+
* @param artist - The artist name
|
|
8
|
+
* @param track - The track name
|
|
9
|
+
* @param autocorrect - Set to `'1'` to auto-correct misspelled names (default `'1'`)
|
|
10
|
+
* @returns Top tags for the track ordered by tag count
|
|
11
|
+
*/
|
|
2
12
|
export declare function trackGetTopTags(method: string, artist: string, track: string, autocorrect?: string): Promise<TrackTopTagsResponse>;
|
|
@@ -1,2 +1,12 @@
|
|
|
1
1
|
import type { AuthResponse } from '../lastfm.types.js';
|
|
2
|
+
/**
|
|
3
|
+
* Love a track for the authenticated user. Requires authentication.
|
|
4
|
+
*
|
|
5
|
+
* @see https://www.last.fm/api/show/track.love
|
|
6
|
+
* @param method - The Last.fm API method string (`method.track.love`)
|
|
7
|
+
* @param artist - The artist name
|
|
8
|
+
* @param track - The track name
|
|
9
|
+
* @param sk - A session key obtained via the auth flow
|
|
10
|
+
* @returns Authentication response confirming the operation
|
|
11
|
+
*/
|
|
2
12
|
export declare function trackLove(method: string, artist: string, track: string, sk: string): Promise<AuthResponse>;
|
|
@@ -1,2 +1,13 @@
|
|
|
1
1
|
import type { AuthResponse } from '../lastfm.types.js';
|
|
2
|
+
/**
|
|
3
|
+
* Remove a user-applied tag from a track. Requires authentication.
|
|
4
|
+
*
|
|
5
|
+
* @see https://www.last.fm/api/show/track.removeTag
|
|
6
|
+
* @param method - The Last.fm API method string (`method.track.removeTag`)
|
|
7
|
+
* @param artist - The artist name
|
|
8
|
+
* @param track - The track name
|
|
9
|
+
* @param tag - A single tag to remove from the track
|
|
10
|
+
* @param sk - A session key obtained via the auth flow
|
|
11
|
+
* @returns Authentication response confirming the operation
|
|
12
|
+
*/
|
|
2
13
|
export declare function trackRemoveTag(method: string, artist: string, track: string, tag: string, sk: string): Promise<AuthResponse>;
|
|
@@ -1,2 +1,14 @@
|
|
|
1
1
|
import type { ScrobbleResponse } from '../lastfm.types.js';
|
|
2
|
+
/**
|
|
3
|
+
* Add a track-play to a user's scrobble history. Requires authentication.
|
|
4
|
+
*
|
|
5
|
+
* @see https://www.last.fm/api/show/track.scrobble
|
|
6
|
+
* @param method - The Last.fm API method string (`method.track.scrobble`)
|
|
7
|
+
* @param artist - The artist name
|
|
8
|
+
* @param track - The track name
|
|
9
|
+
* @param timestamp - Unix timestamp of when the track was listened to
|
|
10
|
+
* @param album - The album name
|
|
11
|
+
* @param sk - A session key obtained via the auth flow
|
|
12
|
+
* @returns The accepted and ignored scrobble counts
|
|
13
|
+
*/
|
|
2
14
|
export declare function trackScrobble(method: string, artist: string, track: string, timestamp: string, album: string, sk: string): Promise<ScrobbleResponse>;
|
|
@@ -1,2 +1,13 @@
|
|
|
1
1
|
import type { TrackSearchResponse } from '../lastfm.types.js';
|
|
2
|
+
/**
|
|
3
|
+
* Search for a track by track name, optionally filtered by artist. Returns paginated results.
|
|
4
|
+
*
|
|
5
|
+
* @see https://www.last.fm/api/show/track.search
|
|
6
|
+
* @param method - The Last.fm API method string (`method.track.search`)
|
|
7
|
+
* @param track - The track name to search for
|
|
8
|
+
* @param artist - Optionally narrow results to tracks by this artist
|
|
9
|
+
* @param limit - Number of results per page (default `'30'`)
|
|
10
|
+
* @param page - Page number to fetch (default `'1'`)
|
|
11
|
+
* @returns Paginated track search results
|
|
12
|
+
*/
|
|
2
13
|
export declare function trackSearch(method: string, track: string, artist?: string, limit?: string, page?: string): Promise<TrackSearchResponse>;
|
|
@@ -1,2 +1,12 @@
|
|
|
1
1
|
import type { AuthResponse } from '../lastfm.types.js';
|
|
2
|
+
/**
|
|
3
|
+
* UnLove a track for the authenticated user. Requires authentication.
|
|
4
|
+
*
|
|
5
|
+
* @see https://www.last.fm/api/show/track.unlove
|
|
6
|
+
* @param method - The Last.fm API method string (`method.track.unlove`)
|
|
7
|
+
* @param artist - The artist name
|
|
8
|
+
* @param track - The track name
|
|
9
|
+
* @param sk - A session key obtained via the auth flow
|
|
10
|
+
* @returns Authentication response confirming the operation
|
|
11
|
+
*/
|
|
2
12
|
export declare function trackUnlove(method: string, artist: string, track: string, sk: string): Promise<AuthResponse>;
|
|
@@ -1,2 +1,13 @@
|
|
|
1
1
|
import type { AuthResponse } from '../lastfm.types.js';
|
|
2
|
+
/**
|
|
3
|
+
* Notify Last.fm that a user has started listening to a track. Requires authentication.
|
|
4
|
+
*
|
|
5
|
+
* @see https://www.last.fm/api/show/track.updateNowPlaying
|
|
6
|
+
* @param method - The Last.fm API method string (`method.track.updateNowPlaying`)
|
|
7
|
+
* @param artist - The artist name
|
|
8
|
+
* @param track - The track name
|
|
9
|
+
* @param album - The album name
|
|
10
|
+
* @param sk - A session key obtained via the auth flow
|
|
11
|
+
* @returns Authentication response confirming the now-playing update
|
|
12
|
+
*/
|
|
2
13
|
export declare function trackUpdateNowPlaying(method: string, artist: string, track: string, album: string, sk: string): Promise<AuthResponse>;
|
|
@@ -1,2 +1,14 @@
|
|
|
1
1
|
import type { UserPersonalTagsResponse } from '../lastfm.types.js';
|
|
2
|
+
/**
|
|
3
|
+
* Get the items tagged by a user, of the type specified, filtered by tag.
|
|
4
|
+
*
|
|
5
|
+
* @see https://www.last.fm/api/show/user.getPersonalTags
|
|
6
|
+
* @param method - The Last.fm API method string (`method.user.getPersonalTags`)
|
|
7
|
+
* @param user - The Last.fm username
|
|
8
|
+
* @param tag - The tag to filter by
|
|
9
|
+
* @param taggingtype - The type of items tagged (`artist`, `album`, or `track`)
|
|
10
|
+
* @param limit - Number of results per page (default `'50'`)
|
|
11
|
+
* @param page - Page number to fetch (default `'1'`)
|
|
12
|
+
* @returns Paginated list of items tagged by the user with the given tag
|
|
13
|
+
*/
|
|
2
14
|
export declare function userGetPersonalTags(method: string, user: string, tag: string, taggingtype: string, limit?: string, page?: string): Promise<UserPersonalTagsResponse>;
|
package/dist/album/addTags.js
CHANGED
|
@@ -1,5 +1,16 @@
|
|
|
1
1
|
import { signedRequest } from '../request.js';
|
|
2
2
|
import { config } from '../config.js';
|
|
3
|
+
/**
|
|
4
|
+
* Tag an album using a list of user-supplied tags. Requires authentication.
|
|
5
|
+
*
|
|
6
|
+
* @see https://www.last.fm/api/show/album.addTags
|
|
7
|
+
* @param method - The Last.fm API method string (`method.album.addTags`)
|
|
8
|
+
* @param artist - The artist name
|
|
9
|
+
* @param album - The album name
|
|
10
|
+
* @param tags - A comma-separated list of tags to apply (max 10)
|
|
11
|
+
* @param sk - A session key obtained via the auth flow
|
|
12
|
+
* @returns Authentication response confirming the operation
|
|
13
|
+
*/
|
|
3
14
|
export async function albumAddTags(method, artist, album, tags, sk) {
|
|
4
15
|
return await signedRequest({ method, artist, album, tags, sk }, config.share_secret);
|
|
5
16
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"addTags.js","sourceRoot":"","sources":["../../src/album/addTags.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAC9C,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"addTags.js","sourceRoot":"","sources":["../../src/album/addTags.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAC9C,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AAEtC;;;;;;;;;;GAUG;AACH,MAAM,CAAC,KAAK,UAAU,YAAY,CAAC,MAAc,EAAE,MAAc,EAAE,KAAa,EAAE,IAAY,EAAE,EAAU;IACxG,OAAO,MAAM,aAAa,CAAe,EAAE,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,IAAI,EAAE,EAAE,EAAE,EAAE,MAAM,CAAC,YAAY,CAAC,CAAC;AACrG,CAAC"}
|
package/dist/album/getInfo.js
CHANGED
|
@@ -1,4 +1,15 @@
|
|
|
1
1
|
import request from '../request.js';
|
|
2
|
+
/**
|
|
3
|
+
* Get the metadata and tracklist for an album on Last.fm.
|
|
4
|
+
*
|
|
5
|
+
* @see https://www.last.fm/api/show/album.getInfo
|
|
6
|
+
* @param method - The Last.fm API method string (`method.album.getInfo`)
|
|
7
|
+
* @param artist - The artist name
|
|
8
|
+
* @param album - The album name
|
|
9
|
+
* @param autocorrect - Set to `'1'` to auto-correct misspelled names (default `'1'`)
|
|
10
|
+
* @param lang - ISO 639 alpha-2 language code for the biography text (default `'en'`)
|
|
11
|
+
* @returns Album metadata including tracklist, wiki, and tags
|
|
12
|
+
*/
|
|
2
13
|
export async function albumGetInfo(method, artist, album, autocorrect = '1', lang = 'en') {
|
|
3
14
|
return await request({ method, artist, album, autocorrect, lang });
|
|
4
15
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getInfo.js","sourceRoot":"","sources":["../../src/album/getInfo.ts"],"names":[],"mappings":"AACA,OAAO,OAAO,MAAM,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"getInfo.js","sourceRoot":"","sources":["../../src/album/getInfo.ts"],"names":[],"mappings":"AACA,OAAO,OAAO,MAAM,eAAe,CAAC;AAEpC;;;;;;;;;;GAUG;AACH,MAAM,CAAC,KAAK,UAAU,YAAY,CAAC,MAAc,EAAE,MAAc,EAAE,KAAa,EAAE,WAAW,GAAG,GAAG,EAAE,IAAI,GAAG,IAAI;IAC9G,OAAO,MAAM,OAAO,CAAoB,EAAE,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,WAAW,EAAE,IAAI,EAAE,CAAC,CAAC;AACxF,CAAC"}
|
package/dist/album/getTags.js
CHANGED
|
@@ -1,4 +1,15 @@
|
|
|
1
1
|
import request from '../request.js';
|
|
2
|
+
/**
|
|
3
|
+
* Get the tags applied by an individual user to an album on Last.fm.
|
|
4
|
+
*
|
|
5
|
+
* @see https://www.last.fm/api/show/album.getTags
|
|
6
|
+
* @param method - The Last.fm API method string (`method.album.getTags`)
|
|
7
|
+
* @param artist - The artist name
|
|
8
|
+
* @param album - The album name
|
|
9
|
+
* @param user - The Last.fm username whose tags to retrieve
|
|
10
|
+
* @param autocorrect - Set to `'1'` to auto-correct misspelled names (default `'1'`)
|
|
11
|
+
* @returns Tags applied by the user to this album
|
|
12
|
+
*/
|
|
2
13
|
export async function albumGetTags(method, artist, album, user, autocorrect = '1') {
|
|
3
14
|
return await request({ method, artist, album, user, autocorrect });
|
|
4
15
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getTags.js","sourceRoot":"","sources":["../../src/album/getTags.ts"],"names":[],"mappings":"AACA,OAAO,OAAO,MAAM,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"getTags.js","sourceRoot":"","sources":["../../src/album/getTags.ts"],"names":[],"mappings":"AACA,OAAO,OAAO,MAAM,eAAe,CAAC;AAEpC;;;;;;;;;;GAUG;AACH,MAAM,CAAC,KAAK,UAAU,YAAY,CAAC,MAAc,EAAE,MAAc,EAAE,KAAa,EAAE,IAAY,EAAE,WAAW,GAAG,GAAG;IAC/G,OAAO,MAAM,OAAO,CAAoB,EAAE,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,IAAI,EAAE,WAAW,EAAE,CAAC,CAAC;AACxF,CAAC"}
|
package/dist/album/getTopTags.js
CHANGED
|
@@ -1,4 +1,14 @@
|
|
|
1
1
|
import request from '../request.js';
|
|
2
|
+
/**
|
|
3
|
+
* Get the top tags applied to an album on Last.fm, ordered by tag count.
|
|
4
|
+
*
|
|
5
|
+
* @see https://www.last.fm/api/show/album.getTopTags
|
|
6
|
+
* @param method - The Last.fm API method string (`method.album.getTopTags`)
|
|
7
|
+
* @param artist - The artist name
|
|
8
|
+
* @param album - The album name
|
|
9
|
+
* @param autocorrect - Set to `'1'` to auto-correct misspelled names (default `'1'`)
|
|
10
|
+
* @returns Top tags for the album ordered by tag count
|
|
11
|
+
*/
|
|
2
12
|
export async function albumGetTopTags(method, artist, album, autocorrect = '1') {
|
|
3
13
|
return await request({ method, artist, album, autocorrect });
|
|
4
14
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getTopTags.js","sourceRoot":"","sources":["../../src/album/getTopTags.ts"],"names":[],"mappings":"AACA,OAAO,OAAO,MAAM,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"getTopTags.js","sourceRoot":"","sources":["../../src/album/getTopTags.ts"],"names":[],"mappings":"AACA,OAAO,OAAO,MAAM,eAAe,CAAC;AAEpC;;;;;;;;;GASG;AACH,MAAM,CAAC,KAAK,UAAU,eAAe,CAAC,MAAc,EAAE,MAAc,EAAE,KAAa,EAAE,WAAW,GAAG,GAAG;IACpG,OAAO,MAAM,OAAO,CAAuB,EAAE,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,WAAW,EAAE,CAAC,CAAC;AACrF,CAAC"}
|
package/dist/album/removeTag.js
CHANGED
|
@@ -1,5 +1,16 @@
|
|
|
1
1
|
import { signedRequest } from '../request.js';
|
|
2
2
|
import { config } from '../config.js';
|
|
3
|
+
/**
|
|
4
|
+
* Remove a user-applied tag from an album. Requires authentication.
|
|
5
|
+
*
|
|
6
|
+
* @see https://www.last.fm/api/show/album.removeTag
|
|
7
|
+
* @param method - The Last.fm API method string (`method.album.removeTag`)
|
|
8
|
+
* @param artist - The artist name
|
|
9
|
+
* @param album - The album name
|
|
10
|
+
* @param tag - A single tag to remove from the album
|
|
11
|
+
* @param sk - A session key obtained via the auth flow
|
|
12
|
+
* @returns Authentication response confirming the operation
|
|
13
|
+
*/
|
|
3
14
|
export async function albumRemoveTag(method, artist, album, tag, sk) {
|
|
4
15
|
return await signedRequest({ method, artist, album, tag, sk }, config.share_secret);
|
|
5
16
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"removeTag.js","sourceRoot":"","sources":["../../src/album/removeTag.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAC9C,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"removeTag.js","sourceRoot":"","sources":["../../src/album/removeTag.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAC9C,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AAEtC;;;;;;;;;;GAUG;AACH,MAAM,CAAC,KAAK,UAAU,cAAc,CAAC,MAAc,EAAE,MAAc,EAAE,KAAa,EAAE,GAAW,EAAE,EAAU;IACzG,OAAO,MAAM,aAAa,CAAe,EAAE,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,GAAG,EAAE,EAAE,EAAE,EAAE,MAAM,CAAC,YAAY,CAAC,CAAC;AACpG,CAAC"}
|
package/dist/album/search.js
CHANGED
|
@@ -1,4 +1,14 @@
|
|
|
1
1
|
import request from '../request.js';
|
|
2
|
+
/**
|
|
3
|
+
* Search for an album by name on Last.fm. Returns paginated results.
|
|
4
|
+
*
|
|
5
|
+
* @see https://www.last.fm/api/show/album.search
|
|
6
|
+
* @param method - The Last.fm API method string (`method.album.search`)
|
|
7
|
+
* @param album - The album name to search for
|
|
8
|
+
* @param limit - Number of results per page (default `'30'`)
|
|
9
|
+
* @param page - Page number to fetch (default `'1'`)
|
|
10
|
+
* @returns Paginated album search results
|
|
11
|
+
*/
|
|
2
12
|
export async function albumSearch(method, album, limit = '30', page = '1') {
|
|
3
13
|
return await request({ method, album, limit, page });
|
|
4
14
|
}
|
package/dist/album/search.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"search.js","sourceRoot":"","sources":["../../src/album/search.ts"],"names":[],"mappings":"AACA,OAAO,OAAO,MAAM,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"search.js","sourceRoot":"","sources":["../../src/album/search.ts"],"names":[],"mappings":"AACA,OAAO,OAAO,MAAM,eAAe,CAAC;AAEpC;;;;;;;;;GASG;AACH,MAAM,CAAC,KAAK,UAAU,WAAW,CAAC,MAAc,EAAE,KAAa,EAAE,KAAK,GAAG,IAAI,EAAE,IAAI,GAAG,GAAG;IACvF,OAAO,MAAM,OAAO,CAAsB,EAAE,MAAM,EAAE,KAAK,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC;AAC5E,CAAC"}
|
package/dist/artist/addTags.js
CHANGED
|
@@ -1,5 +1,15 @@
|
|
|
1
1
|
import { signedRequest } from '../request.js';
|
|
2
2
|
import { config } from '../config.js';
|
|
3
|
+
/**
|
|
4
|
+
* Tag an artist using a list of user-supplied tags. Requires authentication.
|
|
5
|
+
*
|
|
6
|
+
* @see https://www.last.fm/api/show/artist.addTags
|
|
7
|
+
* @param method - The Last.fm API method string (`method.artist.addTags`)
|
|
8
|
+
* @param artist - The artist name
|
|
9
|
+
* @param tags - A comma-separated list of tags to apply (max 10)
|
|
10
|
+
* @param sk - A session key obtained via the auth flow
|
|
11
|
+
* @returns Authentication response confirming the operation
|
|
12
|
+
*/
|
|
3
13
|
export async function artistAddTags(method, artist, tags, sk) {
|
|
4
14
|
return await signedRequest({ method, artist, tags, sk }, config.share_secret);
|
|
5
15
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"addTags.js","sourceRoot":"","sources":["../../src/artist/addTags.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAC9C,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"addTags.js","sourceRoot":"","sources":["../../src/artist/addTags.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,aAAa,CAAC,MAAc,EAAE,MAAc,EAAE,IAAY,EAAE,EAAU;IAC1F,OAAO,MAAM,aAAa,CAAe,EAAE,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,EAAE,EAAE,EAAE,MAAM,CAAC,YAAY,CAAC,CAAC;AAC9F,CAAC"}
|
|
@@ -1,4 +1,13 @@
|
|
|
1
1
|
import request from '../request.js';
|
|
2
|
+
/**
|
|
3
|
+
* Use the Last.fm corrections data to check whether the supplied artist has a correction
|
|
4
|
+
* to a canonical artist name.
|
|
5
|
+
*
|
|
6
|
+
* @see https://www.last.fm/api/show/artist.getCorrection
|
|
7
|
+
* @param method - The Last.fm API method string (`method.artist.getCorrection`)
|
|
8
|
+
* @param artist - The artist name to check for a correction
|
|
9
|
+
* @returns The corrected canonical artist name if one exists
|
|
10
|
+
*/
|
|
2
11
|
export async function artistGetCorrection(method, artist) {
|
|
3
12
|
return await request({ method, artist });
|
|
4
13
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getCorrection.js","sourceRoot":"","sources":["../../src/artist/getCorrection.ts"],"names":[],"mappings":"AACA,OAAO,OAAO,MAAM,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"getCorrection.js","sourceRoot":"","sources":["../../src/artist/getCorrection.ts"],"names":[],"mappings":"AACA,OAAO,OAAO,MAAM,eAAe,CAAC;AAEpC;;;;;;;;GAQG;AACH,MAAM,CAAC,KAAK,UAAU,mBAAmB,CAAC,MAAc,EAAE,MAAc;IACtE,OAAO,MAAM,OAAO,CAA2B,EAAE,MAAM,EAAE,MAAM,EAAE,CAAC,CAAC;AACrE,CAAC"}
|
package/dist/artist/getInfo.js
CHANGED
|
@@ -1,4 +1,14 @@
|
|
|
1
1
|
import request from '../request.js';
|
|
2
|
+
/**
|
|
3
|
+
* Get the metadata for an artist on Last.fm. Includes biography, tags, and similar artists.
|
|
4
|
+
*
|
|
5
|
+
* @see https://www.last.fm/api/show/artist.getInfo
|
|
6
|
+
* @param method - The Last.fm API method string (`method.artist.getInfo`)
|
|
7
|
+
* @param artist - The artist name
|
|
8
|
+
* @param autocorrect - Set to `'1'` to auto-correct misspelled names (default `'1'`)
|
|
9
|
+
* @param lang - ISO 639 alpha-2 language code for the biography text (default `'en'`)
|
|
10
|
+
* @returns Artist metadata including biography, similar artists, and top tags
|
|
11
|
+
*/
|
|
2
12
|
export async function artistGetInfo(method, artist, autocorrect = '1', lang = 'en') {
|
|
3
13
|
return await request({ method, artist, autocorrect, lang });
|
|
4
14
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getInfo.js","sourceRoot":"","sources":["../../src/artist/getInfo.ts"],"names":[],"mappings":"AACA,OAAO,OAAO,MAAM,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"getInfo.js","sourceRoot":"","sources":["../../src/artist/getInfo.ts"],"names":[],"mappings":"AACA,OAAO,OAAO,MAAM,eAAe,CAAC;AAEpC;;;;;;;;;GASG;AACH,MAAM,CAAC,KAAK,UAAU,aAAa,CAAC,MAAc,EAAE,MAAc,EAAE,WAAW,GAAG,GAAG,EAAE,IAAI,GAAG,IAAI;IAChG,OAAO,MAAM,OAAO,CAAqB,EAAE,MAAM,EAAE,MAAM,EAAE,WAAW,EAAE,IAAI,EAAE,CAAC,CAAC;AAClF,CAAC"}
|
|
@@ -1,4 +1,14 @@
|
|
|
1
1
|
import request from '../request.js';
|
|
2
|
+
/**
|
|
3
|
+
* Get all the artists similar to this artist.
|
|
4
|
+
*
|
|
5
|
+
* @see https://www.last.fm/api/show/artist.getSimilar
|
|
6
|
+
* @param method - The Last.fm API method string (`method.artist.getSimilar`)
|
|
7
|
+
* @param artist - The artist name
|
|
8
|
+
* @param limit - Maximum number of similar artists to return (default `'30'`)
|
|
9
|
+
* @param autocorrect - Set to `'1'` to auto-correct misspelled names (default `'1'`)
|
|
10
|
+
* @returns A list of similar artists with match scores
|
|
11
|
+
*/
|
|
2
12
|
export async function artistGetSimilar(method, artist, limit = '30', autocorrect = '1') {
|
|
3
13
|
return await request({ method, artist, limit, autocorrect });
|
|
4
14
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getSimilar.js","sourceRoot":"","sources":["../../src/artist/getSimilar.ts"],"names":[],"mappings":"AACA,OAAO,OAAO,MAAM,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"getSimilar.js","sourceRoot":"","sources":["../../src/artist/getSimilar.ts"],"names":[],"mappings":"AACA,OAAO,OAAO,MAAM,eAAe,CAAC;AAEpC;;;;;;;;;GASG;AACH,MAAM,CAAC,KAAK,UAAU,gBAAgB,CAAC,MAAc,EAAE,MAAc,EAAE,KAAK,GAAG,IAAI,EAAE,WAAW,GAAG,GAAG;IACpG,OAAO,MAAM,OAAO,CAAwB,EAAE,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,WAAW,EAAE,CAAC,CAAC;AACtF,CAAC"}
|
package/dist/artist/getTags.js
CHANGED
|
@@ -1,4 +1,14 @@
|
|
|
1
1
|
import request from '../request.js';
|
|
2
|
+
/**
|
|
3
|
+
* Get the tags applied by an individual user to an artist on Last.fm.
|
|
4
|
+
*
|
|
5
|
+
* @see https://www.last.fm/api/show/artist.getTags
|
|
6
|
+
* @param method - The Last.fm API method string (`method.artist.getTags`)
|
|
7
|
+
* @param artist - The artist name
|
|
8
|
+
* @param user - The Last.fm username whose tags to retrieve
|
|
9
|
+
* @param autocorrect - Set to `'1'` to auto-correct misspelled names (default `'1'`)
|
|
10
|
+
* @returns Tags applied by the user to this artist
|
|
11
|
+
*/
|
|
2
12
|
export async function artistGetTags(method, artist, user, autocorrect = '1') {
|
|
3
13
|
return await request({ method, artist, user, autocorrect });
|
|
4
14
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getTags.js","sourceRoot":"","sources":["../../src/artist/getTags.ts"],"names":[],"mappings":"AACA,OAAO,OAAO,MAAM,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"getTags.js","sourceRoot":"","sources":["../../src/artist/getTags.ts"],"names":[],"mappings":"AACA,OAAO,OAAO,MAAM,eAAe,CAAC;AAEpC;;;;;;;;;GASG;AACH,MAAM,CAAC,KAAK,UAAU,aAAa,CAAC,MAAc,EAAE,MAAc,EAAE,IAAY,EAAE,WAAW,GAAG,GAAG;IACjG,OAAO,MAAM,OAAO,CAAqB,EAAE,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,WAAW,EAAE,CAAC,CAAC;AAClF,CAAC"}
|
|
@@ -1,4 +1,15 @@
|
|
|
1
1
|
import request from '../request.js';
|
|
2
|
+
/**
|
|
3
|
+
* Get the top albums for an artist on Last.fm, ordered by popularity.
|
|
4
|
+
*
|
|
5
|
+
* @see https://www.last.fm/api/show/artist.getTopAlbums
|
|
6
|
+
* @param method - The Last.fm API method string (`method.artist.getTopAlbums`)
|
|
7
|
+
* @param artist - The artist name
|
|
8
|
+
* @param limit - Number of results per page (default `'50'`)
|
|
9
|
+
* @param page - Page number to fetch (default `'1'`)
|
|
10
|
+
* @param autocorrect - Set to `'1'` to auto-correct misspelled names (default `'1'`)
|
|
11
|
+
* @returns Paginated list of the artist's top albums
|
|
12
|
+
*/
|
|
2
13
|
export async function artistGetTopAlbums(method, artist, limit = '50', page = '1', autocorrect = '1') {
|
|
3
14
|
return await request({ method, artist, limit, page, autocorrect });
|
|
4
15
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getTopAlbums.js","sourceRoot":"","sources":["../../src/artist/getTopAlbums.ts"],"names":[],"mappings":"AACA,OAAO,OAAO,MAAM,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"getTopAlbums.js","sourceRoot":"","sources":["../../src/artist/getTopAlbums.ts"],"names":[],"mappings":"AACA,OAAO,OAAO,MAAM,eAAe,CAAC;AAEpC;;;;;;;;;;GAUG;AACH,MAAM,CAAC,KAAK,UAAU,kBAAkB,CAAC,MAAc,EAAE,MAAc,EAAE,KAAK,GAAG,IAAI,EAAE,IAAI,GAAG,GAAG,EAAE,WAAW,GAAG,GAAG;IAClH,OAAO,MAAM,OAAO,CAA0B,EAAE,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,IAAI,EAAE,WAAW,EAAE,CAAC,CAAC;AAC9F,CAAC"}
|
|
@@ -1,4 +1,13 @@
|
|
|
1
1
|
import request from '../request.js';
|
|
2
|
+
/**
|
|
3
|
+
* Get the top tags for an artist on Last.fm, ordered by popularity.
|
|
4
|
+
*
|
|
5
|
+
* @see https://www.last.fm/api/show/artist.getTopTags
|
|
6
|
+
* @param method - The Last.fm API method string (`method.artist.getTopTags`)
|
|
7
|
+
* @param artist - The artist name
|
|
8
|
+
* @param autocorrect - Set to `'1'` to auto-correct misspelled names (default `'1'`)
|
|
9
|
+
* @returns Top tags for the artist ordered by tag count
|
|
10
|
+
*/
|
|
2
11
|
export async function artistGetTopTags(method, artist, autocorrect = '1') {
|
|
3
12
|
return await request({ method, artist, autocorrect });
|
|
4
13
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getTopTags.js","sourceRoot":"","sources":["../../src/artist/getTopTags.ts"],"names":[],"mappings":"AACA,OAAO,OAAO,MAAM,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"getTopTags.js","sourceRoot":"","sources":["../../src/artist/getTopTags.ts"],"names":[],"mappings":"AACA,OAAO,OAAO,MAAM,eAAe,CAAC;AAEpC;;;;;;;;GAQG;AACH,MAAM,CAAC,KAAK,UAAU,gBAAgB,CAAC,MAAc,EAAE,MAAc,EAAE,WAAW,GAAG,GAAG;IACtF,OAAO,MAAM,OAAO,CAAwB,EAAE,MAAM,EAAE,MAAM,EAAE,WAAW,EAAE,CAAC,CAAC;AAC/E,CAAC"}
|
|
@@ -1,4 +1,15 @@
|
|
|
1
1
|
import request from '../request.js';
|
|
2
|
+
/**
|
|
3
|
+
* Get the top tracks for an artist on Last.fm, ordered by popularity.
|
|
4
|
+
*
|
|
5
|
+
* @see https://www.last.fm/api/show/artist.getTopTracks
|
|
6
|
+
* @param method - The Last.fm API method string (`method.artist.getTopTracks`)
|
|
7
|
+
* @param artist - The artist name
|
|
8
|
+
* @param limit - Number of results per page (default `'50'`)
|
|
9
|
+
* @param page - Page number to fetch (default `'1'`)
|
|
10
|
+
* @param autocorrect - Set to `'1'` to auto-correct misspelled names (default `'1'`)
|
|
11
|
+
* @returns Paginated list of the artist's top tracks
|
|
12
|
+
*/
|
|
2
13
|
export async function artistGetTopTracks(method, artist, limit = '50', page = '1', autocorrect = '1') {
|
|
3
14
|
return await request({ method, artist, limit, page, autocorrect });
|
|
4
15
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getTopTracks.js","sourceRoot":"","sources":["../../src/artist/getTopTracks.ts"],"names":[],"mappings":"AACA,OAAO,OAAO,MAAM,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"getTopTracks.js","sourceRoot":"","sources":["../../src/artist/getTopTracks.ts"],"names":[],"mappings":"AACA,OAAO,OAAO,MAAM,eAAe,CAAC;AAEpC;;;;;;;;;;GAUG;AACH,MAAM,CAAC,KAAK,UAAU,kBAAkB,CAAC,MAAc,EAAE,MAAc,EAAE,KAAK,GAAG,IAAI,EAAE,IAAI,GAAG,GAAG,EAAE,WAAW,GAAG,GAAG;IAClH,OAAO,MAAM,OAAO,CAA0B,EAAE,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,IAAI,EAAE,WAAW,EAAE,CAAC,CAAC;AAC9F,CAAC"}
|
package/dist/artist/removeTag.js
CHANGED
|
@@ -1,5 +1,15 @@
|
|
|
1
1
|
import { signedRequest } from '../request.js';
|
|
2
2
|
import { config } from '../config.js';
|
|
3
|
+
/**
|
|
4
|
+
* Remove a user-applied tag from an artist. Requires authentication.
|
|
5
|
+
*
|
|
6
|
+
* @see https://www.last.fm/api/show/artist.removeTag
|
|
7
|
+
* @param method - The Last.fm API method string (`method.artist.removeTag`)
|
|
8
|
+
* @param artist - The artist name
|
|
9
|
+
* @param tag - A single tag to remove from the artist
|
|
10
|
+
* @param sk - A session key obtained via the auth flow
|
|
11
|
+
* @returns Authentication response confirming the operation
|
|
12
|
+
*/
|
|
3
13
|
export async function artistRemoveTag(method, artist, tag, sk) {
|
|
4
14
|
return await signedRequest({ method, artist, tag, sk }, config.share_secret);
|
|
5
15
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"removeTag.js","sourceRoot":"","sources":["../../src/artist/removeTag.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAC9C,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"removeTag.js","sourceRoot":"","sources":["../../src/artist/removeTag.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,eAAe,CAAC,MAAc,EAAE,MAAc,EAAE,GAAW,EAAE,EAAU;IAC3F,OAAO,MAAM,aAAa,CAAe,EAAE,MAAM,EAAE,MAAM,EAAE,GAAG,EAAE,EAAE,EAAE,EAAE,MAAM,CAAC,YAAY,CAAC,CAAC;AAC7F,CAAC"}
|
package/dist/artist/search.js
CHANGED
|
@@ -1,4 +1,14 @@
|
|
|
1
1
|
import request from '../request.js';
|
|
2
|
+
/**
|
|
3
|
+
* Search for an artist by name on Last.fm. Returns paginated results.
|
|
4
|
+
*
|
|
5
|
+
* @see https://www.last.fm/api/show/artist.search
|
|
6
|
+
* @param method - The Last.fm API method string (`method.artist.search`)
|
|
7
|
+
* @param artist - The artist name to search for
|
|
8
|
+
* @param limit - Number of results per page (default `'30'`)
|
|
9
|
+
* @param page - Page number to fetch (default `'1'`)
|
|
10
|
+
* @returns Paginated artist search results
|
|
11
|
+
*/
|
|
2
12
|
export async function artistSearch(method, artist, limit = '30', page = '1') {
|
|
3
13
|
return await request({ method, artist, limit, page });
|
|
4
14
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"search.js","sourceRoot":"","sources":["../../src/artist/search.ts"],"names":[],"mappings":"AACA,OAAO,OAAO,MAAM,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"search.js","sourceRoot":"","sources":["../../src/artist/search.ts"],"names":[],"mappings":"AACA,OAAO,OAAO,MAAM,eAAe,CAAC;AAEpC;;;;;;;;;GASG;AACH,MAAM,CAAC,KAAK,UAAU,YAAY,CAAC,MAAc,EAAE,MAAc,EAAE,KAAK,GAAG,IAAI,EAAE,IAAI,GAAG,GAAG;IACzF,OAAO,MAAM,OAAO,CAAuB,EAAE,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC;AAC9E,CAAC"}
|
|
@@ -1,5 +1,16 @@
|
|
|
1
1
|
import { signedRequest } from '../request.js';
|
|
2
2
|
import { config } from '../config.js';
|
|
3
|
+
/**
|
|
4
|
+
* Create a session for a user using their username and password (mobile auth flow).
|
|
5
|
+
*
|
|
6
|
+
* The returned session key can be used for authenticated write operations.
|
|
7
|
+
*
|
|
8
|
+
* @see https://www.last.fm/api/show/auth.getMobileSession
|
|
9
|
+
* @param method - The Last.fm API method string (`method.auth.getMobileSession`)
|
|
10
|
+
* @param username - The Last.fm username
|
|
11
|
+
* @param password - The user's plaintext password
|
|
12
|
+
* @returns A session key valid for write operations
|
|
13
|
+
*/
|
|
3
14
|
export async function authGetMobileSession(method, username, password) {
|
|
4
15
|
return await signedRequest({ method, username, password }, config.share_secret);
|
|
5
16
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getMobileSession.js","sourceRoot":"","sources":["../../src/auth/getMobileSession.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAC9C,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"getMobileSession.js","sourceRoot":"","sources":["../../src/auth/getMobileSession.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAC9C,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AAEtC;;;;;;;;;;GAUG;AACH,MAAM,CAAC,KAAK,UAAU,oBAAoB,CAAC,MAAc,EAAE,QAAgB,EAAE,QAAgB;IAC3F,OAAO,MAAM,aAAa,CAA4B,EAAE,MAAM,EAAE,QAAQ,EAAE,QAAQ,EAAE,EAAE,MAAM,CAAC,YAAY,CAAC,CAAC;AAC7G,CAAC"}
|
package/dist/auth/getSession.js
CHANGED
|
@@ -1,5 +1,15 @@
|
|
|
1
1
|
import { signedRequest } from '../request.js';
|
|
2
2
|
import { config } from '../config.js';
|
|
3
|
+
/**
|
|
4
|
+
* Fetch a session key for a user after they have authorised a token via the Last.fm web auth flow.
|
|
5
|
+
*
|
|
6
|
+
* Tokens are valid for 60 minutes and can only be used once.
|
|
7
|
+
*
|
|
8
|
+
* @see https://www.last.fm/api/show/auth.getSession
|
|
9
|
+
* @param method - The Last.fm API method string (`method.auth.getSession`)
|
|
10
|
+
* @param token - The token previously granted by `auth.getToken` and authorised by the user
|
|
11
|
+
* @returns A session key valid for write operations
|
|
12
|
+
*/
|
|
3
13
|
export async function authGetSession(method, token) {
|
|
4
14
|
return await signedRequest({ method, token }, config.share_secret);
|
|
5
15
|
}
|