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.
Files changed (310) hide show
  1. package/README.md +140 -74
  2. package/dist/@types/album/addTags.d.ts +11 -0
  3. package/dist/@types/album/getInfo.d.ts +11 -0
  4. package/dist/@types/album/getTags.d.ts +11 -0
  5. package/dist/@types/album/getTopTags.d.ts +10 -0
  6. package/dist/@types/album/removeTag.d.ts +11 -0
  7. package/dist/@types/album/search.d.ts +10 -0
  8. package/dist/@types/artist/addTags.d.ts +10 -0
  9. package/dist/@types/artist/getCorrection.d.ts +9 -0
  10. package/dist/@types/artist/getInfo.d.ts +10 -0
  11. package/dist/@types/artist/getSimilar.d.ts +10 -0
  12. package/dist/@types/artist/getTags.d.ts +10 -0
  13. package/dist/@types/artist/getTopAlbums.d.ts +11 -0
  14. package/dist/@types/artist/getTopTags.d.ts +9 -0
  15. package/dist/@types/artist/getTopTracks.d.ts +11 -0
  16. package/dist/@types/artist/removeTag.d.ts +10 -0
  17. package/dist/@types/artist/search.d.ts +10 -0
  18. package/dist/@types/auth/getMobileSession.d.ts +11 -0
  19. package/dist/@types/auth/getSession.d.ts +10 -0
  20. package/dist/@types/auth.d.ts +9 -6
  21. package/dist/@types/chart/topArtists.d.ts +11 -0
  22. package/dist/@types/chart/topTags.d.ts +8 -0
  23. package/dist/@types/chart/topTracks.d.ts +8 -0
  24. package/dist/@types/config.d.ts +13 -11
  25. package/dist/@types/createOptions.d.ts +23 -0
  26. package/dist/@types/geo/getTopArtists.d.ts +10 -0
  27. package/dist/@types/geo/getTopTracks.d.ts +10 -0
  28. package/dist/@types/getFriends.d.ts +6 -3
  29. package/dist/@types/getInfo.d.ts +5 -3
  30. package/dist/@types/getLovedTracks.d.ts +7 -3
  31. package/dist/@types/getRecentTracks.d.ts +7 -3
  32. package/dist/@types/getTopAlbums.d.ts +7 -3
  33. package/dist/@types/getTopArtists.d.ts +7 -3
  34. package/dist/@types/getTopTracks.d.ts +7 -3
  35. package/dist/@types/getUserTopTags.d.ts +6 -3
  36. package/dist/@types/getWeeklyAlbumChart.d.ts +7 -3
  37. package/dist/@types/getWeeklyArtistChart.d.ts +7 -3
  38. package/dist/@types/getWeeklyChartList.d.ts +8 -3
  39. package/dist/@types/getWeeklyTrackChart.d.ts +7 -3
  40. package/dist/@types/index.d.ts +31 -89
  41. package/dist/@types/library/getArtists.d.ts +10 -0
  42. package/dist/@types/method.d.ts +25 -77
  43. package/dist/@types/request.d.ts +23 -0
  44. package/dist/@types/tag/getInfo.d.ts +9 -0
  45. package/dist/@types/tag/getSimilar.d.ts +8 -0
  46. package/dist/@types/tag/getTopAlbums.d.ts +10 -0
  47. package/dist/@types/tag/getTopArtists.d.ts +10 -0
  48. package/dist/@types/tag/getTopTags.d.ts +7 -0
  49. package/dist/@types/tag/getWeeklyChartList.d.ts +9 -0
  50. package/dist/@types/tag/topTracks.d.ts +6 -3
  51. package/dist/@types/track/addTags.d.ts +11 -0
  52. package/dist/@types/track/getCorrection.d.ts +10 -0
  53. package/dist/@types/track/getInfo.d.ts +11 -0
  54. package/dist/@types/track/getSimilar.d.ts +11 -0
  55. package/dist/@types/track/getTags.d.ts +11 -0
  56. package/dist/@types/track/getTopTags.d.ts +10 -0
  57. package/dist/@types/track/love.d.ts +10 -0
  58. package/dist/@types/track/removeTag.d.ts +11 -0
  59. package/dist/@types/track/scrobble.d.ts +12 -0
  60. package/dist/@types/track/search.d.ts +11 -0
  61. package/dist/@types/track/unlove.d.ts +10 -0
  62. package/dist/@types/track/updateNowPlaying.d.ts +11 -0
  63. package/dist/@types/user/getPersonalTags.d.ts +12 -0
  64. package/dist/album/addTags.js +11 -0
  65. package/dist/album/addTags.js.map +1 -1
  66. package/dist/album/getInfo.js +11 -0
  67. package/dist/album/getInfo.js.map +1 -1
  68. package/dist/album/getTags.js +11 -0
  69. package/dist/album/getTags.js.map +1 -1
  70. package/dist/album/getTopTags.js +10 -0
  71. package/dist/album/getTopTags.js.map +1 -1
  72. package/dist/album/removeTag.js +11 -0
  73. package/dist/album/removeTag.js.map +1 -1
  74. package/dist/album/search.js +10 -0
  75. package/dist/album/search.js.map +1 -1
  76. package/dist/artist/addTags.js +10 -0
  77. package/dist/artist/addTags.js.map +1 -1
  78. package/dist/artist/getCorrection.js +9 -0
  79. package/dist/artist/getCorrection.js.map +1 -1
  80. package/dist/artist/getInfo.js +10 -0
  81. package/dist/artist/getInfo.js.map +1 -1
  82. package/dist/artist/getSimilar.js +10 -0
  83. package/dist/artist/getSimilar.js.map +1 -1
  84. package/dist/artist/getTags.js +10 -0
  85. package/dist/artist/getTags.js.map +1 -1
  86. package/dist/artist/getTopAlbums.js +11 -0
  87. package/dist/artist/getTopAlbums.js.map +1 -1
  88. package/dist/artist/getTopTags.js +9 -0
  89. package/dist/artist/getTopTags.js.map +1 -1
  90. package/dist/artist/getTopTracks.js +11 -0
  91. package/dist/artist/getTopTracks.js.map +1 -1
  92. package/dist/artist/removeTag.js +10 -0
  93. package/dist/artist/removeTag.js.map +1 -1
  94. package/dist/artist/search.js +10 -0
  95. package/dist/artist/search.js.map +1 -1
  96. package/dist/auth/getMobileSession.js +11 -0
  97. package/dist/auth/getMobileSession.js.map +1 -1
  98. package/dist/auth/getSession.js +10 -0
  99. package/dist/auth/getSession.js.map +1 -1
  100. package/dist/auth.js +9 -6
  101. package/dist/auth.js.map +1 -1
  102. package/dist/chart/topArtists.js +11 -0
  103. package/dist/chart/topArtists.js.map +1 -1
  104. package/dist/chart/topTags.js +8 -0
  105. package/dist/chart/topTags.js.map +1 -1
  106. package/dist/chart/topTracks.js +8 -0
  107. package/dist/chart/topTracks.js.map +1 -1
  108. package/dist/cjs/album/addTags.js +11 -0
  109. package/dist/cjs/album/addTags.js.map +1 -1
  110. package/dist/cjs/album/getInfo.js +11 -0
  111. package/dist/cjs/album/getInfo.js.map +1 -1
  112. package/dist/cjs/album/getTags.js +11 -0
  113. package/dist/cjs/album/getTags.js.map +1 -1
  114. package/dist/cjs/album/getTopTags.js +10 -0
  115. package/dist/cjs/album/getTopTags.js.map +1 -1
  116. package/dist/cjs/album/removeTag.js +11 -0
  117. package/dist/cjs/album/removeTag.js.map +1 -1
  118. package/dist/cjs/album/search.js +10 -0
  119. package/dist/cjs/album/search.js.map +1 -1
  120. package/dist/cjs/artist/addTags.js +10 -0
  121. package/dist/cjs/artist/addTags.js.map +1 -1
  122. package/dist/cjs/artist/getCorrection.js +9 -0
  123. package/dist/cjs/artist/getCorrection.js.map +1 -1
  124. package/dist/cjs/artist/getInfo.js +10 -0
  125. package/dist/cjs/artist/getInfo.js.map +1 -1
  126. package/dist/cjs/artist/getSimilar.js +10 -0
  127. package/dist/cjs/artist/getSimilar.js.map +1 -1
  128. package/dist/cjs/artist/getTags.js +10 -0
  129. package/dist/cjs/artist/getTags.js.map +1 -1
  130. package/dist/cjs/artist/getTopAlbums.js +11 -0
  131. package/dist/cjs/artist/getTopAlbums.js.map +1 -1
  132. package/dist/cjs/artist/getTopTags.js +9 -0
  133. package/dist/cjs/artist/getTopTags.js.map +1 -1
  134. package/dist/cjs/artist/getTopTracks.js +11 -0
  135. package/dist/cjs/artist/getTopTracks.js.map +1 -1
  136. package/dist/cjs/artist/removeTag.js +10 -0
  137. package/dist/cjs/artist/removeTag.js.map +1 -1
  138. package/dist/cjs/artist/search.js +10 -0
  139. package/dist/cjs/artist/search.js.map +1 -1
  140. package/dist/cjs/auth/getMobileSession.js +11 -0
  141. package/dist/cjs/auth/getMobileSession.js.map +1 -1
  142. package/dist/cjs/auth/getSession.js +10 -0
  143. package/dist/cjs/auth/getSession.js.map +1 -1
  144. package/dist/cjs/auth.js +9 -6
  145. package/dist/cjs/auth.js.map +1 -1
  146. package/dist/cjs/chart/topArtists.js +11 -0
  147. package/dist/cjs/chart/topArtists.js.map +1 -1
  148. package/dist/cjs/chart/topTags.js +8 -0
  149. package/dist/cjs/chart/topTags.js.map +1 -1
  150. package/dist/cjs/chart/topTracks.js +8 -0
  151. package/dist/cjs/chart/topTracks.js.map +1 -1
  152. package/dist/cjs/config.js.map +1 -1
  153. package/dist/cjs/createOptions.js +23 -0
  154. package/dist/cjs/createOptions.js.map +1 -1
  155. package/dist/cjs/geo/getTopArtists.js +10 -0
  156. package/dist/cjs/geo/getTopArtists.js.map +1 -1
  157. package/dist/cjs/geo/getTopTracks.js +10 -0
  158. package/dist/cjs/geo/getTopTracks.js.map +1 -1
  159. package/dist/cjs/getFriends.js +6 -3
  160. package/dist/cjs/getFriends.js.map +1 -1
  161. package/dist/cjs/getInfo.js +5 -3
  162. package/dist/cjs/getInfo.js.map +1 -1
  163. package/dist/cjs/getLovedTracks.js +7 -3
  164. package/dist/cjs/getLovedTracks.js.map +1 -1
  165. package/dist/cjs/getRecentTracks.js +7 -3
  166. package/dist/cjs/getRecentTracks.js.map +1 -1
  167. package/dist/cjs/getTopAlbums.js +7 -3
  168. package/dist/cjs/getTopAlbums.js.map +1 -1
  169. package/dist/cjs/getTopArtists.js +7 -3
  170. package/dist/cjs/getTopArtists.js.map +1 -1
  171. package/dist/cjs/getTopTracks.js +7 -3
  172. package/dist/cjs/getTopTracks.js.map +1 -1
  173. package/dist/cjs/getUserTopTags.js +6 -3
  174. package/dist/cjs/getUserTopTags.js.map +1 -1
  175. package/dist/cjs/getWeeklyAlbumChart.js +7 -3
  176. package/dist/cjs/getWeeklyAlbumChart.js.map +1 -1
  177. package/dist/cjs/getWeeklyArtistChart.js +7 -3
  178. package/dist/cjs/getWeeklyArtistChart.js.map +1 -1
  179. package/dist/cjs/getWeeklyChartList.js +8 -3
  180. package/dist/cjs/getWeeklyChartList.js.map +1 -1
  181. package/dist/cjs/getWeeklyTrackChart.js +7 -3
  182. package/dist/cjs/getWeeklyTrackChart.js.map +1 -1
  183. package/dist/cjs/index.js +21 -0
  184. package/dist/cjs/index.js.map +1 -1
  185. package/dist/cjs/library/getArtists.js +10 -0
  186. package/dist/cjs/library/getArtists.js.map +1 -1
  187. package/dist/cjs/method.js +11 -0
  188. package/dist/cjs/method.js.map +1 -1
  189. package/dist/cjs/request.js +30 -0
  190. package/dist/cjs/request.js.map +1 -1
  191. package/dist/cjs/tag/getInfo.js +9 -0
  192. package/dist/cjs/tag/getInfo.js.map +1 -1
  193. package/dist/cjs/tag/getSimilar.js +8 -0
  194. package/dist/cjs/tag/getSimilar.js.map +1 -1
  195. package/dist/cjs/tag/getTopAlbums.js +10 -0
  196. package/dist/cjs/tag/getTopAlbums.js.map +1 -1
  197. package/dist/cjs/tag/getTopArtists.js +10 -0
  198. package/dist/cjs/tag/getTopArtists.js.map +1 -1
  199. package/dist/cjs/tag/getTopTags.js +7 -0
  200. package/dist/cjs/tag/getTopTags.js.map +1 -1
  201. package/dist/cjs/tag/getWeeklyChartList.js +9 -0
  202. package/dist/cjs/tag/getWeeklyChartList.js.map +1 -1
  203. package/dist/cjs/tag/topTracks.js +6 -3
  204. package/dist/cjs/tag/topTracks.js.map +1 -1
  205. package/dist/cjs/track/addTags.js +11 -0
  206. package/dist/cjs/track/addTags.js.map +1 -1
  207. package/dist/cjs/track/getCorrection.js +10 -0
  208. package/dist/cjs/track/getCorrection.js.map +1 -1
  209. package/dist/cjs/track/getInfo.js +11 -0
  210. package/dist/cjs/track/getInfo.js.map +1 -1
  211. package/dist/cjs/track/getSimilar.js +11 -0
  212. package/dist/cjs/track/getSimilar.js.map +1 -1
  213. package/dist/cjs/track/getTags.js +11 -0
  214. package/dist/cjs/track/getTags.js.map +1 -1
  215. package/dist/cjs/track/getTopTags.js +10 -0
  216. package/dist/cjs/track/getTopTags.js.map +1 -1
  217. package/dist/cjs/track/love.js +10 -0
  218. package/dist/cjs/track/love.js.map +1 -1
  219. package/dist/cjs/track/removeTag.js +11 -0
  220. package/dist/cjs/track/removeTag.js.map +1 -1
  221. package/dist/cjs/track/scrobble.js +12 -0
  222. package/dist/cjs/track/scrobble.js.map +1 -1
  223. package/dist/cjs/track/search.js +11 -0
  224. package/dist/cjs/track/search.js.map +1 -1
  225. package/dist/cjs/track/unlove.js +10 -0
  226. package/dist/cjs/track/unlove.js.map +1 -1
  227. package/dist/cjs/track/updateNowPlaying.js +11 -0
  228. package/dist/cjs/track/updateNowPlaying.js.map +1 -1
  229. package/dist/cjs/user/getPersonalTags.js +12 -0
  230. package/dist/cjs/user/getPersonalTags.js.map +1 -1
  231. package/dist/config.js.map +1 -1
  232. package/dist/createOptions.js +23 -0
  233. package/dist/createOptions.js.map +1 -1
  234. package/dist/geo/getTopArtists.js +10 -0
  235. package/dist/geo/getTopArtists.js.map +1 -1
  236. package/dist/geo/getTopTracks.js +10 -0
  237. package/dist/geo/getTopTracks.js.map +1 -1
  238. package/dist/getFriends.js +6 -3
  239. package/dist/getFriends.js.map +1 -1
  240. package/dist/getInfo.js +5 -3
  241. package/dist/getInfo.js.map +1 -1
  242. package/dist/getLovedTracks.js +7 -3
  243. package/dist/getLovedTracks.js.map +1 -1
  244. package/dist/getRecentTracks.js +7 -3
  245. package/dist/getRecentTracks.js.map +1 -1
  246. package/dist/getTopAlbums.js +7 -3
  247. package/dist/getTopAlbums.js.map +1 -1
  248. package/dist/getTopArtists.js +7 -3
  249. package/dist/getTopArtists.js.map +1 -1
  250. package/dist/getTopTracks.js +7 -3
  251. package/dist/getTopTracks.js.map +1 -1
  252. package/dist/getUserTopTags.js +6 -3
  253. package/dist/getUserTopTags.js.map +1 -1
  254. package/dist/getWeeklyAlbumChart.js +7 -3
  255. package/dist/getWeeklyAlbumChart.js.map +1 -1
  256. package/dist/getWeeklyArtistChart.js +7 -3
  257. package/dist/getWeeklyArtistChart.js.map +1 -1
  258. package/dist/getWeeklyChartList.js +8 -3
  259. package/dist/getWeeklyChartList.js.map +1 -1
  260. package/dist/getWeeklyTrackChart.js +7 -3
  261. package/dist/getWeeklyTrackChart.js.map +1 -1
  262. package/dist/index.js +21 -0
  263. package/dist/index.js.map +1 -1
  264. package/dist/library/getArtists.js +10 -0
  265. package/dist/library/getArtists.js.map +1 -1
  266. package/dist/method.js +11 -0
  267. package/dist/method.js.map +1 -1
  268. package/dist/request.js +30 -0
  269. package/dist/request.js.map +1 -1
  270. package/dist/tag/getInfo.js +9 -0
  271. package/dist/tag/getInfo.js.map +1 -1
  272. package/dist/tag/getSimilar.js +8 -0
  273. package/dist/tag/getSimilar.js.map +1 -1
  274. package/dist/tag/getTopAlbums.js +10 -0
  275. package/dist/tag/getTopAlbums.js.map +1 -1
  276. package/dist/tag/getTopArtists.js +10 -0
  277. package/dist/tag/getTopArtists.js.map +1 -1
  278. package/dist/tag/getTopTags.js +7 -0
  279. package/dist/tag/getTopTags.js.map +1 -1
  280. package/dist/tag/getWeeklyChartList.js +9 -0
  281. package/dist/tag/getWeeklyChartList.js.map +1 -1
  282. package/dist/tag/topTracks.js +6 -3
  283. package/dist/tag/topTracks.js.map +1 -1
  284. package/dist/track/addTags.js +11 -0
  285. package/dist/track/addTags.js.map +1 -1
  286. package/dist/track/getCorrection.js +10 -0
  287. package/dist/track/getCorrection.js.map +1 -1
  288. package/dist/track/getInfo.js +11 -0
  289. package/dist/track/getInfo.js.map +1 -1
  290. package/dist/track/getSimilar.js +11 -0
  291. package/dist/track/getSimilar.js.map +1 -1
  292. package/dist/track/getTags.js +11 -0
  293. package/dist/track/getTags.js.map +1 -1
  294. package/dist/track/getTopTags.js +10 -0
  295. package/dist/track/getTopTags.js.map +1 -1
  296. package/dist/track/love.js +10 -0
  297. package/dist/track/love.js.map +1 -1
  298. package/dist/track/removeTag.js +11 -0
  299. package/dist/track/removeTag.js.map +1 -1
  300. package/dist/track/scrobble.js +12 -0
  301. package/dist/track/scrobble.js.map +1 -1
  302. package/dist/track/search.js +11 -0
  303. package/dist/track/search.js.map +1 -1
  304. package/dist/track/unlove.js +10 -0
  305. package/dist/track/unlove.js.map +1 -1
  306. package/dist/track/updateNowPlaying.js +11 -0
  307. package/dist/track/updateNowPlaying.js.map +1 -1
  308. package/dist/user/getPersonalTags.js +12 -0
  309. package/dist/user/getPersonalTags.js.map +1 -1
  310. 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
