@rocksky/sdk 0.2.0 → 0.2.2
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/dist/client.d.ts +37 -28
- package/dist/client.d.ts.map +1 -1
- package/dist/generated/types.d.ts +120 -0
- package/dist/generated/types.d.ts.map +1 -1
- package/dist/http.d.ts +1 -1
- package/dist/http.d.ts.map +1 -1
- package/dist/index.d.ts +18 -17
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +6 -1
- package/dist/namespaces/_helpers.d.ts +10 -4
- package/dist/namespaces/_helpers.d.ts.map +1 -1
- package/dist/namespaces/actor.d.ts +12 -12
- package/dist/namespaces/actor.d.ts.map +1 -1
- package/dist/namespaces/album.d.ts +6 -6
- package/dist/namespaces/album.d.ts.map +1 -1
- package/dist/namespaces/apikey.d.ts +7 -7
- package/dist/namespaces/apikey.d.ts.map +1 -1
- package/dist/namespaces/artist.d.ts +9 -9
- package/dist/namespaces/artist.d.ts.map +1 -1
- package/dist/namespaces/charts.d.ts +6 -6
- package/dist/namespaces/charts.d.ts.map +1 -1
- package/dist/namespaces/dropbox.d.ts +7 -7
- package/dist/namespaces/dropbox.d.ts.map +1 -1
- package/dist/namespaces/feed.d.ts +13 -13
- package/dist/namespaces/feed.d.ts.map +1 -1
- package/dist/namespaces/googledrive.d.ts +6 -6
- package/dist/namespaces/googledrive.d.ts.map +1 -1
- package/dist/namespaces/graph.d.ts +8 -8
- package/dist/namespaces/graph.d.ts.map +1 -1
- package/dist/namespaces/like.d.ts +7 -7
- package/dist/namespaces/like.d.ts.map +1 -1
- package/dist/namespaces/mirror.d.ts +5 -5
- package/dist/namespaces/mirror.d.ts.map +1 -1
- package/dist/namespaces/player.d.ts +14 -14
- package/dist/namespaces/player.d.ts.map +1 -1
- package/dist/namespaces/playlist.d.ts +11 -11
- package/dist/namespaces/playlist.d.ts.map +1 -1
- package/dist/namespaces/scrobble.d.ts +6 -6
- package/dist/namespaces/scrobble.d.ts.map +1 -1
- package/dist/namespaces/shout.d.ts +12 -12
- package/dist/namespaces/shout.d.ts.map +1 -1
- package/dist/namespaces/song.d.ts +8 -8
- package/dist/namespaces/song.d.ts.map +1 -1
- package/dist/namespaces/spotify.d.ts +9 -9
- package/dist/namespaces/spotify.d.ts.map +1 -1
- package/dist/namespaces/stats.d.ts +5 -5
- package/dist/namespaces/stats.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/client.ts +50 -33
- package/src/generated/types.ts +124 -0
- package/src/http.ts +2 -2
- package/src/index.ts +19 -17
- package/src/namespaces/_helpers.ts +23 -13
- package/src/namespaces/actor.ts +21 -21
- package/src/namespaces/album.ts +9 -9
- package/src/namespaces/apikey.ts +11 -11
- package/src/namespaces/artist.ts +15 -15
- package/src/namespaces/charts.ts +9 -9
- package/src/namespaces/dropbox.ts +11 -11
- package/src/namespaces/feed.ts +23 -23
- package/src/namespaces/googledrive.ts +9 -9
- package/src/namespaces/graph.ts +13 -13
- package/src/namespaces/like.ts +11 -11
- package/src/namespaces/mirror.ts +7 -7
- package/src/namespaces/player.ts +25 -25
- package/src/namespaces/playlist.ts +19 -19
- package/src/namespaces/scrobble.ts +9 -9
- package/src/namespaces/shout.ts +21 -21
- package/src/namespaces/song.ts +13 -13
- package/src/namespaces/spotify.ts +15 -15
- package/src/namespaces/stats.ts +7 -7
- package/src/pipe.ts +1 -1
- package/src/realtime.ts +2 -2
package/src/namespaces/artist.ts
CHANGED
|
@@ -5,9 +5,9 @@ import type {
|
|
|
5
5
|
GetArtistRecentListenersParams,
|
|
6
6
|
GetArtistsParams,
|
|
7
7
|
GetArtistTracksParams,
|
|
8
|
-
} from "../generated/types";
|
|
9
|
-
import type { RequestOptions } from "../types";
|
|
10
|
-
import type { Call } from "./_helpers";
|
|
8
|
+
} from "../generated/types.js";
|
|
9
|
+
import type { RequestOptions } from "../types.js";
|
|
10
|
+
import type { Call } from "./_helpers.js";
|
|
11
11
|
|
|
12
12
|
export type { GetArtistsParams, GetArtistTracksParams };
|
|
13
13
|
export type ArtistListenersParams = GetArtistListenersParams;
|
|
@@ -15,52 +15,52 @@ export type ArtistListenersParams = GetArtistListenersParams;
|
|
|
15
15
|
export class ArtistNamespace {
|
|
16
16
|
constructor(private readonly call: Call) {}
|
|
17
17
|
|
|
18
|
-
getArtist
|
|
19
|
-
return this.call
|
|
18
|
+
getArtist(params: GetArtistParams, opts?: RequestOptions) {
|
|
19
|
+
return this.call("app.rocksky.artist.getArtist", "GET", {
|
|
20
20
|
params,
|
|
21
21
|
...opts,
|
|
22
22
|
});
|
|
23
23
|
}
|
|
24
24
|
|
|
25
|
-
getArtists
|
|
26
|
-
return this.call
|
|
25
|
+
getArtists(params: GetArtistsParams = {}, opts?: RequestOptions) {
|
|
26
|
+
return this.call("app.rocksky.artist.getArtists", "GET", {
|
|
27
27
|
params,
|
|
28
28
|
...opts,
|
|
29
29
|
});
|
|
30
30
|
}
|
|
31
31
|
|
|
32
|
-
getArtistAlbums
|
|
33
|
-
return this.call
|
|
32
|
+
getArtistAlbums(params: GetArtistAlbumsParams, opts?: RequestOptions) {
|
|
33
|
+
return this.call("app.rocksky.artist.getArtistAlbums", "GET", {
|
|
34
34
|
params,
|
|
35
35
|
...opts,
|
|
36
36
|
});
|
|
37
37
|
}
|
|
38
38
|
|
|
39
|
-
getArtistTracks
|
|
39
|
+
getArtistTracks(
|
|
40
40
|
params: GetArtistTracksParams = {},
|
|
41
41
|
opts?: RequestOptions,
|
|
42
42
|
) {
|
|
43
|
-
return this.call
|
|
43
|
+
return this.call("app.rocksky.artist.getArtistTracks", "GET", {
|
|
44
44
|
params,
|
|
45
45
|
...opts,
|
|
46
46
|
});
|
|
47
47
|
}
|
|
48
48
|
|
|
49
|
-
getArtistListeners
|
|
49
|
+
getArtistListeners(
|
|
50
50
|
params: GetArtistListenersParams,
|
|
51
51
|
opts?: RequestOptions,
|
|
52
52
|
) {
|
|
53
|
-
return this.call
|
|
53
|
+
return this.call("app.rocksky.artist.getArtistListeners", "GET", {
|
|
54
54
|
params,
|
|
55
55
|
...opts,
|
|
56
56
|
});
|
|
57
57
|
}
|
|
58
58
|
|
|
59
|
-
getArtistRecentListeners
|
|
59
|
+
getArtistRecentListeners(
|
|
60
60
|
params: GetArtistRecentListenersParams,
|
|
61
61
|
opts?: RequestOptions,
|
|
62
62
|
) {
|
|
63
|
-
return this.call
|
|
63
|
+
return this.call("app.rocksky.artist.getArtistRecentListeners", "GET", {
|
|
64
64
|
params,
|
|
65
65
|
...opts,
|
|
66
66
|
});
|
package/src/namespaces/charts.ts
CHANGED
|
@@ -2,9 +2,9 @@ import type {
|
|
|
2
2
|
GetScrobblesChartParams,
|
|
3
3
|
GetTopArtistsParams,
|
|
4
4
|
GetTopTracksParams,
|
|
5
|
-
} from "../generated/types";
|
|
6
|
-
import type { RequestOptions } from "../types";
|
|
7
|
-
import type { Call } from "./_helpers";
|
|
5
|
+
} from "../generated/types.js";
|
|
6
|
+
import type { RequestOptions } from "../types.js";
|
|
7
|
+
import type { Call } from "./_helpers.js";
|
|
8
8
|
|
|
9
9
|
export type ScrobblesChartParams = GetScrobblesChartParams;
|
|
10
10
|
export type TopChartParams = GetTopArtistsParams;
|
|
@@ -12,25 +12,25 @@ export type TopChartParams = GetTopArtistsParams;
|
|
|
12
12
|
export class ChartsNamespace {
|
|
13
13
|
constructor(private readonly call: Call) {}
|
|
14
14
|
|
|
15
|
-
getScrobblesChart
|
|
15
|
+
getScrobblesChart(
|
|
16
16
|
params: ScrobblesChartParams = {},
|
|
17
17
|
opts?: RequestOptions,
|
|
18
18
|
) {
|
|
19
|
-
return this.call
|
|
19
|
+
return this.call("app.rocksky.charts.getScrobblesChart", "GET", {
|
|
20
20
|
params,
|
|
21
21
|
...opts,
|
|
22
22
|
});
|
|
23
23
|
}
|
|
24
24
|
|
|
25
|
-
getTopArtists
|
|
26
|
-
return this.call
|
|
25
|
+
getTopArtists(params: GetTopArtistsParams = {}, opts?: RequestOptions) {
|
|
26
|
+
return this.call("app.rocksky.charts.getTopArtists", "GET", {
|
|
27
27
|
params,
|
|
28
28
|
...opts,
|
|
29
29
|
});
|
|
30
30
|
}
|
|
31
31
|
|
|
32
|
-
getTopTracks
|
|
33
|
-
return this.call
|
|
32
|
+
getTopTracks(params: GetTopTracksParams = {}, opts?: RequestOptions) {
|
|
33
|
+
return this.call("app.rocksky.charts.getTopTracks", "GET", {
|
|
34
34
|
params,
|
|
35
35
|
...opts,
|
|
36
36
|
});
|
|
@@ -3,48 +3,48 @@ import type {
|
|
|
3
3
|
GetFilesParams,
|
|
4
4
|
GetMetadataParams,
|
|
5
5
|
GetTemporaryLinkParams,
|
|
6
|
-
} from "../generated/types";
|
|
7
|
-
import type { RequestOptions } from "../types";
|
|
8
|
-
import type { Call } from "./_helpers";
|
|
6
|
+
} from "../generated/types.js";
|
|
7
|
+
import type { RequestOptions } from "../types.js";
|
|
8
|
+
import type { Call } from "./_helpers.js";
|
|
9
9
|
|
|
10
10
|
export class DropboxNamespace {
|
|
11
11
|
constructor(private readonly call: Call) {}
|
|
12
12
|
|
|
13
|
-
getFiles
|
|
13
|
+
getFiles(
|
|
14
14
|
params: GetFilesParams = {},
|
|
15
15
|
opts?: RequestOptions,
|
|
16
16
|
) {
|
|
17
|
-
return this.call
|
|
17
|
+
return this.call("app.rocksky.dropbox.getFiles", "GET", {
|
|
18
18
|
params,
|
|
19
19
|
requireAuth: true,
|
|
20
20
|
...opts,
|
|
21
21
|
});
|
|
22
22
|
}
|
|
23
23
|
|
|
24
|
-
getMetadata
|
|
25
|
-
return this.call
|
|
24
|
+
getMetadata(params: GetMetadataParams, opts?: RequestOptions) {
|
|
25
|
+
return this.call("app.rocksky.dropbox.getMetadata", "GET", {
|
|
26
26
|
params,
|
|
27
27
|
requireAuth: true,
|
|
28
28
|
...opts,
|
|
29
29
|
});
|
|
30
30
|
}
|
|
31
31
|
|
|
32
|
-
getTemporaryLink
|
|
32
|
+
getTemporaryLink(
|
|
33
33
|
params: GetTemporaryLinkParams,
|
|
34
34
|
opts?: RequestOptions,
|
|
35
35
|
) {
|
|
36
|
-
return this.call
|
|
36
|
+
return this.call("app.rocksky.dropbox.getTemporaryLink", "GET", {
|
|
37
37
|
params,
|
|
38
38
|
requireAuth: true,
|
|
39
39
|
...opts,
|
|
40
40
|
});
|
|
41
41
|
}
|
|
42
42
|
|
|
43
|
-
downloadFile
|
|
43
|
+
downloadFile(
|
|
44
44
|
params: DownloadFileParams,
|
|
45
45
|
opts?: RequestOptions,
|
|
46
46
|
) {
|
|
47
|
-
return this.call
|
|
47
|
+
return this.call("app.rocksky.dropbox.downloadFile", "GET", {
|
|
48
48
|
params,
|
|
49
49
|
requireAuth: true,
|
|
50
50
|
...opts,
|
package/src/namespaces/feed.ts
CHANGED
|
@@ -8,103 +8,103 @@ import type {
|
|
|
8
8
|
GetRecommendationsParams,
|
|
9
9
|
GetStoriesParams,
|
|
10
10
|
SearchParams,
|
|
11
|
-
} from "../generated/types";
|
|
12
|
-
import type { RequestOptions } from "../types";
|
|
13
|
-
import type { Call } from "./_helpers";
|
|
11
|
+
} from "../generated/types.js";
|
|
12
|
+
import type { RequestOptions } from "../types.js";
|
|
13
|
+
import type { Call } from "./_helpers.js";
|
|
14
14
|
|
|
15
15
|
export type RecommendParams = GetRecommendationsParams;
|
|
16
16
|
|
|
17
17
|
export class FeedNamespace {
|
|
18
18
|
constructor(private readonly call: Call) {}
|
|
19
19
|
|
|
20
|
-
search
|
|
21
|
-
return this.call
|
|
20
|
+
search(params: SearchParams, opts?: RequestOptions) {
|
|
21
|
+
return this.call("app.rocksky.feed.search", "GET", {
|
|
22
22
|
params,
|
|
23
23
|
...opts,
|
|
24
24
|
});
|
|
25
25
|
}
|
|
26
26
|
|
|
27
|
-
getFeed
|
|
27
|
+
getFeed(
|
|
28
28
|
params: GetFeedParams,
|
|
29
29
|
opts?: RequestOptions,
|
|
30
30
|
) {
|
|
31
|
-
return this.call
|
|
31
|
+
return this.call("app.rocksky.feed.getFeed", "GET", {
|
|
32
32
|
params,
|
|
33
33
|
...opts,
|
|
34
34
|
});
|
|
35
35
|
}
|
|
36
36
|
|
|
37
|
-
getFeedGenerators
|
|
37
|
+
getFeedGenerators(
|
|
38
38
|
params: GetFeedGeneratorsParams = {},
|
|
39
39
|
opts?: RequestOptions,
|
|
40
40
|
) {
|
|
41
|
-
return this.call
|
|
41
|
+
return this.call("app.rocksky.feed.getFeedGenerators", "GET", {
|
|
42
42
|
params,
|
|
43
43
|
...opts,
|
|
44
44
|
});
|
|
45
45
|
}
|
|
46
46
|
|
|
47
|
-
getFeedGenerator
|
|
47
|
+
getFeedGenerator(
|
|
48
48
|
params: GetFeedGeneratorParams,
|
|
49
49
|
opts?: RequestOptions,
|
|
50
50
|
) {
|
|
51
|
-
return this.call
|
|
51
|
+
return this.call("app.rocksky.feed.getFeedGenerator", "GET", {
|
|
52
52
|
params,
|
|
53
53
|
...opts,
|
|
54
54
|
});
|
|
55
55
|
}
|
|
56
56
|
|
|
57
|
-
describeFeedGenerator
|
|
58
|
-
return this.call
|
|
57
|
+
describeFeedGenerator(opts?: RequestOptions) {
|
|
58
|
+
return this.call("app.rocksky.feed.describeFeedGenerator", "GET", {
|
|
59
59
|
...opts,
|
|
60
60
|
});
|
|
61
61
|
}
|
|
62
62
|
|
|
63
|
-
getFeedSkeleton
|
|
63
|
+
getFeedSkeleton(
|
|
64
64
|
params: GetFeedSkeletonParams,
|
|
65
65
|
opts?: RequestOptions,
|
|
66
66
|
) {
|
|
67
|
-
return this.call
|
|
67
|
+
return this.call("app.rocksky.feed.getFeedSkeleton", "GET", {
|
|
68
68
|
params,
|
|
69
69
|
...opts,
|
|
70
70
|
});
|
|
71
71
|
}
|
|
72
72
|
|
|
73
|
-
getRecommendations
|
|
73
|
+
getRecommendations(
|
|
74
74
|
params: GetRecommendationsParams,
|
|
75
75
|
opts?: RequestOptions,
|
|
76
76
|
) {
|
|
77
|
-
return this.call
|
|
77
|
+
return this.call("app.rocksky.feed.getRecommendations", "GET", {
|
|
78
78
|
params,
|
|
79
79
|
...opts,
|
|
80
80
|
});
|
|
81
81
|
}
|
|
82
82
|
|
|
83
|
-
getArtistRecommendations
|
|
83
|
+
getArtistRecommendations(
|
|
84
84
|
params: GetArtistRecommendationsParams,
|
|
85
85
|
opts?: RequestOptions,
|
|
86
86
|
) {
|
|
87
|
-
return this.call
|
|
87
|
+
return this.call("app.rocksky.feed.getArtistRecommendations", "GET", {
|
|
88
88
|
params,
|
|
89
89
|
...opts,
|
|
90
90
|
});
|
|
91
91
|
}
|
|
92
92
|
|
|
93
|
-
getAlbumRecommendations
|
|
93
|
+
getAlbumRecommendations(
|
|
94
94
|
params: GetAlbumRecommendationsParams,
|
|
95
95
|
opts?: RequestOptions,
|
|
96
96
|
) {
|
|
97
|
-
return this.call
|
|
97
|
+
return this.call("app.rocksky.feed.getAlbumRecommendations", "GET", {
|
|
98
98
|
params,
|
|
99
99
|
...opts,
|
|
100
100
|
});
|
|
101
101
|
}
|
|
102
102
|
|
|
103
|
-
getStories
|
|
103
|
+
getStories(
|
|
104
104
|
params: GetStoriesParams = {},
|
|
105
105
|
opts?: RequestOptions,
|
|
106
106
|
) {
|
|
107
|
-
return this.call
|
|
107
|
+
return this.call("app.rocksky.feed.getStories", "GET", {
|
|
108
108
|
params,
|
|
109
109
|
...opts,
|
|
110
110
|
});
|
|
@@ -2,37 +2,37 @@ import type {
|
|
|
2
2
|
DownloadFileParams,
|
|
3
3
|
GetFileParams,
|
|
4
4
|
GetFilesParams,
|
|
5
|
-
} from "../generated/types";
|
|
6
|
-
import type { RequestOptions } from "../types";
|
|
7
|
-
import type { Call } from "./_helpers";
|
|
5
|
+
} from "../generated/types.js";
|
|
6
|
+
import type { RequestOptions } from "../types.js";
|
|
7
|
+
import type { Call } from "./_helpers.js";
|
|
8
8
|
|
|
9
9
|
export class GoogleDriveNamespace {
|
|
10
10
|
constructor(private readonly call: Call) {}
|
|
11
11
|
|
|
12
|
-
getFile
|
|
13
|
-
return this.call
|
|
12
|
+
getFile(params: GetFileParams, opts?: RequestOptions) {
|
|
13
|
+
return this.call("app.rocksky.googledrive.getFile", "GET", {
|
|
14
14
|
params,
|
|
15
15
|
requireAuth: true,
|
|
16
16
|
...opts,
|
|
17
17
|
});
|
|
18
18
|
}
|
|
19
19
|
|
|
20
|
-
getFiles
|
|
20
|
+
getFiles(
|
|
21
21
|
params: GetFilesParams = {},
|
|
22
22
|
opts?: RequestOptions,
|
|
23
23
|
) {
|
|
24
|
-
return this.call
|
|
24
|
+
return this.call("app.rocksky.googledrive.getFiles", "GET", {
|
|
25
25
|
params,
|
|
26
26
|
requireAuth: true,
|
|
27
27
|
...opts,
|
|
28
28
|
});
|
|
29
29
|
}
|
|
30
30
|
|
|
31
|
-
downloadFile
|
|
31
|
+
downloadFile(
|
|
32
32
|
params: DownloadFileParams,
|
|
33
33
|
opts?: RequestOptions,
|
|
34
34
|
) {
|
|
35
|
-
return this.call
|
|
35
|
+
return this.call("app.rocksky.googledrive.downloadFile", "GET", {
|
|
36
36
|
params,
|
|
37
37
|
requireAuth: true,
|
|
38
38
|
...opts,
|
package/src/namespaces/graph.ts
CHANGED
|
@@ -4,9 +4,9 @@ import type {
|
|
|
4
4
|
GetFollowsParams,
|
|
5
5
|
GetKnownFollowersParams,
|
|
6
6
|
UnfollowAccountParams,
|
|
7
|
-
} from "../generated/types";
|
|
8
|
-
import type { RequestOptions } from "../types";
|
|
9
|
-
import type { Call } from "./_helpers";
|
|
7
|
+
} from "../generated/types.js";
|
|
8
|
+
import type { RequestOptions } from "../types.js";
|
|
9
|
+
import type { Call } from "./_helpers.js";
|
|
10
10
|
|
|
11
11
|
export type FollowListParams = GetFollowersParams;
|
|
12
12
|
export type KnownFollowersParams = GetKnownFollowersParams;
|
|
@@ -14,47 +14,47 @@ export type KnownFollowersParams = GetKnownFollowersParams;
|
|
|
14
14
|
export class GraphNamespace {
|
|
15
15
|
constructor(private readonly call: Call) {}
|
|
16
16
|
|
|
17
|
-
followAccount
|
|
17
|
+
followAccount(
|
|
18
18
|
params: FollowAccountParams,
|
|
19
19
|
opts?: RequestOptions,
|
|
20
20
|
) {
|
|
21
|
-
return this.call
|
|
21
|
+
return this.call("app.rocksky.graph.followAccount", "POST", {
|
|
22
22
|
params,
|
|
23
23
|
requireAuth: true,
|
|
24
24
|
...opts,
|
|
25
25
|
});
|
|
26
26
|
}
|
|
27
27
|
|
|
28
|
-
unfollowAccount
|
|
28
|
+
unfollowAccount(
|
|
29
29
|
params: UnfollowAccountParams,
|
|
30
30
|
opts?: RequestOptions,
|
|
31
31
|
) {
|
|
32
|
-
return this.call
|
|
32
|
+
return this.call("app.rocksky.graph.unfollowAccount", "POST", {
|
|
33
33
|
params,
|
|
34
34
|
requireAuth: true,
|
|
35
35
|
...opts,
|
|
36
36
|
});
|
|
37
37
|
}
|
|
38
38
|
|
|
39
|
-
getFollowers
|
|
40
|
-
return this.call
|
|
39
|
+
getFollowers(params: GetFollowersParams, opts?: RequestOptions) {
|
|
40
|
+
return this.call("app.rocksky.graph.getFollowers", "GET", {
|
|
41
41
|
params,
|
|
42
42
|
...opts,
|
|
43
43
|
});
|
|
44
44
|
}
|
|
45
45
|
|
|
46
|
-
getFollows
|
|
47
|
-
return this.call
|
|
46
|
+
getFollows(params: GetFollowsParams, opts?: RequestOptions) {
|
|
47
|
+
return this.call("app.rocksky.graph.getFollows", "GET", {
|
|
48
48
|
params,
|
|
49
49
|
...opts,
|
|
50
50
|
});
|
|
51
51
|
}
|
|
52
52
|
|
|
53
|
-
getKnownFollowers
|
|
53
|
+
getKnownFollowers(
|
|
54
54
|
params: GetKnownFollowersParams,
|
|
55
55
|
opts?: RequestOptions,
|
|
56
56
|
) {
|
|
57
|
-
return this.call
|
|
57
|
+
return this.call("app.rocksky.graph.getKnownFollowers", "GET", {
|
|
58
58
|
params,
|
|
59
59
|
...opts,
|
|
60
60
|
});
|
package/src/namespaces/like.ts
CHANGED
|
@@ -3,41 +3,41 @@ import type {
|
|
|
3
3
|
DislikeSongInput,
|
|
4
4
|
LikeShoutInput,
|
|
5
5
|
LikeSongInput,
|
|
6
|
-
} from "../generated/types";
|
|
7
|
-
import type { RequestOptions } from "../types";
|
|
8
|
-
import type { Call } from "./_helpers";
|
|
6
|
+
} from "../generated/types.js";
|
|
7
|
+
import type { RequestOptions } from "../types.js";
|
|
8
|
+
import type { Call } from "./_helpers.js";
|
|
9
9
|
|
|
10
10
|
export type LikeInput = LikeSongInput;
|
|
11
11
|
|
|
12
12
|
export class LikeNamespace {
|
|
13
13
|
constructor(private readonly call: Call) {}
|
|
14
14
|
|
|
15
|
-
likeSong
|
|
16
|
-
return this.call
|
|
15
|
+
likeSong(input: LikeSongInput = {}, opts?: RequestOptions) {
|
|
16
|
+
return this.call("app.rocksky.like.likeSong", "POST", {
|
|
17
17
|
body: input,
|
|
18
18
|
requireAuth: true,
|
|
19
19
|
...opts,
|
|
20
20
|
});
|
|
21
21
|
}
|
|
22
22
|
|
|
23
|
-
dislikeSong
|
|
24
|
-
return this.call
|
|
23
|
+
dislikeSong(input: DislikeSongInput = {}, opts?: RequestOptions) {
|
|
24
|
+
return this.call("app.rocksky.like.dislikeSong", "POST", {
|
|
25
25
|
body: input,
|
|
26
26
|
requireAuth: true,
|
|
27
27
|
...opts,
|
|
28
28
|
});
|
|
29
29
|
}
|
|
30
30
|
|
|
31
|
-
likeShout
|
|
32
|
-
return this.call
|
|
31
|
+
likeShout(input: LikeShoutInput = {}, opts?: RequestOptions) {
|
|
32
|
+
return this.call("app.rocksky.like.likeShout", "POST", {
|
|
33
33
|
body: input,
|
|
34
34
|
requireAuth: true,
|
|
35
35
|
...opts,
|
|
36
36
|
});
|
|
37
37
|
}
|
|
38
38
|
|
|
39
|
-
dislikeShout
|
|
40
|
-
return this.call
|
|
39
|
+
dislikeShout(input: DislikeShoutInput = {}, opts?: RequestOptions) {
|
|
40
|
+
return this.call("app.rocksky.like.dislikeShout", "POST", {
|
|
41
41
|
body: input,
|
|
42
42
|
requireAuth: true,
|
|
43
43
|
...opts,
|
package/src/namespaces/mirror.ts
CHANGED
|
@@ -1,24 +1,24 @@
|
|
|
1
|
-
import type { PutMirrorSourceInput } from "../generated/types";
|
|
2
|
-
import type { RequestOptions } from "../types";
|
|
3
|
-
import type { Call } from "./_helpers";
|
|
1
|
+
import type { PutMirrorSourceInput } from "../generated/types.js";
|
|
2
|
+
import type { RequestOptions } from "../types.js";
|
|
3
|
+
import type { Call } from "./_helpers.js";
|
|
4
4
|
|
|
5
5
|
export type { PutMirrorSourceInput };
|
|
6
6
|
|
|
7
7
|
export class MirrorNamespace {
|
|
8
8
|
constructor(private readonly call: Call) {}
|
|
9
9
|
|
|
10
|
-
getMirrorSources
|
|
11
|
-
return this.call
|
|
10
|
+
getMirrorSources(opts?: RequestOptions) {
|
|
11
|
+
return this.call("app.rocksky.mirror.getMirrorSources", "GET", {
|
|
12
12
|
requireAuth: true,
|
|
13
13
|
...opts,
|
|
14
14
|
});
|
|
15
15
|
}
|
|
16
16
|
|
|
17
|
-
putMirrorSource
|
|
17
|
+
putMirrorSource(
|
|
18
18
|
input: PutMirrorSourceInput,
|
|
19
19
|
opts?: RequestOptions,
|
|
20
20
|
) {
|
|
21
|
-
return this.call
|
|
21
|
+
return this.call("app.rocksky.mirror.putMirrorSource", "POST", {
|
|
22
22
|
body: input,
|
|
23
23
|
requireAuth: true,
|
|
24
24
|
...opts,
|
package/src/namespaces/player.ts
CHANGED
|
@@ -10,114 +10,114 @@ import type {
|
|
|
10
10
|
PlayParams,
|
|
11
11
|
PreviousParams,
|
|
12
12
|
SeekParams,
|
|
13
|
-
} from "../generated/types";
|
|
14
|
-
import type { RequestOptions } from "../types";
|
|
15
|
-
import type { Call } from "./_helpers";
|
|
13
|
+
} from "../generated/types.js";
|
|
14
|
+
import type { RequestOptions } from "../types.js";
|
|
15
|
+
import type { Call } from "./_helpers.js";
|
|
16
16
|
|
|
17
17
|
export class PlayerNamespace {
|
|
18
18
|
constructor(private readonly call: Call) {}
|
|
19
19
|
|
|
20
|
-
getCurrentlyPlaying
|
|
20
|
+
getCurrentlyPlaying(
|
|
21
21
|
params: GetCurrentlyPlayingParams = {},
|
|
22
22
|
opts?: RequestOptions,
|
|
23
23
|
) {
|
|
24
|
-
return this.call
|
|
24
|
+
return this.call("app.rocksky.player.getCurrentlyPlaying", "GET", {
|
|
25
25
|
params,
|
|
26
26
|
...opts,
|
|
27
27
|
});
|
|
28
28
|
}
|
|
29
29
|
|
|
30
|
-
getPlaybackQueue
|
|
30
|
+
getPlaybackQueue(
|
|
31
31
|
params: GetPlaybackQueueParams = {},
|
|
32
32
|
opts?: RequestOptions,
|
|
33
33
|
) {
|
|
34
|
-
return this.call
|
|
34
|
+
return this.call("app.rocksky.player.getPlaybackQueue", "GET", {
|
|
35
35
|
params,
|
|
36
36
|
...opts,
|
|
37
37
|
});
|
|
38
38
|
}
|
|
39
39
|
|
|
40
|
-
play
|
|
41
|
-
return this.call
|
|
40
|
+
play(params: PlayParams = {}, opts?: RequestOptions) {
|
|
41
|
+
return this.call("app.rocksky.player.play", "POST", {
|
|
42
42
|
params,
|
|
43
43
|
requireAuth: true,
|
|
44
44
|
...opts,
|
|
45
45
|
});
|
|
46
46
|
}
|
|
47
47
|
|
|
48
|
-
pause
|
|
49
|
-
return this.call
|
|
48
|
+
pause(params: PauseParams = {}, opts?: RequestOptions) {
|
|
49
|
+
return this.call("app.rocksky.player.pause", "POST", {
|
|
50
50
|
params,
|
|
51
51
|
requireAuth: true,
|
|
52
52
|
...opts,
|
|
53
53
|
});
|
|
54
54
|
}
|
|
55
55
|
|
|
56
|
-
next
|
|
57
|
-
return this.call
|
|
56
|
+
next(params: NextParams = {}, opts?: RequestOptions) {
|
|
57
|
+
return this.call("app.rocksky.player.next", "POST", {
|
|
58
58
|
params,
|
|
59
59
|
requireAuth: true,
|
|
60
60
|
...opts,
|
|
61
61
|
});
|
|
62
62
|
}
|
|
63
63
|
|
|
64
|
-
previous
|
|
65
|
-
return this.call
|
|
64
|
+
previous(params: PreviousParams = {}, opts?: RequestOptions) {
|
|
65
|
+
return this.call("app.rocksky.player.previous", "POST", {
|
|
66
66
|
params,
|
|
67
67
|
requireAuth: true,
|
|
68
68
|
...opts,
|
|
69
69
|
});
|
|
70
70
|
}
|
|
71
71
|
|
|
72
|
-
seek
|
|
72
|
+
seek(
|
|
73
73
|
params: SeekParams,
|
|
74
74
|
opts?: RequestOptions,
|
|
75
75
|
) {
|
|
76
|
-
return this.call
|
|
76
|
+
return this.call("app.rocksky.player.seek", "POST", {
|
|
77
77
|
params,
|
|
78
78
|
requireAuth: true,
|
|
79
79
|
...opts,
|
|
80
80
|
});
|
|
81
81
|
}
|
|
82
82
|
|
|
83
|
-
playFile
|
|
83
|
+
playFile(
|
|
84
84
|
params: PlayFileParams,
|
|
85
85
|
opts?: RequestOptions,
|
|
86
86
|
) {
|
|
87
|
-
return this.call
|
|
87
|
+
return this.call("app.rocksky.player.playFile", "POST", {
|
|
88
88
|
params,
|
|
89
89
|
requireAuth: true,
|
|
90
90
|
...opts,
|
|
91
91
|
});
|
|
92
92
|
}
|
|
93
93
|
|
|
94
|
-
playDirectory
|
|
94
|
+
playDirectory(
|
|
95
95
|
params: PlayDirectoryParams,
|
|
96
96
|
opts?: RequestOptions,
|
|
97
97
|
) {
|
|
98
|
-
return this.call
|
|
98
|
+
return this.call("app.rocksky.player.playDirectory", "POST", {
|
|
99
99
|
params,
|
|
100
100
|
requireAuth: true,
|
|
101
101
|
...opts,
|
|
102
102
|
});
|
|
103
103
|
}
|
|
104
104
|
|
|
105
|
-
addItemsToQueue
|
|
105
|
+
addItemsToQueue(
|
|
106
106
|
params: AddItemsToQueueParams,
|
|
107
107
|
opts?: RequestOptions,
|
|
108
108
|
) {
|
|
109
|
-
return this.call
|
|
109
|
+
return this.call("app.rocksky.player.addItemsToQueue", "POST", {
|
|
110
110
|
params,
|
|
111
111
|
requireAuth: true,
|
|
112
112
|
...opts,
|
|
113
113
|
});
|
|
114
114
|
}
|
|
115
115
|
|
|
116
|
-
addDirectoryToQueue
|
|
116
|
+
addDirectoryToQueue(
|
|
117
117
|
params: AddDirectoryToQueueParams,
|
|
118
118
|
opts?: RequestOptions,
|
|
119
119
|
) {
|
|
120
|
-
return this.call
|
|
120
|
+
return this.call("app.rocksky.player.addDirectoryToQueue", "POST", {
|
|
121
121
|
params,
|
|
122
122
|
...opts,
|
|
123
123
|
});
|