soundcloud-api-ts 1.13.0 → 1.13.1
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/AGENTS.md +11 -1
- package/README.md +2 -1
- package/dist/{chunk-JH7TLL2C.mjs → chunk-CCHK5S6S.mjs} +38 -15
- package/dist/chunk-CCHK5S6S.mjs.map +1 -0
- package/dist/{chunk-VBDIRSOG.js → chunk-RS2J5LTS.js} +38 -15
- package/dist/chunk-RS2J5LTS.js.map +1 -0
- package/dist/cli.js +6 -6
- package/dist/cli.mjs +1 -1
- package/dist/index.d.mts +10 -0
- package/dist/index.d.ts +10 -0
- package/dist/index.js +68 -68
- package/dist/index.mjs +1 -1
- package/llms.txt +33 -1
- package/package.json +2 -2
- package/dist/chunk-JH7TLL2C.mjs.map +0 -1
- package/dist/chunk-VBDIRSOG.js.map +0 -1
package/dist/index.d.ts
CHANGED
|
@@ -1026,6 +1026,11 @@ declare namespace SoundCloudClient {
|
|
|
1026
1026
|
* @param options - Optional token override
|
|
1027
1027
|
* @returns Array of track objects (may be shorter than `ids` if some tracks are unavailable)
|
|
1028
1028
|
* @throws {SoundCloudError} When the API returns an error
|
|
1029
|
+
* @throws {Error} When more than 200 IDs are provided
|
|
1030
|
+
*
|
|
1031
|
+
* @remarks
|
|
1032
|
+
* SoundCloud's API likely caps at ~200 IDs per request. Passing more than 200 IDs
|
|
1033
|
+
* will throw immediately without making a network request.
|
|
1029
1034
|
*
|
|
1030
1035
|
* @example
|
|
1031
1036
|
* ```ts
|
|
@@ -2040,6 +2045,11 @@ declare const getTrack: (token: string, trackId: string | number) => Promise<Sou
|
|
|
2040
2045
|
* @param ids - Array of track IDs (numeric or string URNs)
|
|
2041
2046
|
* @returns Array of track objects (may be shorter than `ids` if some tracks are unavailable)
|
|
2042
2047
|
* @throws {SoundCloudError} When the API returns an error
|
|
2048
|
+
* @throws {Error} When more than 200 IDs are provided
|
|
2049
|
+
*
|
|
2050
|
+
* @remarks
|
|
2051
|
+
* SoundCloud's API likely caps at ~200 IDs per request. Passing more than 200 IDs
|
|
2052
|
+
* will throw immediately without making a network request.
|
|
2043
2053
|
*
|
|
2044
2054
|
* @example
|
|
2045
2055
|
* ```ts
|
package/dist/index.js
CHANGED
|
@@ -1,277 +1,277 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkRS2J5LTS_js = require('./chunk-RS2J5LTS.js');
|
|
4
4
|
var chunkMLVA534Z_js = require('./chunk-MLVA534Z.js');
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
Object.defineProperty(exports, "IMPLEMENTED_OPERATIONS", {
|
|
9
9
|
enumerable: true,
|
|
10
|
-
get: function () { return
|
|
10
|
+
get: function () { return chunkRS2J5LTS_js.IMPLEMENTED_OPERATIONS; }
|
|
11
11
|
});
|
|
12
12
|
Object.defineProperty(exports, "InFlightDeduper", {
|
|
13
13
|
enumerable: true,
|
|
14
|
-
get: function () { return
|
|
14
|
+
get: function () { return chunkRS2J5LTS_js.InFlightDeduper; }
|
|
15
15
|
});
|
|
16
16
|
Object.defineProperty(exports, "RawClient", {
|
|
17
17
|
enumerable: true,
|
|
18
|
-
get: function () { return
|
|
18
|
+
get: function () { return chunkRS2J5LTS_js.RawClient; }
|
|
19
19
|
});
|
|
20
20
|
Object.defineProperty(exports, "SoundCloudClient", {
|
|
21
21
|
enumerable: true,
|
|
22
|
-
get: function () { return
|
|
22
|
+
get: function () { return chunkRS2J5LTS_js.SoundCloudClient; }
|
|
23
23
|
});
|
|
24
24
|
Object.defineProperty(exports, "createPlaylist", {
|
|
25
25
|
enumerable: true,
|
|
26
|
-
get: function () { return
|
|
26
|
+
get: function () { return chunkRS2J5LTS_js.createPlaylist; }
|
|
27
27
|
});
|
|
28
28
|
Object.defineProperty(exports, "createTrackComment", {
|
|
29
29
|
enumerable: true,
|
|
30
|
-
get: function () { return
|
|
30
|
+
get: function () { return chunkRS2J5LTS_js.createTrackComment; }
|
|
31
31
|
});
|
|
32
32
|
Object.defineProperty(exports, "deletePlaylist", {
|
|
33
33
|
enumerable: true,
|
|
34
|
-
get: function () { return
|
|
34
|
+
get: function () { return chunkRS2J5LTS_js.deletePlaylist; }
|
|
35
35
|
});
|
|
36
36
|
Object.defineProperty(exports, "deleteTrack", {
|
|
37
37
|
enumerable: true,
|
|
38
|
-
get: function () { return
|
|
38
|
+
get: function () { return chunkRS2J5LTS_js.deleteTrack; }
|
|
39
39
|
});
|
|
40
40
|
Object.defineProperty(exports, "fetchAll", {
|
|
41
41
|
enumerable: true,
|
|
42
|
-
get: function () { return
|
|
42
|
+
get: function () { return chunkRS2J5LTS_js.fetchAll; }
|
|
43
43
|
});
|
|
44
44
|
Object.defineProperty(exports, "followUser", {
|
|
45
45
|
enumerable: true,
|
|
46
|
-
get: function () { return
|
|
46
|
+
get: function () { return chunkRS2J5LTS_js.followUser; }
|
|
47
47
|
});
|
|
48
48
|
Object.defineProperty(exports, "generateCodeChallenge", {
|
|
49
49
|
enumerable: true,
|
|
50
|
-
get: function () { return
|
|
50
|
+
get: function () { return chunkRS2J5LTS_js.generateCodeChallenge; }
|
|
51
51
|
});
|
|
52
52
|
Object.defineProperty(exports, "generateCodeVerifier", {
|
|
53
53
|
enumerable: true,
|
|
54
|
-
get: function () { return
|
|
54
|
+
get: function () { return chunkRS2J5LTS_js.generateCodeVerifier; }
|
|
55
55
|
});
|
|
56
56
|
Object.defineProperty(exports, "getAuthorizationUrl", {
|
|
57
57
|
enumerable: true,
|
|
58
|
-
get: function () { return
|
|
58
|
+
get: function () { return chunkRS2J5LTS_js.getAuthorizationUrl; }
|
|
59
59
|
});
|
|
60
60
|
Object.defineProperty(exports, "getClientToken", {
|
|
61
61
|
enumerable: true,
|
|
62
|
-
get: function () { return
|
|
62
|
+
get: function () { return chunkRS2J5LTS_js.getClientToken; }
|
|
63
63
|
});
|
|
64
64
|
Object.defineProperty(exports, "getFollowers", {
|
|
65
65
|
enumerable: true,
|
|
66
|
-
get: function () { return
|
|
66
|
+
get: function () { return chunkRS2J5LTS_js.getFollowers; }
|
|
67
67
|
});
|
|
68
68
|
Object.defineProperty(exports, "getFollowings", {
|
|
69
69
|
enumerable: true,
|
|
70
|
-
get: function () { return
|
|
70
|
+
get: function () { return chunkRS2J5LTS_js.getFollowings; }
|
|
71
71
|
});
|
|
72
72
|
Object.defineProperty(exports, "getMe", {
|
|
73
73
|
enumerable: true,
|
|
74
|
-
get: function () { return
|
|
74
|
+
get: function () { return chunkRS2J5LTS_js.getMe; }
|
|
75
75
|
});
|
|
76
76
|
Object.defineProperty(exports, "getMeActivities", {
|
|
77
77
|
enumerable: true,
|
|
78
|
-
get: function () { return
|
|
78
|
+
get: function () { return chunkRS2J5LTS_js.getMeActivities; }
|
|
79
79
|
});
|
|
80
80
|
Object.defineProperty(exports, "getMeActivitiesOwn", {
|
|
81
81
|
enumerable: true,
|
|
82
|
-
get: function () { return
|
|
82
|
+
get: function () { return chunkRS2J5LTS_js.getMeActivitiesOwn; }
|
|
83
83
|
});
|
|
84
84
|
Object.defineProperty(exports, "getMeActivitiesTracks", {
|
|
85
85
|
enumerable: true,
|
|
86
|
-
get: function () { return
|
|
86
|
+
get: function () { return chunkRS2J5LTS_js.getMeActivitiesTracks; }
|
|
87
87
|
});
|
|
88
88
|
Object.defineProperty(exports, "getMeConnections", {
|
|
89
89
|
enumerable: true,
|
|
90
|
-
get: function () { return
|
|
90
|
+
get: function () { return chunkRS2J5LTS_js.getMeConnections; }
|
|
91
91
|
});
|
|
92
92
|
Object.defineProperty(exports, "getMeFollowers", {
|
|
93
93
|
enumerable: true,
|
|
94
|
-
get: function () { return
|
|
94
|
+
get: function () { return chunkRS2J5LTS_js.getMeFollowers; }
|
|
95
95
|
});
|
|
96
96
|
Object.defineProperty(exports, "getMeFollowings", {
|
|
97
97
|
enumerable: true,
|
|
98
|
-
get: function () { return
|
|
98
|
+
get: function () { return chunkRS2J5LTS_js.getMeFollowings; }
|
|
99
99
|
});
|
|
100
100
|
Object.defineProperty(exports, "getMeFollowingsTracks", {
|
|
101
101
|
enumerable: true,
|
|
102
|
-
get: function () { return
|
|
102
|
+
get: function () { return chunkRS2J5LTS_js.getMeFollowingsTracks; }
|
|
103
103
|
});
|
|
104
104
|
Object.defineProperty(exports, "getMeLikesPlaylists", {
|
|
105
105
|
enumerable: true,
|
|
106
|
-
get: function () { return
|
|
106
|
+
get: function () { return chunkRS2J5LTS_js.getMeLikesPlaylists; }
|
|
107
107
|
});
|
|
108
108
|
Object.defineProperty(exports, "getMeLikesTracks", {
|
|
109
109
|
enumerable: true,
|
|
110
|
-
get: function () { return
|
|
110
|
+
get: function () { return chunkRS2J5LTS_js.getMeLikesTracks; }
|
|
111
111
|
});
|
|
112
112
|
Object.defineProperty(exports, "getMePlaylists", {
|
|
113
113
|
enumerable: true,
|
|
114
|
-
get: function () { return
|
|
114
|
+
get: function () { return chunkRS2J5LTS_js.getMePlaylists; }
|
|
115
115
|
});
|
|
116
116
|
Object.defineProperty(exports, "getMeTracks", {
|
|
117
117
|
enumerable: true,
|
|
118
|
-
get: function () { return
|
|
118
|
+
get: function () { return chunkRS2J5LTS_js.getMeTracks; }
|
|
119
119
|
});
|
|
120
120
|
Object.defineProperty(exports, "getPlaylist", {
|
|
121
121
|
enumerable: true,
|
|
122
|
-
get: function () { return
|
|
122
|
+
get: function () { return chunkRS2J5LTS_js.getPlaylist; }
|
|
123
123
|
});
|
|
124
124
|
Object.defineProperty(exports, "getPlaylistReposts", {
|
|
125
125
|
enumerable: true,
|
|
126
|
-
get: function () { return
|
|
126
|
+
get: function () { return chunkRS2J5LTS_js.getPlaylistReposts; }
|
|
127
127
|
});
|
|
128
128
|
Object.defineProperty(exports, "getPlaylistTracks", {
|
|
129
129
|
enumerable: true,
|
|
130
|
-
get: function () { return
|
|
130
|
+
get: function () { return chunkRS2J5LTS_js.getPlaylistTracks; }
|
|
131
131
|
});
|
|
132
132
|
Object.defineProperty(exports, "getRelatedTracks", {
|
|
133
133
|
enumerable: true,
|
|
134
|
-
get: function () { return
|
|
134
|
+
get: function () { return chunkRS2J5LTS_js.getRelatedTracks; }
|
|
135
135
|
});
|
|
136
136
|
Object.defineProperty(exports, "getSoundCloudWidgetUrl", {
|
|
137
137
|
enumerable: true,
|
|
138
|
-
get: function () { return
|
|
138
|
+
get: function () { return chunkRS2J5LTS_js.getSoundCloudWidgetUrl; }
|
|
139
139
|
});
|
|
140
140
|
Object.defineProperty(exports, "getTrack", {
|
|
141
141
|
enumerable: true,
|
|
142
|
-
get: function () { return
|
|
142
|
+
get: function () { return chunkRS2J5LTS_js.getTrack; }
|
|
143
143
|
});
|
|
144
144
|
Object.defineProperty(exports, "getTrackComments", {
|
|
145
145
|
enumerable: true,
|
|
146
|
-
get: function () { return
|
|
146
|
+
get: function () { return chunkRS2J5LTS_js.getTrackComments; }
|
|
147
147
|
});
|
|
148
148
|
Object.defineProperty(exports, "getTrackLikes", {
|
|
149
149
|
enumerable: true,
|
|
150
|
-
get: function () { return
|
|
150
|
+
get: function () { return chunkRS2J5LTS_js.getTrackLikes; }
|
|
151
151
|
});
|
|
152
152
|
Object.defineProperty(exports, "getTrackReposts", {
|
|
153
153
|
enumerable: true,
|
|
154
|
-
get: function () { return
|
|
154
|
+
get: function () { return chunkRS2J5LTS_js.getTrackReposts; }
|
|
155
155
|
});
|
|
156
156
|
Object.defineProperty(exports, "getTrackStreams", {
|
|
157
157
|
enumerable: true,
|
|
158
|
-
get: function () { return
|
|
158
|
+
get: function () { return chunkRS2J5LTS_js.getTrackStreams; }
|
|
159
159
|
});
|
|
160
160
|
Object.defineProperty(exports, "getTracks", {
|
|
161
161
|
enumerable: true,
|
|
162
|
-
get: function () { return
|
|
162
|
+
get: function () { return chunkRS2J5LTS_js.getTracks; }
|
|
163
163
|
});
|
|
164
164
|
Object.defineProperty(exports, "getUser", {
|
|
165
165
|
enumerable: true,
|
|
166
|
-
get: function () { return
|
|
166
|
+
get: function () { return chunkRS2J5LTS_js.getUser; }
|
|
167
167
|
});
|
|
168
168
|
Object.defineProperty(exports, "getUserLikesPlaylists", {
|
|
169
169
|
enumerable: true,
|
|
170
|
-
get: function () { return
|
|
170
|
+
get: function () { return chunkRS2J5LTS_js.getUserLikesPlaylists; }
|
|
171
171
|
});
|
|
172
172
|
Object.defineProperty(exports, "getUserLikesTracks", {
|
|
173
173
|
enumerable: true,
|
|
174
|
-
get: function () { return
|
|
174
|
+
get: function () { return chunkRS2J5LTS_js.getUserLikesTracks; }
|
|
175
175
|
});
|
|
176
176
|
Object.defineProperty(exports, "getUserPlaylists", {
|
|
177
177
|
enumerable: true,
|
|
178
|
-
get: function () { return
|
|
178
|
+
get: function () { return chunkRS2J5LTS_js.getUserPlaylists; }
|
|
179
179
|
});
|
|
180
180
|
Object.defineProperty(exports, "getUserToken", {
|
|
181
181
|
enumerable: true,
|
|
182
|
-
get: function () { return
|
|
182
|
+
get: function () { return chunkRS2J5LTS_js.getUserToken; }
|
|
183
183
|
});
|
|
184
184
|
Object.defineProperty(exports, "getUserTracks", {
|
|
185
185
|
enumerable: true,
|
|
186
|
-
get: function () { return
|
|
186
|
+
get: function () { return chunkRS2J5LTS_js.getUserTracks; }
|
|
187
187
|
});
|
|
188
188
|
Object.defineProperty(exports, "getUserWebProfiles", {
|
|
189
189
|
enumerable: true,
|
|
190
|
-
get: function () { return
|
|
190
|
+
get: function () { return chunkRS2J5LTS_js.getUserWebProfiles; }
|
|
191
191
|
});
|
|
192
192
|
Object.defineProperty(exports, "likePlaylist", {
|
|
193
193
|
enumerable: true,
|
|
194
|
-
get: function () { return
|
|
194
|
+
get: function () { return chunkRS2J5LTS_js.likePlaylist; }
|
|
195
195
|
});
|
|
196
196
|
Object.defineProperty(exports, "likeTrack", {
|
|
197
197
|
enumerable: true,
|
|
198
|
-
get: function () { return
|
|
198
|
+
get: function () { return chunkRS2J5LTS_js.likeTrack; }
|
|
199
199
|
});
|
|
200
200
|
Object.defineProperty(exports, "paginate", {
|
|
201
201
|
enumerable: true,
|
|
202
|
-
get: function () { return
|
|
202
|
+
get: function () { return chunkRS2J5LTS_js.paginate; }
|
|
203
203
|
});
|
|
204
204
|
Object.defineProperty(exports, "paginateItems", {
|
|
205
205
|
enumerable: true,
|
|
206
|
-
get: function () { return
|
|
206
|
+
get: function () { return chunkRS2J5LTS_js.paginateItems; }
|
|
207
207
|
});
|
|
208
208
|
Object.defineProperty(exports, "refreshUserToken", {
|
|
209
209
|
enumerable: true,
|
|
210
|
-
get: function () { return
|
|
210
|
+
get: function () { return chunkRS2J5LTS_js.refreshUserToken; }
|
|
211
211
|
});
|
|
212
212
|
Object.defineProperty(exports, "repostPlaylist", {
|
|
213
213
|
enumerable: true,
|
|
214
|
-
get: function () { return
|
|
214
|
+
get: function () { return chunkRS2J5LTS_js.repostPlaylist; }
|
|
215
215
|
});
|
|
216
216
|
Object.defineProperty(exports, "repostTrack", {
|
|
217
217
|
enumerable: true,
|
|
218
|
-
get: function () { return
|
|
218
|
+
get: function () { return chunkRS2J5LTS_js.repostTrack; }
|
|
219
219
|
});
|
|
220
220
|
Object.defineProperty(exports, "resolveUrl", {
|
|
221
221
|
enumerable: true,
|
|
222
|
-
get: function () { return
|
|
222
|
+
get: function () { return chunkRS2J5LTS_js.resolveUrl; }
|
|
223
223
|
});
|
|
224
224
|
Object.defineProperty(exports, "scFetch", {
|
|
225
225
|
enumerable: true,
|
|
226
|
-
get: function () { return
|
|
226
|
+
get: function () { return chunkRS2J5LTS_js.scFetch; }
|
|
227
227
|
});
|
|
228
228
|
Object.defineProperty(exports, "scFetchUrl", {
|
|
229
229
|
enumerable: true,
|
|
230
|
-
get: function () { return
|
|
230
|
+
get: function () { return chunkRS2J5LTS_js.scFetchUrl; }
|
|
231
231
|
});
|
|
232
232
|
Object.defineProperty(exports, "searchPlaylists", {
|
|
233
233
|
enumerable: true,
|
|
234
|
-
get: function () { return
|
|
234
|
+
get: function () { return chunkRS2J5LTS_js.searchPlaylists; }
|
|
235
235
|
});
|
|
236
236
|
Object.defineProperty(exports, "searchTracks", {
|
|
237
237
|
enumerable: true,
|
|
238
|
-
get: function () { return
|
|
238
|
+
get: function () { return chunkRS2J5LTS_js.searchTracks; }
|
|
239
239
|
});
|
|
240
240
|
Object.defineProperty(exports, "searchUsers", {
|
|
241
241
|
enumerable: true,
|
|
242
|
-
get: function () { return
|
|
242
|
+
get: function () { return chunkRS2J5LTS_js.searchUsers; }
|
|
243
243
|
});
|
|
244
244
|
Object.defineProperty(exports, "signOut", {
|
|
245
245
|
enumerable: true,
|
|
246
|
-
get: function () { return
|
|
246
|
+
get: function () { return chunkRS2J5LTS_js.signOut; }
|
|
247
247
|
});
|
|
248
248
|
Object.defineProperty(exports, "unfollowUser", {
|
|
249
249
|
enumerable: true,
|
|
250
|
-
get: function () { return
|
|
250
|
+
get: function () { return chunkRS2J5LTS_js.unfollowUser; }
|
|
251
251
|
});
|
|
252
252
|
Object.defineProperty(exports, "unlikePlaylist", {
|
|
253
253
|
enumerable: true,
|
|
254
|
-
get: function () { return
|
|
254
|
+
get: function () { return chunkRS2J5LTS_js.unlikePlaylist; }
|
|
255
255
|
});
|
|
256
256
|
Object.defineProperty(exports, "unlikeTrack", {
|
|
257
257
|
enumerable: true,
|
|
258
|
-
get: function () { return
|
|
258
|
+
get: function () { return chunkRS2J5LTS_js.unlikeTrack; }
|
|
259
259
|
});
|
|
260
260
|
Object.defineProperty(exports, "unrepostPlaylist", {
|
|
261
261
|
enumerable: true,
|
|
262
|
-
get: function () { return
|
|
262
|
+
get: function () { return chunkRS2J5LTS_js.unrepostPlaylist; }
|
|
263
263
|
});
|
|
264
264
|
Object.defineProperty(exports, "unrepostTrack", {
|
|
265
265
|
enumerable: true,
|
|
266
|
-
get: function () { return
|
|
266
|
+
get: function () { return chunkRS2J5LTS_js.unrepostTrack; }
|
|
267
267
|
});
|
|
268
268
|
Object.defineProperty(exports, "updatePlaylist", {
|
|
269
269
|
enumerable: true,
|
|
270
|
-
get: function () { return
|
|
270
|
+
get: function () { return chunkRS2J5LTS_js.updatePlaylist; }
|
|
271
271
|
});
|
|
272
272
|
Object.defineProperty(exports, "updateTrack", {
|
|
273
273
|
enumerable: true,
|
|
274
|
-
get: function () { return
|
|
274
|
+
get: function () { return chunkRS2J5LTS_js.updateTrack; }
|
|
275
275
|
});
|
|
276
276
|
Object.defineProperty(exports, "SoundCloudError", {
|
|
277
277
|
enumerable: true,
|
package/dist/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { IMPLEMENTED_OPERATIONS, InFlightDeduper, RawClient, SoundCloudClient, createPlaylist, createTrackComment, deletePlaylist, deleteTrack, fetchAll, followUser, generateCodeChallenge, generateCodeVerifier, getAuthorizationUrl, getClientToken, getFollowers, getFollowings, getMe, getMeActivities, getMeActivitiesOwn, getMeActivitiesTracks, getMeConnections, getMeFollowers, getMeFollowings, getMeFollowingsTracks, getMeLikesPlaylists, getMeLikesTracks, getMePlaylists, getMeTracks, getPlaylist, getPlaylistReposts, getPlaylistTracks, getRelatedTracks, getSoundCloudWidgetUrl, getTrack, getTrackComments, getTrackLikes, getTrackReposts, getTrackStreams, getTracks, getUser, getUserLikesPlaylists, getUserLikesTracks, getUserPlaylists, getUserToken, getUserTracks, getUserWebProfiles, likePlaylist, likeTrack, paginate, paginateItems, refreshUserToken, repostPlaylist, repostTrack, resolveUrl, scFetch, scFetchUrl, searchPlaylists, searchTracks, searchUsers, signOut, unfollowUser, unlikePlaylist, unlikeTrack, unrepostPlaylist, unrepostTrack, updatePlaylist, updateTrack } from './chunk-
|
|
1
|
+
export { IMPLEMENTED_OPERATIONS, InFlightDeduper, RawClient, SoundCloudClient, createPlaylist, createTrackComment, deletePlaylist, deleteTrack, fetchAll, followUser, generateCodeChallenge, generateCodeVerifier, getAuthorizationUrl, getClientToken, getFollowers, getFollowings, getMe, getMeActivities, getMeActivitiesOwn, getMeActivitiesTracks, getMeConnections, getMeFollowers, getMeFollowings, getMeFollowingsTracks, getMeLikesPlaylists, getMeLikesTracks, getMePlaylists, getMeTracks, getPlaylist, getPlaylistReposts, getPlaylistTracks, getRelatedTracks, getSoundCloudWidgetUrl, getTrack, getTrackComments, getTrackLikes, getTrackReposts, getTrackStreams, getTracks, getUser, getUserLikesPlaylists, getUserLikesTracks, getUserPlaylists, getUserToken, getUserTracks, getUserWebProfiles, likePlaylist, likeTrack, paginate, paginateItems, refreshUserToken, repostPlaylist, repostTrack, resolveUrl, scFetch, scFetchUrl, searchPlaylists, searchTracks, searchUsers, signOut, unfollowUser, unlikePlaylist, unlikeTrack, unrepostPlaylist, unrepostTrack, updatePlaylist, updateTrack } from './chunk-CCHK5S6S.mjs';
|
|
2
2
|
export { SoundCloudError } from './chunk-QYYEWUIJ.mjs';
|
|
3
3
|
//# sourceMappingURL=index.mjs.map
|
|
4
4
|
//# sourceMappingURL=index.mjs.map
|
package/llms.txt
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# soundcloud-api-ts v1.
|
|
1
|
+
# soundcloud-api-ts v1.13.1
|
|
2
2
|
|
|
3
3
|
> A TypeScript client for the SoundCloud API. Zero dependencies, native fetch, full OAuth 2.1 + PKCE support via `secure.soundcloud.com`.
|
|
4
4
|
|
|
@@ -47,6 +47,7 @@ Paginated responses return `SoundCloudPaginatedResponse<T>` with `collection: T[
|
|
|
47
47
|
### Tracks (sc.tracks)
|
|
48
48
|
|
|
49
49
|
getTrack(trackId: string | number): Promise<SoundCloudTrack>
|
|
50
|
+
getTracks(ids: (string | number)[]): Promise<SoundCloudTrack[]> // batch fetch by IDs
|
|
50
51
|
getStreams(trackId: string | number): Promise<SoundCloudStreams>
|
|
51
52
|
getComments(trackId: string | number, limit?: number): Promise<SoundCloudPaginatedResponse<SoundCloudComment>>
|
|
52
53
|
createComment(trackId: string | number, body: string, timestamp?: number): Promise<SoundCloudComment>
|
|
@@ -95,6 +96,7 @@ Paginated responses return `SoundCloudPaginatedResponse<T>` with `collection: T[
|
|
|
95
96
|
getFollowers(limit?: number): Promise<SoundCloudPaginatedResponse<SoundCloudUser>>
|
|
96
97
|
getTracks(limit?: number): Promise<SoundCloudPaginatedResponse<SoundCloudTrack>>
|
|
97
98
|
getPlaylists(limit?: number): Promise<SoundCloudPaginatedResponse<SoundCloudPlaylist>>
|
|
99
|
+
getConnections(): Promise<SoundCloudConnection[]> // linked social accounts (user token required)
|
|
98
100
|
follow(userUrn: string | number): Promise<void>
|
|
99
101
|
unfollow(userUrn: string | number): Promise<void>
|
|
100
102
|
|
|
@@ -245,6 +247,36 @@ pnpm openapi:sync # fetch SoundCloud OpenAPI spec → tools/openapi.json +
|
|
|
245
247
|
pnpm openapi:coverage # compare spec operations to IMPLEMENTED_OPERATIONS in src/client/registry.ts
|
|
246
248
|
```
|
|
247
249
|
|
|
250
|
+
## Auth Guide
|
|
251
|
+
Full guide at `docs/auth-guide.md`. Key points:
|
|
252
|
+
- **Client credentials** → public endpoints only (tracks, users, search, playlists, resolve). Cannot access /me, likes, reposts, write operations.
|
|
253
|
+
- **User token (OAuth 2.1 + PKCE)** → required for /me, likes, reposts, create/update/delete.
|
|
254
|
+
- **401 errors**: "invalid_client" = wrong creds; "insufficient_scope" = need user token not client creds; "invalid_token" = expired, refresh needed.
|
|
255
|
+
|
|
256
|
+
## Token Provider Interfaces
|
|
257
|
+
```ts
|
|
258
|
+
import { TokenProvider, TokenStore } from 'soundcloud-api-ts';
|
|
259
|
+
|
|
260
|
+
// Implement TokenProvider to plug in any session framework (NextAuth, Clerk, Redis, etc.)
|
|
261
|
+
interface TokenProvider {
|
|
262
|
+
getAccessToken(): string | undefined | Promise<string | undefined>;
|
|
263
|
+
setTokens(accessToken: string, refreshToken?: string): void | Promise<void>;
|
|
264
|
+
refreshIfNeeded(client: SoundCloudClient): Promise<string> | string;
|
|
265
|
+
}
|
|
266
|
+
|
|
267
|
+
// Simpler synchronous store
|
|
268
|
+
interface TokenStore {
|
|
269
|
+
getAccessToken(): string | undefined;
|
|
270
|
+
getRefreshToken(): string | undefined;
|
|
271
|
+
setTokens(accessToken: string, refreshToken?: string): void;
|
|
272
|
+
clearTokens(): void;
|
|
273
|
+
}
|
|
274
|
+
```
|
|
275
|
+
|
|
276
|
+
## Related Packages
|
|
277
|
+
- soundcloud-api-ts-next — React hooks + Next.js API route handlers. Keeps secrets server-side. https://github.com/twin-paws/soundcloud-api-ts-next
|
|
278
|
+
- soundcloud-widget-react — React component for the SoundCloud HTML5 Widget API (embed + playback control). https://github.com/twin-paws/soundcloud-widget-react
|
|
279
|
+
|
|
248
280
|
## Full Documentation
|
|
249
281
|
|
|
250
282
|
https://twin-paws.github.io/soundcloud-api-ts/
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "soundcloud-api-ts",
|
|
3
|
-
"version": "1.13.
|
|
3
|
+
"version": "1.13.1",
|
|
4
4
|
"description": "TypeScript-first SoundCloud API client for accessing tracks, users, playlists, and search endpoints. Zero dependencies, native fetch, full OAuth 2.1 + PKCE support.",
|
|
5
5
|
"bin": {
|
|
6
6
|
"sc-cli": "./dist/cli.js",
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
"test:coverage": "vitest run --coverage",
|
|
37
37
|
"docs": "typedoc",
|
|
38
38
|
"openapi:sync": "npx tsx tools/openapi-sync.ts",
|
|
39
|
-
"openapi:coverage": "tsx tools/coverage-check.ts"
|
|
39
|
+
"openapi:coverage": "npx tsx tools/coverage-check.ts"
|
|
40
40
|
},
|
|
41
41
|
"repository": {
|
|
42
42
|
"type": "git",
|