soundcloud-api-ts 1.12.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 +38 -25
- package/dist/{chunk-JLRQJWU5.mjs → chunk-CCHK5S6S.mjs} +86 -11
- package/dist/chunk-CCHK5S6S.mjs.map +1 -0
- package/dist/{chunk-D7AF372V.js → chunk-RS2J5LTS.js} +87 -10
- package/dist/chunk-RS2J5LTS.js.map +1 -0
- package/dist/cli.js +6 -6
- package/dist/cli.mjs +1 -1
- package/dist/index-DX6Anc1-.d.mts +582 -0
- package/dist/index-DX6Anc1-.d.ts +582 -0
- package/dist/index.d.mts +158 -3
- package/dist/index.d.ts +158 -3
- package/dist/index.js +74 -66
- package/dist/index.mjs +1 -1
- package/dist/types/index.d.mts +1 -555
- package/dist/types/index.d.ts +1 -555
- package/llms.txt +33 -1
- package/package.json +2 -2
- package/dist/chunk-D7AF372V.js.map +0 -1
- package/dist/chunk-JLRQJWU5.mjs.map +0 -1
package/AGENTS.md
CHANGED
|
@@ -131,6 +131,11 @@ try {
|
|
|
131
131
|
8. **Deduplication** — concurrent identical GETs share a single in-flight promise (`dedupe: true` by default). Prevents redundant fetches in SSR or concurrent component trees.
|
|
132
132
|
9. **Cache** — pass a `SoundCloudCache` implementation in the constructor to cache GET responses. Base package defines the interface only; bring your own backend. `cacheTtlMs` defaults to 60000ms.
|
|
133
133
|
10. **Retry hook** — pass `onRetry` to receive `RetryInfo` on each retry: `{ attempt, delayMs, reason, status?, url }`.
|
|
134
|
+
11. **`sc.tracks.getTracks(ids[])`** — batch fetch multiple tracks by ID array in a single request. Returns `SoundCloudTrack[]` (may be shorter than input if some tracks are unavailable).
|
|
135
|
+
12. **`sc.me.getConnections()`** — list linked social accounts. Requires user token. May require elevated API access.
|
|
136
|
+
13. **TokenProvider / TokenStore interfaces** — in `src/auth/token-provider.ts`. Implement to integrate with NextAuth, Clerk, Redis, or any session framework. See `docs/auth-guide.md`.
|
|
137
|
+
14. **Auth guide** — `docs/auth-guide.md` covers: client creds vs user tokens, full PKCE flow, auto-refresh, NextAuth/Clerk bridge patterns, 401 troubleshooting table (invalid_client / insufficient_scope / invalid_token / unauthorized_client).
|
|
138
|
+
15. **OpenAPI tooling** — `pnpm openapi:sync` fetches the spec (if available), `pnpm openapi:coverage` reports implemented vs total. `src/client/registry.ts` is the source of truth — update it when adding new endpoints.
|
|
134
139
|
6. **No env vars** — the package reads no environment variables. Pass `clientId`, `clientSecret`, and `redirectUri` directly to the constructor.
|
|
135
140
|
7. **IDs can be numbers or strings** — all ID parameters accept `string | number`.
|
|
136
141
|
8. **Search pagination** — search uses zero-based `pageNumber` (10 results per page), not cursor-based pagination.
|
|
@@ -141,9 +146,14 @@ try {
|
|
|
141
146
|
src/
|
|
142
147
|
index.ts — All public exports (source of truth)
|
|
143
148
|
client/SoundCloudClient.ts — Main client class with all namespaced methods
|
|
144
|
-
client/http.ts — scFetch, scFetchUrl (HTTP layer with retry)
|
|
149
|
+
client/http.ts — scFetch, scFetchUrl (HTTP layer with retry + RetryInfo hook)
|
|
145
150
|
client/paginate.ts — paginate, paginateItems, fetchAll helpers
|
|
151
|
+
client/raw.ts — RawClient (sc.raw escape hatch)
|
|
152
|
+
client/dedupe.ts — InFlightDeduper (GET coalescing)
|
|
153
|
+
client/cache.ts — SoundCloudCache interface
|
|
154
|
+
client/registry.ts — IMPLEMENTED_OPERATIONS (OpenAPI coverage tracking)
|
|
146
155
|
auth/ — Standalone auth functions + PKCE
|
|
156
|
+
auth/token-provider.ts — TokenProvider + TokenStore interfaces
|
|
147
157
|
users/ — Standalone user functions (getMe, getUser, etc.)
|
|
148
158
|
tracks/ — Standalone track functions
|
|
149
159
|
playlists/ — Standalone playlist functions
|
package/README.md
CHANGED
|
@@ -11,28 +11,26 @@
|
|
|
11
11
|
[]()
|
|
12
12
|
[](https://twin-paws.github.io/soundcloud-api-ts/)
|
|
13
13
|
[](https://github.com/twin-paws/soundcloud-api-ts)
|
|
14
|
+
[](https://github.com/twin-paws/soundcloud-api-ts/blob/main/src/client/registry.ts)
|
|
14
15
|
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
Zero dependencies, native `fetch`, built-in OAuth 2.1 + PKCE, automatic retry, and an interactive CLI.
|
|
18
|
-
|
|
19
|
-
This package is intended to be the recommended option for developers looking for a TypeScript SoundCloud API client.
|
|
16
|
+
The TypeScript SoundCloud API client built on the official API. Zero runtime dependencies, native `fetch`, OAuth 2.1 + PKCE, production-grade retry and deduplication, pluggable cache, raw escape hatch, and an interactive CLI.
|
|
20
17
|
|
|
21
18
|
## Why This Package?
|
|
22
19
|
|
|
23
|
-
|
|
20
|
+
Most TypeScript SoundCloud clients fall into one of two categories: unmaintained wrappers that predate OAuth 2.1, or scrapers that harvest undocumented `api-v2` client IDs from browser dev tools and break whenever SoundCloud ships a frontend update. soundcloud-api-ts is neither.
|
|
24
21
|
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
- **
|
|
28
|
-
- **
|
|
29
|
-
- **
|
|
30
|
-
- **
|
|
31
|
-
- **
|
|
32
|
-
- **
|
|
33
|
-
- **
|
|
34
|
-
- **
|
|
35
|
-
- **
|
|
22
|
+
It is built on SoundCloud's **official documented API** with registered app credentials, OAuth 2.1 + PKCE, and a production-grade HTTP layer — all with zero runtime dependencies.
|
|
23
|
+
|
|
24
|
+
- **Official API only** — `api.soundcloud.com` + `secure.soundcloud.com` OAuth. No `api-v2` scraping, no harvested client IDs, no terms violations.
|
|
25
|
+
- **TypeScript-first** — full types ship in the package. No `@types/*` installs, no casting to `any`.
|
|
26
|
+
- **Zero dependencies** — native `fetch`, nothing in `node_modules` at runtime. 4.5 KB min+gz.
|
|
27
|
+
- **Production HTTP layer** — exponential backoff on 429/5xx, `Retry-After` header respected, in-flight GET deduplication, pluggable cache interface, `onRetry` hook.
|
|
28
|
+
- **Runtime portable** — inject your own `fetch` and `AbortController` for Cloudflare Workers, Bun, Deno, and Edge runtimes.
|
|
29
|
+
- **Raw escape hatch** — `sc.raw.get('/any/endpoint/{id}', { id })` calls anything in the spec, not just wrapped endpoints. Never blocked by a missing wrapper.
|
|
30
|
+
- **Full auth support** — client credentials flow for server-to-server, authorization code + PKCE for user-context operations, auto token refresh on 401.
|
|
31
|
+
- **Pagination built-in** — async iterators and `fetchAll` helpers across all paginated endpoints.
|
|
32
|
+
- **Interactive CLI** — `sc-cli tracks <id>`, `sc-cli search <query>`, `sc-cli me` from your terminal.
|
|
33
|
+
- **LLM-friendly** — ships `llms.txt`, `llms-full.txt`, and `AGENTS.md` for AI coding agents.
|
|
36
34
|
|
|
37
35
|
## Comparison
|
|
38
36
|
|
|
@@ -40,22 +38,23 @@ Unlike legacy JavaScript SoundCloud SDKs and community wrappers that require sep
|
|
|
40
38
|
| --- | --- | --- | --- |
|
|
41
39
|
| TypeScript | ✅ Native | ✅ | ✅ |
|
|
42
40
|
| Dependencies | **0** | 1 | 3 (lodash, cookie, undici) |
|
|
43
|
-
| Bundle size (min+gz) | **4.5 KB** | ❌ unbundlable
|
|
44
|
-
| Auth method | **Official OAuth 2.1** | ⚠️
|
|
41
|
+
| Bundle size (min+gz) | **4.5 KB** | ❌ unbundlable | 191 KB |
|
|
42
|
+
| Auth method | **Official OAuth 2.1** | ⚠️ Scrapes client ID | ⚠️ Scrapes client ID |
|
|
45
43
|
| PKCE support | ✅ | ❌ | ❌ |
|
|
46
|
-
| Auto token refresh | ✅
|
|
47
|
-
| Auto retry (429/5xx) | ✅
|
|
44
|
+
| Auto token refresh | ✅ | ❌ | ❌ |
|
|
45
|
+
| Auto retry (429/5xx) | ✅ + Retry-After | ❌ | ❌ |
|
|
46
|
+
| In-flight deduplication | ✅ | ❌ | ❌ |
|
|
47
|
+
| Pluggable cache interface | ✅ | ❌ | ❌ |
|
|
48
|
+
| Fetch injection (Workers/Bun/Deno) | ✅ | ❌ | ❌ |
|
|
49
|
+
| Raw escape hatch | ✅ `sc.raw` | ❌ | ❌ |
|
|
48
50
|
| CLI tool | ✅ `sc-cli` | ❌ | ❌ |
|
|
49
51
|
| Pagination helpers | ✅ async iterators | ❌ | ✅ |
|
|
50
52
|
| Typed errors | ✅ `SoundCloudError` | ❌ | ❌ |
|
|
51
53
|
| Test coverage | **100%** | — | — |
|
|
52
54
|
| API docs site | ✅ [TypeDoc](https://twin-paws.github.io/soundcloud-api-ts/) | ✅ | ❌ |
|
|
53
55
|
| LLM/AI-friendly | ✅ llms.txt + AGENTS.md | ❌ | ❌ |
|
|
54
|
-
| Maintained | ✅ 2026 | ✅ 2025 | ✅ 2026 |
|
|
55
56
|
|
|
56
|
-
> **Why does auth method matter?** `soundcloud.ts` and `soundcloud-fetch`
|
|
57
|
-
>
|
|
58
|
-
> `soundcloud-api-ts` uses the **official documented API** (`api.soundcloud.com`) with registered app credentials, OAuth 2.1 via `secure.soundcloud.com` as specified by SoundCloud, PKCE for public clients, and automatic token refresh.
|
|
57
|
+
> **Why does auth method matter?** `soundcloud.ts` and `soundcloud-fetch` scrape SoundCloud's undocumented `api-v2` and require harvesting a client ID from browser dev tools. This breaks whenever SoundCloud ships a frontend update, and the [API Terms of Use](https://developers.soundcloud.com/docs/api/terms-of-use) explicitly prohibit it: *"any attempt to circumvent this and obtain a new client ID and Security Code is strictly prohibited."*
|
|
59
58
|
|
|
60
59
|
**Coming from `soundcloud.ts`?** See the [Migration Guide](docs/MIGRATING.md) — most changes are find-and-replace.
|
|
61
60
|
|
|
@@ -182,6 +181,17 @@ await sc.auth.signOut(token.access_token);
|
|
|
182
181
|
sc.clearToken();
|
|
183
182
|
```
|
|
184
183
|
|
|
184
|
+
### Auth at a glance
|
|
185
|
+
|
|
186
|
+
| Endpoint category | Client Credentials | User Token |
|
|
187
|
+
|---|---|---|
|
|
188
|
+
| tracks, users, search, playlists, resolve | ✅ | ✅ |
|
|
189
|
+
| /me endpoints | ❌ | ✅ |
|
|
190
|
+
| likes, reposts | ❌ | ✅ |
|
|
191
|
+
| create/update/delete | ❌ | ✅ |
|
|
192
|
+
|
|
193
|
+
See [Auth Guide](docs/auth-guide.md) for full details, token provider patterns, and troubleshooting.
|
|
194
|
+
|
|
185
195
|
## Client Class
|
|
186
196
|
|
|
187
197
|
The `SoundCloudClient` class organizes all endpoints into namespaces. Token is resolved automatically when `setToken()` has been called. Override per-call via `{ token: "..." }` options object.
|
|
@@ -216,6 +226,7 @@ sc.me.unfollow(userUrn, options?)
|
|
|
216
226
|
sc.me.getFollowers(limit?, options?)
|
|
217
227
|
sc.me.getPlaylists(limit?, options?)
|
|
218
228
|
sc.me.getTracks(limit?, options?)
|
|
229
|
+
sc.me.getConnections(options?) // connected social accounts; may require app approval
|
|
219
230
|
|
|
220
231
|
// Users
|
|
221
232
|
sc.users.getUser(userId, options?)
|
|
@@ -229,6 +240,7 @@ sc.users.getWebProfiles(userId, options?)
|
|
|
229
240
|
|
|
230
241
|
// Tracks
|
|
231
242
|
sc.tracks.getTrack(trackId, options?)
|
|
243
|
+
sc.tracks.getTracks(ids[], options?) // batch fetch by IDs
|
|
232
244
|
sc.tracks.getStreams(trackId, options?)
|
|
233
245
|
sc.tracks.getComments(trackId, limit?, options?)
|
|
234
246
|
sc.tracks.createComment(trackId, body, timestamp?, options?)
|
|
@@ -577,6 +589,7 @@ See [CHANGELOG.md](CHANGELOG.md) for release history.
|
|
|
577
589
|
## Related Packages
|
|
578
590
|
|
|
579
591
|
- **[soundcloud-api-ts-next](https://github.com/twin-paws/soundcloud-api-ts-next)** — React hooks + Next.js API route handlers built on this package. Use it when building Next.js apps that need SoundCloud data with secrets kept server-side.
|
|
592
|
+
- **[soundcloud-widget-react](https://github.com/twin-paws/soundcloud-widget-react)** — React component for the SoundCloud HTML5 Widget API. Embed SoundCloud players and control playback programmatically. Complements this package for full SoundCloud integration.
|
|
580
593
|
|
|
581
594
|
## Contributing
|
|
582
595
|
|
|
@@ -353,6 +353,14 @@ var RawClient = class {
|
|
|
353
353
|
}
|
|
354
354
|
};
|
|
355
355
|
|
|
356
|
+
// src/utils/base64.ts
|
|
357
|
+
var toBase64 = (value) => {
|
|
358
|
+
if (typeof Buffer !== "undefined") {
|
|
359
|
+
return Buffer.from(value).toString("base64");
|
|
360
|
+
}
|
|
361
|
+
return btoa(value);
|
|
362
|
+
};
|
|
363
|
+
|
|
356
364
|
// src/client/SoundCloudClient.ts
|
|
357
365
|
function resolveToken(tokenGetter, explicit) {
|
|
358
366
|
const t = explicit ?? tokenGetter();
|
|
@@ -559,9 +567,7 @@ var SoundCloudClient = class _SoundCloudClient {
|
|
|
559
567
|
* @see https://developers.soundcloud.com/docs/api/explorer/open-api#/oauth2/post_oauth2_token
|
|
560
568
|
*/
|
|
561
569
|
async getClientToken() {
|
|
562
|
-
const basicAuth =
|
|
563
|
-
`${this.config.clientId}:${this.config.clientSecret}`
|
|
564
|
-
).toString("base64");
|
|
570
|
+
const basicAuth = toBase64(`${this.config.clientId}:${this.config.clientSecret}`);
|
|
565
571
|
return this.fetch({
|
|
566
572
|
path: "/oauth/token",
|
|
567
573
|
method: "POST",
|
|
@@ -620,13 +626,15 @@ var SoundCloudClient = class _SoundCloudClient {
|
|
|
620
626
|
* @see https://developers.soundcloud.com/docs/api/explorer/open-api#/oauth2/post_oauth2_token
|
|
621
627
|
*/
|
|
622
628
|
async refreshUserToken(refreshToken) {
|
|
629
|
+
const basicAuth = toBase64(`${this.config.clientId}:${this.config.clientSecret}`);
|
|
623
630
|
return this.fetch({
|
|
624
631
|
path: "/oauth/token",
|
|
625
632
|
method: "POST",
|
|
633
|
+
headers: {
|
|
634
|
+
Authorization: `Basic ${basicAuth}`
|
|
635
|
+
},
|
|
626
636
|
body: new URLSearchParams({
|
|
627
637
|
grant_type: "refresh_token",
|
|
628
|
-
client_id: this.config.clientId,
|
|
629
|
-
client_secret: this.config.clientSecret,
|
|
630
638
|
redirect_uri: this.config.redirectUri,
|
|
631
639
|
refresh_token: refreshToken
|
|
632
640
|
})
|
|
@@ -872,6 +880,27 @@ var SoundCloudClient = class _SoundCloudClient {
|
|
|
872
880
|
const t = resolveToken(this.getToken, options?.token);
|
|
873
881
|
return this.fetch({ path: `/me/tracks?${limit ? `limit=${limit}&` : ""}linked_partitioning=true`, method: "GET", token: t });
|
|
874
882
|
}
|
|
883
|
+
/**
|
|
884
|
+
* List the authenticated user's connected external social accounts.
|
|
885
|
+
*
|
|
886
|
+
* @param options - Optional token override
|
|
887
|
+
* @returns Array of connection objects for linked social services (Twitter, Facebook, etc.)
|
|
888
|
+
* @throws {SoundCloudError} When the API returns an error
|
|
889
|
+
*
|
|
890
|
+
* @remarks This endpoint may require elevated API access or app approval.
|
|
891
|
+
*
|
|
892
|
+
* @example
|
|
893
|
+
* ```ts
|
|
894
|
+
* const connections = await sc.me.getConnections();
|
|
895
|
+
* connections.forEach(c => console.log(c.service, c.display_name));
|
|
896
|
+
* ```
|
|
897
|
+
*
|
|
898
|
+
* @see https://developers.soundcloud.com/docs/api/explorer/open-api#/me/get_me_connections
|
|
899
|
+
*/
|
|
900
|
+
async getConnections(options) {
|
|
901
|
+
const t = resolveToken(this.getToken, options?.token);
|
|
902
|
+
return this.fetch({ path: "/me/connections", method: "GET", token: t });
|
|
903
|
+
}
|
|
875
904
|
}
|
|
876
905
|
SoundCloudClient2.Me = Me;
|
|
877
906
|
class Users {
|
|
@@ -1043,6 +1072,34 @@ var SoundCloudClient = class _SoundCloudClient {
|
|
|
1043
1072
|
const t = resolveToken(this.getToken, options?.token);
|
|
1044
1073
|
return this.fetch({ path: `/tracks/${trackId}`, method: "GET", token: t });
|
|
1045
1074
|
}
|
|
1075
|
+
/**
|
|
1076
|
+
* Fetch multiple tracks by their IDs in a single request.
|
|
1077
|
+
*
|
|
1078
|
+
* @param ids - Array of track IDs (numeric or string URNs)
|
|
1079
|
+
* @param options - Optional token override
|
|
1080
|
+
* @returns Array of track objects (may be shorter than `ids` if some tracks are unavailable)
|
|
1081
|
+
* @throws {SoundCloudError} When the API returns an error
|
|
1082
|
+
* @throws {Error} When more than 200 IDs are provided
|
|
1083
|
+
*
|
|
1084
|
+
* @remarks
|
|
1085
|
+
* SoundCloud's API likely caps at ~200 IDs per request. Passing more than 200 IDs
|
|
1086
|
+
* will throw immediately without making a network request.
|
|
1087
|
+
*
|
|
1088
|
+
* @example
|
|
1089
|
+
* ```ts
|
|
1090
|
+
* const tracks = await sc.tracks.getTracks([123456, 234567, 345678]);
|
|
1091
|
+
* tracks.forEach(t => console.log(t.title));
|
|
1092
|
+
* ```
|
|
1093
|
+
*
|
|
1094
|
+
* @see https://developers.soundcloud.com/docs/api/explorer/open-api#/tracks/get_tracks
|
|
1095
|
+
*/
|
|
1096
|
+
async getTracks(ids, options) {
|
|
1097
|
+
if (ids.length > 200) {
|
|
1098
|
+
throw new Error("getTracks: SoundCloud API supports a maximum of 200 IDs per request");
|
|
1099
|
+
}
|
|
1100
|
+
const t = resolveToken(this.getToken, options?.token);
|
|
1101
|
+
return this.fetch({ path: `/tracks?ids=${ids.join(",")}`, method: "GET", token: t });
|
|
1102
|
+
}
|
|
1046
1103
|
/**
|
|
1047
1104
|
* Get stream URLs for a track.
|
|
1048
1105
|
*
|
|
@@ -1639,6 +1696,7 @@ var IMPLEMENTED_OPERATIONS = [
|
|
|
1639
1696
|
"get_me_followers",
|
|
1640
1697
|
"get_me_playlists",
|
|
1641
1698
|
"get_me_tracks",
|
|
1699
|
+
"get_me_connections",
|
|
1642
1700
|
// Users
|
|
1643
1701
|
"get_users_user_id",
|
|
1644
1702
|
"get_users_user_id_followers",
|
|
@@ -1683,7 +1741,7 @@ var IMPLEMENTED_OPERATIONS = [
|
|
|
1683
1741
|
|
|
1684
1742
|
// src/auth/getClientToken.ts
|
|
1685
1743
|
var getClientToken = (clientId, clientSecret) => {
|
|
1686
|
-
const basicAuth =
|
|
1744
|
+
const basicAuth = toBase64(`${clientId}:${clientSecret}`);
|
|
1687
1745
|
return scFetch({
|
|
1688
1746
|
path: "/oauth/token",
|
|
1689
1747
|
method: "POST",
|
|
@@ -1715,13 +1773,15 @@ var getUserToken = (clientId, clientSecret, redirectUri, code, codeVerifier) =>
|
|
|
1715
1773
|
|
|
1716
1774
|
// src/auth/refreshUserToken.ts
|
|
1717
1775
|
var refreshUserToken = (clientId, clientSecret, redirectUri, refreshToken) => {
|
|
1776
|
+
const basicAuth = toBase64(`${clientId}:${clientSecret}`);
|
|
1718
1777
|
return scFetch({
|
|
1719
1778
|
path: "/oauth/token",
|
|
1720
1779
|
method: "POST",
|
|
1780
|
+
headers: {
|
|
1781
|
+
Authorization: `Basic ${basicAuth}`
|
|
1782
|
+
},
|
|
1721
1783
|
body: new URLSearchParams({
|
|
1722
1784
|
grant_type: "refresh_token",
|
|
1723
|
-
client_id: clientId,
|
|
1724
|
-
client_secret: clientSecret,
|
|
1725
1785
|
redirect_uri: redirectUri,
|
|
1726
1786
|
refresh_token: refreshToken
|
|
1727
1787
|
})
|
|
@@ -1800,6 +1860,18 @@ var getUserWebProfiles = (token, userId) => scFetch({ path: `/users/${userId}/we
|
|
|
1800
1860
|
// src/tracks/getTrack.ts
|
|
1801
1861
|
var getTrack = (token, trackId) => scFetch({ path: `/tracks/${trackId}`, method: "GET", token });
|
|
1802
1862
|
|
|
1863
|
+
// src/tracks/getTracks.ts
|
|
1864
|
+
var getTracks = (token, ids) => {
|
|
1865
|
+
if (ids.length > 200) {
|
|
1866
|
+
throw new Error("getTracks: SoundCloud API supports a maximum of 200 IDs per request");
|
|
1867
|
+
}
|
|
1868
|
+
return scFetch({
|
|
1869
|
+
path: `/tracks?ids=${ids.join(",")}`,
|
|
1870
|
+
method: "GET",
|
|
1871
|
+
token
|
|
1872
|
+
});
|
|
1873
|
+
};
|
|
1874
|
+
|
|
1803
1875
|
// src/tracks/getComments.ts
|
|
1804
1876
|
var getTrackComments = (token, trackId, limit) => scFetch({ path: `/tracks/${trackId}/comments?threaded=1&filter_replies=0${limit ? `&limit=${limit}` : ""}&linked_partitioning=true`, method: "GET", token });
|
|
1805
1877
|
|
|
@@ -1918,6 +1990,9 @@ var getMePlaylists = (token, limit) => scFetch({ path: `/me/playlists?${limit ?
|
|
|
1918
1990
|
// src/me/tracks.ts
|
|
1919
1991
|
var getMeTracks = (token, limit) => scFetch({ path: `/me/tracks?${limit ? `limit=${limit}&` : ""}linked_partitioning=true`, method: "GET", token });
|
|
1920
1992
|
|
|
1993
|
+
// src/me/connections.ts
|
|
1994
|
+
var getMeConnections = (token) => scFetch({ path: "/me/connections", method: "GET", token });
|
|
1995
|
+
|
|
1921
1996
|
// src/likes/index.ts
|
|
1922
1997
|
var likePlaylist = async (token, playlistId) => {
|
|
1923
1998
|
try {
|
|
@@ -1973,6 +2048,6 @@ var unrepostPlaylist = async (token, playlistId) => {
|
|
|
1973
2048
|
// src/utils/widget.ts
|
|
1974
2049
|
var getSoundCloudWidgetUrl = (trackId) => `https%3A//api.soundcloud.com/tracks/${trackId}&show_teaser=false&color=%2300a99d&inverse=false&show_user=false&sharing=false&buying=false&liking=false&show_artwork=false&show_name=false`;
|
|
1975
2050
|
|
|
1976
|
-
export { IMPLEMENTED_OPERATIONS, InFlightDeduper, RawClient, SoundCloudClient, createPlaylist, createTrackComment, deletePlaylist, deleteTrack, fetchAll, followUser, generateCodeChallenge, generateCodeVerifier, getAuthorizationUrl, getClientToken, getFollowers, getFollowings, getMe, getMeActivities, getMeActivitiesOwn, getMeActivitiesTracks, getMeFollowers, getMeFollowings, getMeFollowingsTracks, getMeLikesPlaylists, getMeLikesTracks, getMePlaylists, getMeTracks, getPlaylist, getPlaylistReposts, getPlaylistTracks, getRelatedTracks, getSoundCloudWidgetUrl, getTrack, getTrackComments, getTrackLikes, getTrackReposts, getTrackStreams, 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 };
|
|
1977
|
-
//# sourceMappingURL=chunk-
|
|
1978
|
-
//# sourceMappingURL=chunk-
|
|
2051
|
+
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 };
|
|
2052
|
+
//# sourceMappingURL=chunk-CCHK5S6S.mjs.map
|
|
2053
|
+
//# sourceMappingURL=chunk-CCHK5S6S.mjs.map
|