@ansango/lastfm-api 3.1.3 → 3.3.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/CHANGELOG.md +54 -0
- package/README.md +150 -15
- package/dist/client.d.ts +1 -1
- package/dist/client.d.ts.map +1 -1
- package/dist/client.js +2 -2
- package/dist/client.js.map +1 -1
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js +2 -2
- package/dist/config.js.map +1 -1
- package/dist/entrypoints/album.d.ts +1 -1
- package/dist/entrypoints/album.d.ts.map +1 -1
- package/dist/entrypoints/album.js.map +1 -1
- package/dist/entrypoints/album.schemas.d.ts.map +1 -1
- package/dist/entrypoints/album.schemas.js.map +1 -1
- package/dist/entrypoints/artist.d.ts +1 -1
- package/dist/entrypoints/artist.d.ts.map +1 -1
- package/dist/entrypoints/artist.js.map +1 -1
- package/dist/entrypoints/artist.schemas.d.ts.map +1 -1
- package/dist/entrypoints/artist.schemas.js.map +1 -1
- package/dist/entrypoints/auth.d.ts +1 -1
- package/dist/entrypoints/auth.d.ts.map +1 -1
- package/dist/entrypoints/auth.js.map +1 -1
- package/dist/entrypoints/auth.schemas.d.ts.map +1 -1
- package/dist/entrypoints/auth.schemas.js.map +1 -1
- package/dist/entrypoints/base.schemas.d.ts.map +1 -1
- package/dist/entrypoints/base.schemas.js.map +1 -1
- package/dist/entrypoints/chart.d.ts +1 -1
- package/dist/entrypoints/chart.d.ts.map +1 -1
- package/dist/entrypoints/chart.js.map +1 -1
- package/dist/entrypoints/chart.schemas.d.ts.map +1 -1
- package/dist/entrypoints/chart.schemas.js.map +1 -1
- package/dist/entrypoints/geo.d.ts.map +1 -1
- package/dist/entrypoints/geo.js.map +1 -1
- package/dist/entrypoints/geo.schemas.d.ts.map +1 -1
- package/dist/entrypoints/geo.schemas.js.map +1 -1
- package/dist/entrypoints/library.d.ts.map +1 -1
- package/dist/entrypoints/library.js.map +1 -1
- package/dist/entrypoints/library.schemas.d.ts.map +1 -1
- package/dist/entrypoints/library.schemas.js.map +1 -1
- package/dist/entrypoints/tag.d.ts.map +1 -1
- package/dist/entrypoints/tag.js.map +1 -1
- package/dist/entrypoints/tag.schemas.d.ts.map +1 -1
- package/dist/entrypoints/tag.schemas.js.map +1 -1
- package/dist/entrypoints/track.d.ts.map +1 -1
- package/dist/entrypoints/track.js.map +1 -1
- package/dist/entrypoints/track.schemas.d.ts.map +1 -1
- package/dist/entrypoints/track.schemas.js.map +1 -1
- package/dist/entrypoints/user.d.ts.map +1 -1
- package/dist/entrypoints/user.js.map +1 -1
- package/dist/entrypoints/user.schemas.d.ts.map +1 -1
- package/dist/entrypoints/user.schemas.js.map +1 -1
- package/dist/index.d.ts +18 -18
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +10 -10
- package/dist/index.js.map +1 -1
- package/dist/services/album.d.ts +41 -1
- package/dist/services/album.d.ts.map +1 -1
- package/dist/services/album.js +35 -2
- package/dist/services/album.js.map +1 -1
- package/dist/services/album.schemas.d.ts +51 -12
- package/dist/services/album.schemas.d.ts.map +1 -1
- package/dist/services/album.schemas.js +48 -10
- package/dist/services/album.schemas.js.map +1 -1
- package/dist/services/artist.d.ts +48 -1
- package/dist/services/artist.d.ts.map +1 -1
- package/dist/services/artist.js +34 -2
- package/dist/services/artist.js.map +1 -1
- package/dist/services/artist.schemas.d.ts +99 -25
- package/dist/services/artist.schemas.d.ts.map +1 -1
- package/dist/services/artist.schemas.js +125 -60
- package/dist/services/artist.schemas.js.map +1 -1
- package/dist/services/auth.d.ts +35 -1
- package/dist/services/auth.d.ts.map +1 -1
- package/dist/services/auth.js +19 -2
- package/dist/services/auth.js.map +1 -1
- package/dist/services/auth.schemas.d.ts +10 -1
- package/dist/services/auth.schemas.d.ts.map +1 -1
- package/dist/services/auth.schemas.js +13 -2
- package/dist/services/auth.schemas.js.map +1 -1
- package/dist/services/chart.d.ts +1 -1
- package/dist/services/chart.d.ts.map +1 -1
- package/dist/services/chart.js +2 -2
- package/dist/services/chart.js.map +1 -1
- package/dist/services/chart.schemas.d.ts +6 -6
- package/dist/services/chart.schemas.d.ts.map +1 -1
- package/dist/services/chart.schemas.js +21 -21
- package/dist/services/chart.schemas.js.map +1 -1
- package/dist/services/geo.d.ts +1 -1
- package/dist/services/geo.d.ts.map +1 -1
- package/dist/services/geo.js +2 -2
- package/dist/services/geo.js.map +1 -1
- package/dist/services/geo.schemas.d.ts +6 -6
- package/dist/services/geo.schemas.d.ts.map +1 -1
- package/dist/services/geo.schemas.js +17 -17
- package/dist/services/geo.schemas.js.map +1 -1
- package/dist/services/index.d.ts +12 -12
- package/dist/services/index.d.ts.map +1 -1
- package/dist/services/index.js +13 -13
- package/dist/services/index.js.map +1 -1
- package/dist/services/library.d.ts +1 -1
- package/dist/services/library.d.ts.map +1 -1
- package/dist/services/library.js +2 -2
- package/dist/services/library.js.map +1 -1
- package/dist/services/library.schemas.d.ts +3 -3
- package/dist/services/library.schemas.d.ts.map +1 -1
- package/dist/services/library.schemas.js +8 -8
- package/dist/services/library.schemas.js.map +1 -1
- package/dist/services/schemas/base.entities.schemas.d.ts +3 -3
- package/dist/services/schemas/base.entities.schemas.d.ts.map +1 -1
- package/dist/services/schemas/base.entities.schemas.js +9 -9
- package/dist/services/schemas/base.entities.schemas.js.map +1 -1
- package/dist/services/schemas/base.entity-names.schemas.d.ts +1 -1
- package/dist/services/schemas/base.entity-names.schemas.d.ts.map +1 -1
- package/dist/services/schemas/base.entity-names.schemas.js +1 -1
- package/dist/services/schemas/base.entity-names.schemas.js.map +1 -1
- package/dist/services/schemas/base.metadata.schemas.d.ts +1 -1
- package/dist/services/schemas/base.metadata.schemas.d.ts.map +1 -1
- package/dist/services/schemas/base.metadata.schemas.js +1 -1
- package/dist/services/schemas/base.metadata.schemas.js.map +1 -1
- package/dist/services/schemas/base.pagination.schemas.d.ts +1 -1
- package/dist/services/schemas/base.pagination.schemas.d.ts.map +1 -1
- package/dist/services/schemas/base.pagination.schemas.js +1 -1
- package/dist/services/schemas/base.pagination.schemas.js.map +1 -1
- package/dist/services/schemas/base.primitives.schemas.d.ts +3 -1
- package/dist/services/schemas/base.primitives.schemas.d.ts.map +1 -1
- package/dist/services/schemas/base.primitives.schemas.js +8 -7
- package/dist/services/schemas/base.primitives.schemas.js.map +1 -1
- package/dist/services/schemas/index.d.ts +5 -5
- package/dist/services/schemas/index.d.ts.map +1 -1
- package/dist/services/schemas/index.js +5 -5
- package/dist/services/schemas/index.js.map +1 -1
- package/dist/services/tag.d.ts +1 -1
- package/dist/services/tag.d.ts.map +1 -1
- package/dist/services/tag.js +2 -2
- package/dist/services/tag.js.map +1 -1
- package/dist/services/tag.schemas.d.ts +13 -13
- package/dist/services/tag.schemas.d.ts.map +1 -1
- package/dist/services/tag.schemas.js +50 -50
- package/dist/services/tag.schemas.js.map +1 -1
- package/dist/services/track.d.ts +122 -4
- package/dist/services/track.d.ts.map +1 -1
- package/dist/services/track.js +79 -10
- package/dist/services/track.js.map +1 -1
- package/dist/services/track.schemas.d.ts +213 -25
- package/dist/services/track.schemas.d.ts.map +1 -1
- package/dist/services/track.schemas.js +206 -57
- package/dist/services/track.schemas.js.map +1 -1
- package/dist/services/track.utils.d.ts +16 -7
- package/dist/services/track.utils.d.ts.map +1 -1
- package/dist/services/track.utils.js +49 -48
- package/dist/services/track.utils.js.map +1 -1
- package/dist/services/user.d.ts +19 -1
- package/dist/services/user.d.ts.map +1 -1
- package/dist/services/user.js +3 -2
- package/dist/services/user.js.map +1 -1
- package/dist/services/user.schemas.d.ts +321 -63
- package/dist/services/user.schemas.d.ts.map +1 -1
- package/dist/services/user.schemas.js +197 -88
- package/dist/services/user.schemas.js.map +1 -1
- package/dist/utils.d.ts +37 -2
- package/dist/utils.d.ts.map +1 -1
- package/dist/utils.js +105 -20
- package/dist/utils.js.map +1 -1
- package/package.json +167 -154
- package/dist/__tests__/utils.test.d.ts +0 -2
- package/dist/__tests__/utils.test.d.ts.map +0 -1
- package/dist/__tests__/utils.test.js +0 -86
- package/dist/__tests__/utils.test.js.map +0 -1
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { z } from
|
|
2
|
-
import { albumNameSchema, artistNameSchema, contentSchema, countSchema, durationSchema, imageSchema, itemsPerPageSchema, limitSchema, listenersSchema, matchSchema, mbidSchema, pageSchema, playcountSchema, positionSchema, publishedSchema, roleSchema, searchTermsSchema, startIndexSchema, startPageSchema, summarySchema, tagNameSchema, totalResultsSchema, trackNameSchema, urlSchema, userNameSchema, } from
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { albumNameSchema, artistNameSchema, contentSchema, countSchema, durationSchema, imageSchema, itemsPerPageSchema, limitSchema, listenersSchema, matchSchema, mbidSchema, pageSchema, playcountSchema, positionSchema, publishedSchema, roleSchema, searchTermsSchema, startIndexSchema, startPageSchema, summarySchema, tagNameSchema, totalResultsSchema, trackNameSchema, urlSchema, userNameSchema, } from './schemas/index.js';
|
|
3
3
|
export const trackArtistSchema = z.object({
|
|
4
4
|
name: artistNameSchema,
|
|
5
5
|
mbid: mbidSchema,
|
|
6
|
-
url: urlSchema
|
|
6
|
+
url: urlSchema,
|
|
7
7
|
});
|
|
8
8
|
export const trackAlbumSchema = z.object({
|
|
9
9
|
artist: artistNameSchema,
|
|
@@ -11,20 +11,20 @@ export const trackAlbumSchema = z.object({
|
|
|
11
11
|
mbid: mbidSchema,
|
|
12
12
|
url: urlSchema,
|
|
13
13
|
image: z.array(imageSchema),
|
|
14
|
-
|
|
15
|
-
position: positionSchema
|
|
16
|
-
})
|
|
14
|
+
'@attr': z.object({
|
|
15
|
+
position: positionSchema,
|
|
16
|
+
}),
|
|
17
17
|
});
|
|
18
18
|
export const trackTopTagSchema = z.object({
|
|
19
19
|
tag: z.array(z.object({
|
|
20
20
|
name: tagNameSchema,
|
|
21
|
-
url: urlSchema
|
|
22
|
-
}))
|
|
21
|
+
url: urlSchema,
|
|
22
|
+
})),
|
|
23
23
|
});
|
|
24
24
|
export const trackWikiSchema = z.object({
|
|
25
25
|
published: publishedSchema,
|
|
26
26
|
summary: summarySchema,
|
|
27
|
-
content: contentSchema
|
|
27
|
+
content: contentSchema,
|
|
28
28
|
});
|
|
29
29
|
/**
|
|
30
30
|
* Track
|
|
@@ -41,22 +41,22 @@ export const trackSchema = z.object({
|
|
|
41
41
|
album: trackAlbumSchema,
|
|
42
42
|
topTags: trackTopTagSchema,
|
|
43
43
|
wiki: trackWikiSchema,
|
|
44
|
-
userplaycount: playcountSchema
|
|
44
|
+
userplaycount: playcountSchema,
|
|
45
45
|
});
|
|
46
46
|
export const trackGetInfoRequestSchema = z.object({
|
|
47
47
|
artist: artistNameSchema,
|
|
48
48
|
track: trackNameSchema,
|
|
49
49
|
mbid: mbidSchema.optional(),
|
|
50
|
-
username: userNameSchema.optional()
|
|
50
|
+
username: userNameSchema.optional(),
|
|
51
51
|
});
|
|
52
52
|
export const trackGetInfoResponseSchema = z.object({
|
|
53
|
-
track: trackSchema
|
|
53
|
+
track: trackSchema,
|
|
54
54
|
});
|
|
55
55
|
export const trackGetSimilarRequestSchema = z.object({
|
|
56
56
|
artist: artistNameSchema,
|
|
57
57
|
track: trackNameSchema,
|
|
58
58
|
mbid: mbidSchema.optional(),
|
|
59
|
-
limit: limitSchema.optional()
|
|
59
|
+
limit: limitSchema.optional(),
|
|
60
60
|
});
|
|
61
61
|
export const trackGetSimilarResponseSchema = z.object({
|
|
62
62
|
similartracks: z.object({
|
|
@@ -70,68 +70,68 @@ export const trackGetSimilarResponseSchema = z.object({
|
|
|
70
70
|
artist: z.object({
|
|
71
71
|
name: artistNameSchema,
|
|
72
72
|
mbid: mbidSchema,
|
|
73
|
-
url: urlSchema
|
|
73
|
+
url: urlSchema,
|
|
74
74
|
}),
|
|
75
|
-
image: z.array(imageSchema)
|
|
75
|
+
image: z.array(imageSchema),
|
|
76
76
|
})),
|
|
77
|
-
|
|
78
|
-
artist: artistNameSchema
|
|
79
|
-
})
|
|
80
|
-
})
|
|
77
|
+
'@attr': z.object({
|
|
78
|
+
artist: artistNameSchema,
|
|
79
|
+
}),
|
|
80
|
+
}),
|
|
81
81
|
});
|
|
82
82
|
export const trackGetTagsRequestSchema = z.object({
|
|
83
83
|
artist: artistNameSchema,
|
|
84
84
|
track: trackNameSchema,
|
|
85
85
|
mbid: mbidSchema.optional(),
|
|
86
|
-
user: userNameSchema.optional()
|
|
86
|
+
user: userNameSchema.optional(),
|
|
87
87
|
});
|
|
88
88
|
export const trackGetTagsResponseSchema = z.object({
|
|
89
89
|
tags: z.object({
|
|
90
90
|
tag: z.array(z.object({
|
|
91
91
|
name: tagNameSchema,
|
|
92
|
-
url: urlSchema
|
|
92
|
+
url: urlSchema,
|
|
93
93
|
})),
|
|
94
|
-
|
|
94
|
+
'@attr': z.object({
|
|
95
95
|
artist: artistNameSchema,
|
|
96
|
-
track: trackNameSchema
|
|
97
|
-
})
|
|
98
|
-
})
|
|
96
|
+
track: trackNameSchema,
|
|
97
|
+
}),
|
|
98
|
+
}),
|
|
99
99
|
});
|
|
100
100
|
export const trackGetTopTagsRequestSchema = z.object({
|
|
101
101
|
artist: artistNameSchema,
|
|
102
102
|
track: trackNameSchema,
|
|
103
|
-
mbid: mbidSchema.optional()
|
|
103
|
+
mbid: mbidSchema.optional(),
|
|
104
104
|
});
|
|
105
105
|
export const trackGetTopTagsResponseSchema = z.object({
|
|
106
106
|
toptags: z.object({
|
|
107
107
|
tag: z.array(z.object({
|
|
108
108
|
name: tagNameSchema,
|
|
109
109
|
url: urlSchema,
|
|
110
|
-
count: countSchema
|
|
110
|
+
count: countSchema,
|
|
111
111
|
})),
|
|
112
|
-
|
|
112
|
+
'@attr': z.object({
|
|
113
113
|
artist: artistNameSchema,
|
|
114
|
-
track: trackNameSchema
|
|
115
|
-
})
|
|
116
|
-
})
|
|
114
|
+
track: trackNameSchema,
|
|
115
|
+
}),
|
|
116
|
+
}),
|
|
117
117
|
});
|
|
118
118
|
export const trackSearchRequestSchema = z.object({
|
|
119
119
|
track: trackNameSchema,
|
|
120
120
|
limit: limitSchema.optional(),
|
|
121
121
|
page: pageSchema.optional(),
|
|
122
|
-
artist: artistNameSchema.optional()
|
|
122
|
+
artist: artistNameSchema.optional(),
|
|
123
123
|
});
|
|
124
124
|
export const trackSearchResponseSchema = z.object({
|
|
125
125
|
results: z.object({
|
|
126
|
-
|
|
127
|
-
|
|
126
|
+
'opensearch:Query': z.object({
|
|
127
|
+
'#text': z.string(),
|
|
128
128
|
role: roleSchema,
|
|
129
129
|
searchTerms: searchTermsSchema,
|
|
130
|
-
startPage: startPageSchema
|
|
130
|
+
startPage: startPageSchema,
|
|
131
131
|
}),
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
132
|
+
'opensearch:totalResults': totalResultsSchema,
|
|
133
|
+
'opensearch:startIndex': startIndexSchema,
|
|
134
|
+
'opensearch:itemsPerPage': itemsPerPageSchema,
|
|
135
135
|
trackmatches: z.object({
|
|
136
136
|
track: z.array(z.object({
|
|
137
137
|
name: trackNameSchema,
|
|
@@ -139,53 +139,202 @@ export const trackSearchResponseSchema = z.object({
|
|
|
139
139
|
url: urlSchema,
|
|
140
140
|
listeners: listenersSchema,
|
|
141
141
|
image: z.array(imageSchema),
|
|
142
|
-
mbid: mbidSchema
|
|
143
|
-
}))
|
|
142
|
+
mbid: mbidSchema,
|
|
143
|
+
})),
|
|
144
144
|
}),
|
|
145
|
-
|
|
146
|
-
for: z.string()
|
|
147
|
-
})
|
|
145
|
+
'@attr': z.object({
|
|
146
|
+
for: z.string(),
|
|
147
|
+
}),
|
|
148
|
+
}),
|
|
149
|
+
});
|
|
150
|
+
/**
|
|
151
|
+
* Track correction entry returned by `track.getCorrection`.
|
|
152
|
+
*
|
|
153
|
+
* Each entry carries the canonical track and artist identities
|
|
154
|
+
* (`name`, `mbid`, `url`) and per-field "corrected" flags plus a
|
|
155
|
+
* positional `index` attribute indicating which input this correction
|
|
156
|
+
* maps to.
|
|
157
|
+
*
|
|
158
|
+
* The `corrected` flags and the `index` are sent by Last.fm as JSON
|
|
159
|
+
* strings ("0" / "1") — we accept them as strings.
|
|
160
|
+
* https://www.last.fm/api/show/track.getCorrection
|
|
161
|
+
*/
|
|
162
|
+
export const trackCorrectionSchema = z.object({
|
|
163
|
+
track: z.object({
|
|
164
|
+
name: trackNameSchema,
|
|
165
|
+
mbid: mbidSchema,
|
|
166
|
+
url: urlSchema,
|
|
167
|
+
}),
|
|
168
|
+
artist: z.object({
|
|
169
|
+
name: artistNameSchema,
|
|
170
|
+
mbid: mbidSchema,
|
|
171
|
+
url: urlSchema,
|
|
172
|
+
}),
|
|
173
|
+
artistcorrected: z.string().optional(),
|
|
174
|
+
trackcorrected: z.string().optional(),
|
|
175
|
+
'@attr': z
|
|
176
|
+
.object({
|
|
177
|
+
index: z.string(),
|
|
148
178
|
})
|
|
179
|
+
.optional(),
|
|
180
|
+
});
|
|
181
|
+
export const trackGetCorrectionRequestSchema = z.object({
|
|
182
|
+
artist: artistNameSchema,
|
|
183
|
+
track: trackNameSchema,
|
|
184
|
+
});
|
|
185
|
+
export const trackGetCorrectionResponseSchema = z.object({
|
|
186
|
+
corrections: z.object({
|
|
187
|
+
correction: z.array(trackCorrectionSchema),
|
|
188
|
+
'@attr': z
|
|
189
|
+
.object({
|
|
190
|
+
artist: artistNameSchema,
|
|
191
|
+
track: trackNameSchema,
|
|
192
|
+
})
|
|
193
|
+
.optional(),
|
|
194
|
+
}),
|
|
149
195
|
});
|
|
150
196
|
export const trackScrobbleRequestSchema = z.object({
|
|
151
197
|
artist: artistNameSchema,
|
|
152
198
|
track: trackNameSchema,
|
|
153
|
-
timestamp: z.string(),
|
|
199
|
+
timestamp: z.union([z.string(), z.number()]),
|
|
154
200
|
sk: z.string().optional(),
|
|
155
|
-
album: albumNameSchema.optional()
|
|
201
|
+
album: albumNameSchema.optional(),
|
|
156
202
|
});
|
|
157
203
|
export const trackScrobbleResponseSchema = z.object({
|
|
158
204
|
scrobbles: z.object({
|
|
159
205
|
scrobble: z.object({
|
|
160
206
|
artist: z.object({
|
|
161
207
|
corrected: z.string(),
|
|
162
|
-
|
|
208
|
+
'#text': artistNameSchema,
|
|
163
209
|
}),
|
|
164
210
|
album: z.object({
|
|
165
|
-
corrected: z.string()
|
|
211
|
+
corrected: z.string(),
|
|
166
212
|
}),
|
|
167
213
|
track: z.object({
|
|
168
214
|
corrected: z.string(),
|
|
169
|
-
|
|
215
|
+
'#text': trackNameSchema,
|
|
170
216
|
}),
|
|
171
217
|
ignoredMessage: z.object({
|
|
172
218
|
code: z.string(),
|
|
173
|
-
|
|
219
|
+
'#text': z.string(),
|
|
174
220
|
}),
|
|
175
221
|
albumArtist: z.object({
|
|
176
222
|
corrected: z.string(),
|
|
177
|
-
|
|
223
|
+
'#text': albumNameSchema,
|
|
178
224
|
}),
|
|
179
|
-
timestamp: z.string()
|
|
225
|
+
timestamp: z.string(),
|
|
180
226
|
}),
|
|
181
|
-
|
|
227
|
+
'@attr': z.object({
|
|
182
228
|
accepted: z.number(),
|
|
183
|
-
ignored: z.number()
|
|
184
|
-
})
|
|
185
|
-
})
|
|
229
|
+
ignored: z.number(),
|
|
230
|
+
}),
|
|
231
|
+
}),
|
|
186
232
|
});
|
|
187
233
|
export const batchTracksScrobbleRequestSchema = z.object({
|
|
188
|
-
tracks: z.array(trackScrobbleRequestSchema.omit({
|
|
189
|
-
sk: z.string().optional()
|
|
234
|
+
tracks: z.array(trackScrobbleRequestSchema.omit({ sk: true })),
|
|
235
|
+
sk: z.string().optional(),
|
|
236
|
+
});
|
|
237
|
+
/**
|
|
238
|
+
* Maximum number of tags accepted by `track.addTags` per the Last.fm
|
|
239
|
+
* API documentation.
|
|
240
|
+
*/
|
|
241
|
+
export const MAX_TRACK_TAGS_PER_ADD = 10;
|
|
242
|
+
/**
|
|
243
|
+
* Request shape for `track.addTags`. The `tags` array is sent on the
|
|
244
|
+
* wire as a comma-separated string and validated to at most
|
|
245
|
+
* `MAX_TRACK_TAGS_PER_ADD` entries.
|
|
246
|
+
* https://www.last.fm/api/show/track.addTags
|
|
247
|
+
*/
|
|
248
|
+
export const trackAddTagsRequestSchema = z.object({
|
|
249
|
+
artist: artistNameSchema,
|
|
250
|
+
track: trackNameSchema,
|
|
251
|
+
tags: z.array(tagNameSchema).max(MAX_TRACK_TAGS_PER_ADD, {
|
|
252
|
+
message: `track.addTags accepts at most ${MAX_TRACK_TAGS_PER_ADD} tags per request`,
|
|
253
|
+
}),
|
|
254
|
+
sk: z.string().optional(),
|
|
255
|
+
});
|
|
256
|
+
/**
|
|
257
|
+
* Request shape for `track.removeTag`. A single tag is removed per
|
|
258
|
+
* call.
|
|
259
|
+
* https://www.last.fm/api/show/track.removeTag
|
|
260
|
+
*/
|
|
261
|
+
export const trackRemoveTagRequestSchema = z.object({
|
|
262
|
+
artist: artistNameSchema,
|
|
263
|
+
track: trackNameSchema,
|
|
264
|
+
tag: tagNameSchema,
|
|
265
|
+
sk: z.string().optional(),
|
|
266
|
+
});
|
|
267
|
+
/**
|
|
268
|
+
* Request shape for `track.love` / `track.unlove`. Both share the
|
|
269
|
+
* same body — only the method name changes.
|
|
270
|
+
* https://www.last.fm/api/show/track.love
|
|
271
|
+
* https://www.last.fm/api/show/track.unlove
|
|
272
|
+
*/
|
|
273
|
+
export const trackLoveRequestSchema = z.object({
|
|
274
|
+
artist: artistNameSchema,
|
|
275
|
+
track: trackNameSchema,
|
|
276
|
+
sk: z.string().optional(),
|
|
277
|
+
});
|
|
278
|
+
export const trackUnloveRequestSchema = trackLoveRequestSchema;
|
|
279
|
+
/**
|
|
280
|
+
* Empty success payload for the void tag/love mutations.
|
|
281
|
+
*/
|
|
282
|
+
export const trackMutationResponseSchema = z.unknown();
|
|
283
|
+
/**
|
|
284
|
+
* Request shape for `track.updateNowPlaying`. Optional fields are
|
|
285
|
+
* omitted from both the body and the signature when undefined.
|
|
286
|
+
* https://www.last.fm/api/show/track.updateNowPlaying
|
|
287
|
+
*/
|
|
288
|
+
export const trackUpdateNowPlayingRequestSchema = z.object({
|
|
289
|
+
artist: artistNameSchema,
|
|
290
|
+
track: trackNameSchema,
|
|
291
|
+
album: albumNameSchema.optional(),
|
|
292
|
+
// Wire casing preserved: `trackNumber` and `albumArtist`, not
|
|
293
|
+
// snake_case. The transport's `cleanParams` strips undefined.
|
|
294
|
+
trackNumber: z.union([z.string(), z.number()]).optional(),
|
|
295
|
+
context: z.string().optional(),
|
|
296
|
+
mbid: mbidSchema.optional(),
|
|
297
|
+
duration: z.union([z.string(), z.number()]).optional(),
|
|
298
|
+
albumArtist: artistNameSchema.optional(),
|
|
299
|
+
sk: z.string().optional(),
|
|
300
|
+
});
|
|
301
|
+
/**
|
|
302
|
+
* `{ corrected, "#text" }` payload returned for the textual fields of
|
|
303
|
+
* a now-playing announcement. `corrected` is sent by Last.fm as a
|
|
304
|
+
* JSON string ("0" / "1").
|
|
305
|
+
*/
|
|
306
|
+
export const correctedTextFieldSchema = z.object({
|
|
307
|
+
corrected: z.string(),
|
|
308
|
+
'#text': z.string(),
|
|
309
|
+
});
|
|
310
|
+
/**
|
|
311
|
+
* `{ corrected }` payload for fields that don't carry a `#text`
|
|
312
|
+
* value (e.g. `album` in the now-playing response).
|
|
313
|
+
*/
|
|
314
|
+
export const correctedFlagOnlyFieldSchema = z.object({
|
|
315
|
+
corrected: z.string(),
|
|
316
|
+
});
|
|
317
|
+
/**
|
|
318
|
+
* `ignoredMessage` block returned by the now-playing endpoint when
|
|
319
|
+
* the request is accepted but partially or fully ignored.
|
|
320
|
+
*/
|
|
321
|
+
export const nowPlayingIgnoredMessageSchema = z.object({
|
|
322
|
+
code: z.string(),
|
|
323
|
+
'#text': z.string(),
|
|
324
|
+
});
|
|
325
|
+
/**
|
|
326
|
+
* Response root for `track.updateNowPlaying`. The `nowplaying` block
|
|
327
|
+
* carries the corrected identities and the ignored-message code; all
|
|
328
|
+
* inner fields are optional because Last.fm only echoes the parts
|
|
329
|
+
* that were actually processed.
|
|
330
|
+
*/
|
|
331
|
+
export const trackUpdateNowPlayingResponseSchema = z.object({
|
|
332
|
+
nowplaying: z.object({
|
|
333
|
+
track: correctedTextFieldSchema.optional(),
|
|
334
|
+
artist: correctedTextFieldSchema.optional(),
|
|
335
|
+
album: correctedFlagOnlyFieldSchema.optional(),
|
|
336
|
+
albumArtist: correctedTextFieldSchema.optional(),
|
|
337
|
+
ignoredMessage: nowPlayingIgnoredMessageSchema,
|
|
338
|
+
}),
|
|
190
339
|
});
|
|
191
340
|
//# sourceMappingURL=track.schemas.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"track.schemas.js","sourceRoot":"","sources":["../../src/services/track.schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,
|
|
1
|
+
{"version":3,"file":"track.schemas.js","sourceRoot":"","sources":["../../src/services/track.schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AACvB,OAAO,EACN,eAAe,EACf,gBAAgB,EAChB,aAAa,EACb,WAAW,EACX,cAAc,EACd,WAAW,EACX,kBAAkB,EAClB,WAAW,EACX,eAAe,EACf,WAAW,EACX,UAAU,EACV,UAAU,EACV,eAAe,EACf,cAAc,EACd,eAAe,EACf,UAAU,EACV,iBAAiB,EACjB,gBAAgB,EAChB,eAAe,EACf,aAAa,EACb,aAAa,EACb,kBAAkB,EAClB,eAAe,EACf,SAAS,EACT,cAAc,GACd,MAAM,oBAAoB,CAAA;AAE3B,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC,CAAC,MAAM,CAAC;IACzC,IAAI,EAAE,gBAAgB;IACtB,IAAI,EAAE,UAAU;IAChB,GAAG,EAAE,SAAS;CACd,CAAC,CAAA;AAEF,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,CAAC,MAAM,CAAC;IACxC,MAAM,EAAE,gBAAgB;IACxB,KAAK,EAAE,eAAe;IACtB,IAAI,EAAE,UAAU;IAChB,GAAG,EAAE,SAAS;IACd,KAAK,EAAE,CAAC,CAAC,KAAK,CAAC,WA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,EAAE,CAAC,CAAC,MAAM,EAAE;CACnB,CAAC,CAAA;AAEF;;;GAGG;AACH,MAAM,CAAC,MAAM,4BAA4B,GAAG,CAAC,CAAC,MAAM,CAAC;IACpD,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE;CACrB,CAAC,CAAA;AAEF;;;GAGG;AACH,MAAM,CAAC,MAAM,8BAA8B,GAAG,CAAC,CAAC,MAAM,CAAC;IACtD,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE;IAChB,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE;CACnB,CAAC,CAAA;AAEF;;;;;GAKG;AACH,MAAM,CAAC,MAAM,mCAAmC,GAAG,CAAC,CAAC,MAAM,CAAC;IAC3D,UAAU,EAAE,CAAC,CAAC,MAAM,CAAC;QACpB,KAAK,EAAE,wBAAwB,CAAC,QAAQ,EAAE;QAC1C,MAAM,EAAE,wBAAwB,CAAC,QAAQ,EAAE;QAC3C,KAAK,EAAE,4BAA4B,CAAC,QAAQ,EAAE;QAC9C,WAAW,EAAE,wBAAwB,CAAC,QAAQ,EAAE;QAChD,cAAc,EAAE,8BAA8B;KAC9C,CAAC;CACF,CAAC,CAAA"}
|
|
@@ -1,10 +1,19 @@
|
|
|
1
1
|
import type { LastFmConfig } from '../config.js';
|
|
2
2
|
import type { BatchTracksScrobbleRequest, TrackScrobbleRequest } from './track.schemas.js';
|
|
3
|
-
export declare const
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
3
|
+
export declare const MAX_BATCH_SCROBBLE_SIZE = 50;
|
|
4
|
+
/**
|
|
5
|
+
* Build the wire-format params for a single `track.scrobble` call. The
|
|
6
|
+
* result is ready to be passed to `signedPost` as `params`. The transport
|
|
7
|
+
* adds `method`, `api_key`, `api_sig`, and `format=json` and computes the
|
|
8
|
+
* signature.
|
|
9
|
+
*/
|
|
10
|
+
export declare function buildScrobbleParams(config: LastFmConfig, { artist, track, album, timestamp, sk }: TrackScrobbleRequest): Record<string, string>;
|
|
11
|
+
/**
|
|
12
|
+
* Build the wire-format params for a batch `track.scrobble` call. Last.fm
|
|
13
|
+
* accepts at most 50 tracks per request and uses indexed keys such as
|
|
14
|
+
* `artist[0]`, `track[0]`, `timestamp[0]`, `album[0]`. The transport adds
|
|
15
|
+
* `method`, `api_key`, `api_sig`, and `format=json` and computes the
|
|
16
|
+
* signature.
|
|
17
|
+
*/
|
|
18
|
+
export declare function buildBatchScrobbleParams(config: LastFmConfig, { tracks, sk }: BatchTracksScrobbleRequest): Record<string, string>;
|
|
10
19
|
//# sourceMappingURL=track.utils.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"track.utils.d.ts","sourceRoot":"","sources":["../../src/services/track.utils.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"track.utils.d.ts","sourceRoot":"","sources":["../../src/services/track.utils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,cAAc,CAAA;AAChD,OAAO,KAAK,EAAE,0BAA0B,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAA;AAE1F,eAAO,MAAM,uBAAuB,KAAK,CAAA;AAiBzC;;;;;GAKG;AACH,wBAAgB,mBAAmB,CAClC,MAAM,EAAE,YAAY,EACpB,EAAE,MAAM,EAAE,KAAK,EAAE,KAAK,EAAE,SAAS,EAAE,EAAE,EAAE,EAAE,oBAAoB,GAC3D,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAUxB;AAED;;;;;;GAMG;AACH,wBAAgB,wBAAwB,CACvC,MAAM,EAAE,YAAY,EACpB,EAAE,MAAM,EAAE,EAAE,EAAE,EAAE,0BAA0B,GACxC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAgBxB"}
|
|
@@ -1,56 +1,57 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
export const MAX_BATCH_SCROBBLE_SIZE = 50;
|
|
2
|
+
/**
|
|
3
|
+
* Resolves the session key for a scrobble request and validates it.
|
|
4
|
+
* Returns a sanitized error message that does not include the
|
|
5
|
+
* session key or any other request value.
|
|
6
|
+
*/
|
|
7
|
+
function resolveSessionKey(config, requestSk) {
|
|
8
|
+
const sk = requestSk ?? config.sessionKey;
|
|
5
9
|
if (!sk) {
|
|
6
10
|
throw new Error('A session key (`sk`) is required to scrobble. Pass `sk` in the request params or set `sessionKey` on the LastFmConfig.');
|
|
7
11
|
}
|
|
8
|
-
|
|
12
|
+
return sk;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Build the wire-format params for a single `track.scrobble` call. The
|
|
16
|
+
* result is ready to be passed to `signedPost` as `params`. The transport
|
|
17
|
+
* adds `method`, `api_key`, `api_sig`, and `format=json` and computes the
|
|
18
|
+
* signature.
|
|
19
|
+
*/
|
|
20
|
+
export function buildScrobbleParams(config, { artist, track, album, timestamp, sk }) {
|
|
21
|
+
const resolvedSk = resolveSessionKey(config, sk);
|
|
22
|
+
const params = {
|
|
23
|
+
artist,
|
|
24
|
+
track,
|
|
25
|
+
timestamp: String(timestamp),
|
|
26
|
+
sk: resolvedSk,
|
|
27
|
+
};
|
|
9
28
|
if (album)
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
29
|
+
params.album = album;
|
|
30
|
+
return params;
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* Build the wire-format params for a batch `track.scrobble` call. Last.fm
|
|
34
|
+
* accepts at most 50 tracks per request and uses indexed keys such as
|
|
35
|
+
* `artist[0]`, `track[0]`, `timestamp[0]`, `album[0]`. The transport adds
|
|
36
|
+
* `method`, `api_key`, `api_sig`, and `format=json` and computes the
|
|
37
|
+
* signature.
|
|
38
|
+
*/
|
|
39
|
+
export function buildBatchScrobbleParams(config, { tracks, sk }) {
|
|
40
|
+
if (tracks.length === 0) {
|
|
41
|
+
throw new Error('At least one track is required for batch scrobble');
|
|
21
42
|
}
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
throw new Error('A session key (`sk`) is required to scrobble. Pass `sk` in the request params or set `sessionKey` on the LastFmConfig.');
|
|
43
|
+
if (tracks.length > MAX_BATCH_SCROBBLE_SIZE) {
|
|
44
|
+
throw new Error(`Max ${MAX_BATCH_SCROBBLE_SIZE} tracks per request (got ${tracks.length})`);
|
|
25
45
|
}
|
|
26
|
-
const
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
params[`timestamp[${index}]`] = track.timestamp;
|
|
35
|
-
if (track.album) {
|
|
36
|
-
params[`album[${index}]`] = track.album;
|
|
37
|
-
}
|
|
38
|
-
});
|
|
39
|
-
const api_sig = generateSignature(config, params);
|
|
40
|
-
params.api_sig = api_sig;
|
|
41
|
-
const body = Object.keys(params)
|
|
42
|
-
.map((key) => encodeURIComponent(key) + '=' + encodeURIComponent(params[key]))
|
|
43
|
-
.join('&');
|
|
44
|
-
return body;
|
|
45
|
-
};
|
|
46
|
-
export const batchFetcher = async (config, { body }) => {
|
|
47
|
-
const response = await fetch(config.baseUrl, {
|
|
48
|
-
method: 'POST',
|
|
49
|
-
headers: {
|
|
50
|
-
'Content-Type': 'application/x-www-form-urlencoded'
|
|
51
|
-
},
|
|
52
|
-
body
|
|
46
|
+
const resolvedSk = resolveSessionKey(config, sk);
|
|
47
|
+
const params = { sk: resolvedSk };
|
|
48
|
+
tracks.forEach((t, i) => {
|
|
49
|
+
params[`artist[${i}]`] = t.artist;
|
|
50
|
+
params[`track[${i}]`] = t.track;
|
|
51
|
+
params[`timestamp[${i}]`] = String(t.timestamp);
|
|
52
|
+
if (t.album)
|
|
53
|
+
params[`album[${i}]`] = t.album;
|
|
53
54
|
});
|
|
54
|
-
return
|
|
55
|
-
}
|
|
55
|
+
return params;
|
|
56
|
+
}
|
|
56
57
|
//# sourceMappingURL=track.utils.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"track.utils.js","sourceRoot":"","sources":["../../src/services/track.utils.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"track.utils.js","sourceRoot":"","sources":["../../src/services/track.utils.ts"],"names":[],"mappings":"AAGA,MAAM,CAAC,MAAM,uBAAuB,GAAG,EAAE,CAAA;AAEzC;;;;GAIG;AACH,SAAS,iBAAiB,CAAC,MAAoB,EAAE,SAA6B;IAC7E,MAAM,EAAE,GAAG,SAAS,IAAI,MAAM,CAAC,UAAU,CAAA;IACzC,IAAI,CAAC,EAAE,EAAE,CAAC;QACT,MAAM,IAAI,KAAK,CACd,wHAAwH,CACxH,CAAA;IACF,CAAC;IACD,OAAO,EAAE,CAAA;AACV,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,mBAAmB,CAClC,MAAoB,EACpB,EAAE,MAAM,EAAE,KAAK,EAAE,KAAK,EAAE,SAAS,EAAE,EAAE,EAAwB;IAE7D,MAAM,UAAU,GAAG,iBAAiB,CAAC,MAAM,EAAE,EAAE,CAAC,CAAA;IAChD,MAAM,MAAM,GAA2B;QACtC,MAAM;QACN,KAAK;QACL,SAAS,EAAE,MAAM,CAAC,SAAS,CAAC;QAC5B,EAAE,EAAE,UAAU;KACd,CAAA;IACD,IAAI,KAAK;QAAE,MAAM,CAAC,KAAK,GAAG,KAAK,CAAA;IAC/B,OAAO,MAAM,CAAA;AACd,CAAC;AAED;;;;;;GAMG;AACH,MAAM,UAAU,wBAAwB,CACvC,MAAoB,EACpB,EAAE,MAAM,EAAE,EAAE,EAA8B;IAE1C,IAAI,MAAM,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QACzB,MAAM,IAAI,KAAK,CAAC,mDAAmD,CAAC,CAAA;IACrE,CAAC;IACD,IAAI,MAAM,CAAC,MAAM,GAAG,uBAAuB,EAAE,CAAC;QAC7C,MAAM,IAAI,KAAK,CAAC,OAAO,uBAAuB,4BAA4B,MAAM,CAAC,MAAM,GAAG,CAAC,CAAA;IAC5F,CAAC;IACD,MAAM,UAAU,GAAG,iBAAiB,CAAC,MAAM,EAAE,EAAE,CAAC,CAAA;IAChD,MAAM,MAAM,GAA2B,EAAE,EAAE,EAAE,UAAU,EAAE,CAAA;IACzD,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE;QACvB,MAAM,CAAC,UAAU,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,MAAM,CAAA;QACjC,MAAM,CAAC,SAAS,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,KAAK,CAAA;QAC/B,MAAM,CAAC,aAAa,CAAC,GAAG,CAAC,GAAG,MAAM,CAAC,CAAC,CAAC,SAAS,CAAC,CAAA;QAC/C,IAAI,CAAC,CAAC,KAAK;YAAE,MAAM,CAAC,SAAS,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,KAAK,CAAA;IAC7C,CAAC,CAAC,CAAA;IACF,OAAO,MAAM,CAAA;AACd,CAAC"}
|
package/dist/services/user.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { UserGetFriendsRequest, UserGetFriendsResponse, UserGetInfoRequest, UserGetInfoResponse, UserGetLovedTracksRequest, UserGetLovedTracksResponse, UserGetRecentTracksRequest, UserGetRecentTracksResponse, UserGetTopAlbumsRequest, UserGetTopAlbumsResponse, UserGetTopArtistsRequest, UserGetTopArtistsResponse, UserGetTopTagsRequest, UserGetTopTagsResponse, UserGetTopTracksRequest, UserGetTopTracksResponse, UserGetWeeklyAlbumChartRequest, UserGetWeeklyAlbumChartResponse, UserGetWeeklyArtistChartRequest, UserGetWeeklyArtistChartResponse, UserGetWeeklyChartListRequest, UserGetWeeklyChartListResponse, UserGetWeeklyTrackChartRequest, UserGetWeeklyTrackChartResponse } from './user.schemas.js';
|
|
2
1
|
import type { LastFmConfig } from '../config.js';
|
|
2
|
+
import type { UserGetFriendsRequest, UserGetFriendsResponse, UserGetInfoRequest, UserGetInfoResponse, UserGetLovedTracksRequest, UserGetLovedTracksResponse, UserGetPersonalTagsRequest, UserGetPersonalTagsResponse, UserGetRecentTracksRequest, UserGetRecentTracksResponse, UserGetTopAlbumsRequest, UserGetTopAlbumsResponse, UserGetTopArtistsRequest, UserGetTopArtistsResponse, UserGetTopTagsRequest, UserGetTopTagsResponse, UserGetTopTracksRequest, UserGetTopTracksResponse, UserGetWeeklyAlbumChartRequest, UserGetWeeklyAlbumChartResponse, UserGetWeeklyArtistChartRequest, UserGetWeeklyArtistChartResponse, UserGetWeeklyChartListRequest, UserGetWeeklyChartListResponse, UserGetWeeklyTrackChartRequest, UserGetWeeklyTrackChartResponse } from './user.schemas.js';
|
|
3
3
|
export interface UserService {
|
|
4
4
|
/**
|
|
5
5
|
* Fetches a list of the user's friends
|
|
@@ -97,6 +97,24 @@ export interface UserService {
|
|
|
97
97
|
* https://www.last.fm/api/show/user.getWeeklyTrackChart
|
|
98
98
|
*/
|
|
99
99
|
getWeeklyTrackChart: (params: UserGetWeeklyTrackChartRequest, init?: RequestInit) => Promise<UserGetWeeklyTrackChartResponse>;
|
|
100
|
+
/**
|
|
101
|
+
* Get the personal tags a user has applied to artists, albums, or
|
|
102
|
+
* tracks. The response is narrowed by the literal `taggingtype`:
|
|
103
|
+
*
|
|
104
|
+
* - `taggingtype: "artist"` → response contains `taggings.artists`
|
|
105
|
+
* - `taggingtype: "album"` → response contains `taggings.albums`
|
|
106
|
+
* - `taggingtype: "track"` → response contains `taggings.tracks`
|
|
107
|
+
*
|
|
108
|
+
* Passing a wider type (e.g. a `string` variable) yields the
|
|
109
|
+
* documented union response.
|
|
110
|
+
*
|
|
111
|
+
* Unsigned GET — no `sk` or `api_sig` are sent.
|
|
112
|
+
* @param {UserGetPersonalTagsRequest<T>} params
|
|
113
|
+
* @param {RequestInit} init
|
|
114
|
+
* @returns {Promise<UserGetPersonalTagsResponse<T>>}
|
|
115
|
+
* https://www.last.fm/api/show/user.getPersonalTags
|
|
116
|
+
*/
|
|
117
|
+
getPersonalTags: <T extends string>(params: UserGetPersonalTagsRequest<T>, init?: RequestInit) => Promise<UserGetPersonalTagsResponse<T>>;
|
|
100
118
|
}
|
|
101
119
|
export declare function createUserService(config: LastFmConfig): UserService;
|
|
102
120
|
//# sourceMappingURL=user.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"user.d.ts","sourceRoot":"","sources":["../../src/services/user.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACX,qBAAqB,EACrB,sBAAsB,EACtB,kBAAkB,EAClB,mBAAmB,EACnB,yBAAyB,EACzB,0BAA0B,EAC1B,0BAA0B,EAC1B,2BAA2B,EAC3B,uBAAuB,EACvB,wBAAwB,EACxB,wBAAwB,EACxB,yBAAyB,EACzB,qBAAqB,EACrB,sBAAsB,EACtB,uBAAuB,EACvB,wBAAwB,EACxB,8BAA8B,EAC9B,+BAA+B,EAC/B,+BAA+B,EAC/B,gCAAgC,EAChC,6BAA6B,EAC7B,8BAA8B,EAC9B,8BAA8B,EAC9B,+BAA+B,EAC/B,MAAM,mBAAmB,
|
|
1
|
+
{"version":3,"file":"user.d.ts","sourceRoot":"","sources":["../../src/services/user.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,cAAc,CAAA;AAEhD,OAAO,KAAK,EACX,qBAAqB,EACrB,sBAAsB,EACtB,kBAAkB,EAClB,mBAAmB,EACnB,yBAAyB,EACzB,0BAA0B,EAC1B,0BAA0B,EAC1B,2BAA2B,EAC3B,0BAA0B,EAC1B,2BAA2B,EAC3B,uBAAuB,EACvB,wBAAwB,EACxB,wBAAwB,EACxB,yBAAyB,EACzB,qBAAqB,EACrB,sBAAsB,EACtB,uBAAuB,EACvB,wBAAwB,EACxB,8BAA8B,EAC9B,+BAA+B,EAC/B,+BAA+B,EAC/B,gCAAgC,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I,CAAC,EAAE,WAAW,KACd,OAAO,CAAC,+BAA+B,CAAC,CAAA;IAC7C;;;;;;OAMG;IACH,oBAAoB,EAAE,CACrB,MAAM,EAAE,+BAA+B,EACvC,IAAI,CAAC,EAAE,WAAW,KACd,OAAO,CAAC,gCAAgC,CAAC,CAAA;IAC9C;;;;;;OAMG;IACH,kBAAkB,EAAE,CACnB,MAAM,EAAE,6BAA6B,EACrC,IAAI,CAAC,EAAE,WAAW,KACd,OAAO,CAAC,8BAA8B,CAAC,CAAA;IAC5C;;;;;;OAMG;IACH,mBAAmB,EAAE,CACpB,MAAM,EAAE,8BAA8B,EACtC,IAAI,CAAC,EAAE,WAAW,KACd,OAAO,CAAC,+BAA+B,CAAC,CAAA;IAC7C;;;;;;;;;;;;;;;;OAgBG;IACH,eAAe,EAAE,CAAC,CAAC,SAAS,MAAM,EACjC,MAAM,EAAE,0BAA0B,CAAC,CAAC,CAAC,EACrC,IAAI,CAAC,EAAE,WAAW,KACd,OAAO,CAAC,2BAA2B,CAAC,CAAC,CAAC,CAAC,CAAA;CAC5C;AAED,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,YAAY,GAAG,WAAW,CA4BnE"}
|
package/dist/services/user.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { buildUrl, fetcher } from '../utils.js';
|
|
2
2
|
export function createUserService(config) {
|
|
3
3
|
return {
|
|
4
4
|
getFriends: (params, init) => fetcher(buildUrl(config, 'user.getFriends', params), init),
|
|
@@ -12,7 +12,8 @@ export function createUserService(config) {
|
|
|
12
12
|
getWeeklyAlbumChart: (params, init) => fetcher(buildUrl(config, 'user.getWeeklyAlbumChart', params), init),
|
|
13
13
|
getWeeklyArtistChart: (params, init) => fetcher(buildUrl(config, 'user.getWeeklyArtistChart', params), init),
|
|
14
14
|
getWeeklyChartList: (params, init) => fetcher(buildUrl(config, 'user.getWeeklyChartList', params), init),
|
|
15
|
-
getWeeklyTrackChart: (params, init) => fetcher(buildUrl(config, 'user.getWeeklyTrackChart', params), init)
|
|
15
|
+
getWeeklyTrackChart: (params, init) => fetcher(buildUrl(config, 'user.getWeeklyTrackChart', params), init),
|
|
16
|
+
getPersonalTags: (params, init) => fetcher(buildUrl(config, 'user.getPersonalTags', params), init),
|
|
16
17
|
};
|
|
17
18
|
}
|
|
18
19
|
//# sourceMappingURL=user.js.map
|