- * GET: Tag Top Tracks - LastFM
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
- * @returns Top Tracks for a tag
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>;
@@ -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;AACtC,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"}
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"}
@@ -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;AACpC,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"}
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"}
@@ -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;AACpC,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"}
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"}
@@ -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;AACpC,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"}
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"}
@@ -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;AACtC,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"}
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"}
@@ -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
  }
@@ -1 +1 @@
1
- {"version":3,"file":"search.js","sourceRoot":"","sources":["../../src/album/search.ts"],"names":[],"mappings":"AACA,OAAO,OAAO,MAAM,eAAe,CAAC;AACpC,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"}
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"}
@@ -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;AACtC,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
+ {"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;AACpC,MAAM,CAAC,KAAK,UAAU,mBAAmB,CAAC,MAAc,EAAE,MAAc;IACtE,OAAO,MAAM,OAAO,CAA2B,EAAE,MAAM,EAAE,MAAM,EAAE,CAAC,CAAC;AACrE,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"}
@@ -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;AACpC,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
+ {"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;AACpC,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"}
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"}
@@ -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;AACpC,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
+ {"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;AACpC,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
+ {"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;AACpC,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
+ {"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;AACpC,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
+ {"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"}
@@ -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;AACtC,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"}
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"}
@@ -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;AACpC,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
+ {"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;AACtC,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"}
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"}
@@ -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
  }