@rocksky/sdk 0.2.2 → 0.4.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/README.md +44 -254
- package/dist/agent.d.ts +77 -0
- package/dist/agent.d.ts.map +1 -0
- package/dist/client.d.ts +26 -113
- package/dist/client.d.ts.map +1 -1
- package/dist/dedup.d.ts +38 -0
- package/dist/dedup.d.ts.map +1 -0
- package/dist/errors.d.ts +3 -23
- package/dist/errors.d.ts.map +1 -1
- package/dist/generated/types.d.ts +113 -11
- package/dist/generated/types.d.ts.map +1 -1
- package/dist/hash.d.ts +7 -0
- package/dist/hash.d.ts.map +1 -0
- package/dist/index.d.ts +16 -17
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +6648 -1288
- package/dist/jetstream.d.ts +17 -0
- package/dist/jetstream.d.ts.map +1 -0
- package/package.json +15 -11
- package/src/agent.ts +232 -0
- package/src/client.ts +82 -226
- package/src/dedup.ts +207 -0
- package/src/errors.ts +6 -43
- package/src/generated/types.ts +122 -11
- package/src/hash.ts +22 -0
- package/src/index.ts +16 -86
- package/src/jetstream.ts +122 -0
- package/src/http.ts +0 -195
- package/src/namespaces/_helpers.ts +0 -27
- package/src/namespaces/actor.ts +0 -93
- package/src/namespaces/album.ts +0 -34
- package/src/namespaces/apikey.ts +0 -50
- package/src/namespaces/artist.ts +0 -68
- package/src/namespaces/charts.ts +0 -38
- package/src/namespaces/dropbox.ts +0 -53
- package/src/namespaces/feed.ts +0 -112
- package/src/namespaces/googledrive.ts +0 -41
- package/src/namespaces/graph.ts +0 -62
- package/src/namespaces/like.ts +0 -46
- package/src/namespaces/mirror.ts +0 -27
- package/src/namespaces/player.ts +0 -125
- package/src/namespaces/playlist.ts +0 -95
- package/src/namespaces/scrobble.ts +0 -41
- package/src/namespaces/shout.ts +0 -99
- package/src/namespaces/song.ts +0 -60
- package/src/namespaces/spotify.ts +0 -56
- package/src/namespaces/stats.ts +0 -27
- package/src/paginate.ts +0 -90
- package/src/pipe.ts +0 -146
- package/src/realtime.ts +0 -408
- package/src/types.ts +0 -41
package/src/namespaces/feed.ts
DELETED
|
@@ -1,112 +0,0 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
GetAlbumRecommendationsParams,
|
|
3
|
-
GetArtistRecommendationsParams,
|
|
4
|
-
GetFeedGeneratorParams,
|
|
5
|
-
GetFeedGeneratorsParams,
|
|
6
|
-
GetFeedParams,
|
|
7
|
-
GetFeedSkeletonParams,
|
|
8
|
-
GetRecommendationsParams,
|
|
9
|
-
GetStoriesParams,
|
|
10
|
-
SearchParams,
|
|
11
|
-
} from "../generated/types.js";
|
|
12
|
-
import type { RequestOptions } from "../types.js";
|
|
13
|
-
import type { Call } from "./_helpers.js";
|
|
14
|
-
|
|
15
|
-
export type RecommendParams = GetRecommendationsParams;
|
|
16
|
-
|
|
17
|
-
export class FeedNamespace {
|
|
18
|
-
constructor(private readonly call: Call) {}
|
|
19
|
-
|
|
20
|
-
search(params: SearchParams, opts?: RequestOptions) {
|
|
21
|
-
return this.call("app.rocksky.feed.search", "GET", {
|
|
22
|
-
params,
|
|
23
|
-
...opts,
|
|
24
|
-
});
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
getFeed(
|
|
28
|
-
params: GetFeedParams,
|
|
29
|
-
opts?: RequestOptions,
|
|
30
|
-
) {
|
|
31
|
-
return this.call("app.rocksky.feed.getFeed", "GET", {
|
|
32
|
-
params,
|
|
33
|
-
...opts,
|
|
34
|
-
});
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
getFeedGenerators(
|
|
38
|
-
params: GetFeedGeneratorsParams = {},
|
|
39
|
-
opts?: RequestOptions,
|
|
40
|
-
) {
|
|
41
|
-
return this.call("app.rocksky.feed.getFeedGenerators", "GET", {
|
|
42
|
-
params,
|
|
43
|
-
...opts,
|
|
44
|
-
});
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
getFeedGenerator(
|
|
48
|
-
params: GetFeedGeneratorParams,
|
|
49
|
-
opts?: RequestOptions,
|
|
50
|
-
) {
|
|
51
|
-
return this.call("app.rocksky.feed.getFeedGenerator", "GET", {
|
|
52
|
-
params,
|
|
53
|
-
...opts,
|
|
54
|
-
});
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
describeFeedGenerator(opts?: RequestOptions) {
|
|
58
|
-
return this.call("app.rocksky.feed.describeFeedGenerator", "GET", {
|
|
59
|
-
...opts,
|
|
60
|
-
});
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
getFeedSkeleton(
|
|
64
|
-
params: GetFeedSkeletonParams,
|
|
65
|
-
opts?: RequestOptions,
|
|
66
|
-
) {
|
|
67
|
-
return this.call("app.rocksky.feed.getFeedSkeleton", "GET", {
|
|
68
|
-
params,
|
|
69
|
-
...opts,
|
|
70
|
-
});
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
getRecommendations(
|
|
74
|
-
params: GetRecommendationsParams,
|
|
75
|
-
opts?: RequestOptions,
|
|
76
|
-
) {
|
|
77
|
-
return this.call("app.rocksky.feed.getRecommendations", "GET", {
|
|
78
|
-
params,
|
|
79
|
-
...opts,
|
|
80
|
-
});
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
getArtistRecommendations(
|
|
84
|
-
params: GetArtistRecommendationsParams,
|
|
85
|
-
opts?: RequestOptions,
|
|
86
|
-
) {
|
|
87
|
-
return this.call("app.rocksky.feed.getArtistRecommendations", "GET", {
|
|
88
|
-
params,
|
|
89
|
-
...opts,
|
|
90
|
-
});
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
getAlbumRecommendations(
|
|
94
|
-
params: GetAlbumRecommendationsParams,
|
|
95
|
-
opts?: RequestOptions,
|
|
96
|
-
) {
|
|
97
|
-
return this.call("app.rocksky.feed.getAlbumRecommendations", "GET", {
|
|
98
|
-
params,
|
|
99
|
-
...opts,
|
|
100
|
-
});
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
getStories(
|
|
104
|
-
params: GetStoriesParams = {},
|
|
105
|
-
opts?: RequestOptions,
|
|
106
|
-
) {
|
|
107
|
-
return this.call("app.rocksky.feed.getStories", "GET", {
|
|
108
|
-
params,
|
|
109
|
-
...opts,
|
|
110
|
-
});
|
|
111
|
-
}
|
|
112
|
-
}
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
DownloadFileParams,
|
|
3
|
-
GetFileParams,
|
|
4
|
-
GetFilesParams,
|
|
5
|
-
} from "../generated/types.js";
|
|
6
|
-
import type { RequestOptions } from "../types.js";
|
|
7
|
-
import type { Call } from "./_helpers.js";
|
|
8
|
-
|
|
9
|
-
export class GoogleDriveNamespace {
|
|
10
|
-
constructor(private readonly call: Call) {}
|
|
11
|
-
|
|
12
|
-
getFile(params: GetFileParams, opts?: RequestOptions) {
|
|
13
|
-
return this.call("app.rocksky.googledrive.getFile", "GET", {
|
|
14
|
-
params,
|
|
15
|
-
requireAuth: true,
|
|
16
|
-
...opts,
|
|
17
|
-
});
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
getFiles(
|
|
21
|
-
params: GetFilesParams = {},
|
|
22
|
-
opts?: RequestOptions,
|
|
23
|
-
) {
|
|
24
|
-
return this.call("app.rocksky.googledrive.getFiles", "GET", {
|
|
25
|
-
params,
|
|
26
|
-
requireAuth: true,
|
|
27
|
-
...opts,
|
|
28
|
-
});
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
downloadFile(
|
|
32
|
-
params: DownloadFileParams,
|
|
33
|
-
opts?: RequestOptions,
|
|
34
|
-
) {
|
|
35
|
-
return this.call("app.rocksky.googledrive.downloadFile", "GET", {
|
|
36
|
-
params,
|
|
37
|
-
requireAuth: true,
|
|
38
|
-
...opts,
|
|
39
|
-
});
|
|
40
|
-
}
|
|
41
|
-
}
|
package/src/namespaces/graph.ts
DELETED
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
FollowAccountParams,
|
|
3
|
-
GetFollowersParams,
|
|
4
|
-
GetFollowsParams,
|
|
5
|
-
GetKnownFollowersParams,
|
|
6
|
-
UnfollowAccountParams,
|
|
7
|
-
} from "../generated/types.js";
|
|
8
|
-
import type { RequestOptions } from "../types.js";
|
|
9
|
-
import type { Call } from "./_helpers.js";
|
|
10
|
-
|
|
11
|
-
export type FollowListParams = GetFollowersParams;
|
|
12
|
-
export type KnownFollowersParams = GetKnownFollowersParams;
|
|
13
|
-
|
|
14
|
-
export class GraphNamespace {
|
|
15
|
-
constructor(private readonly call: Call) {}
|
|
16
|
-
|
|
17
|
-
followAccount(
|
|
18
|
-
params: FollowAccountParams,
|
|
19
|
-
opts?: RequestOptions,
|
|
20
|
-
) {
|
|
21
|
-
return this.call("app.rocksky.graph.followAccount", "POST", {
|
|
22
|
-
params,
|
|
23
|
-
requireAuth: true,
|
|
24
|
-
...opts,
|
|
25
|
-
});
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
unfollowAccount(
|
|
29
|
-
params: UnfollowAccountParams,
|
|
30
|
-
opts?: RequestOptions,
|
|
31
|
-
) {
|
|
32
|
-
return this.call("app.rocksky.graph.unfollowAccount", "POST", {
|
|
33
|
-
params,
|
|
34
|
-
requireAuth: true,
|
|
35
|
-
...opts,
|
|
36
|
-
});
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
getFollowers(params: GetFollowersParams, opts?: RequestOptions) {
|
|
40
|
-
return this.call("app.rocksky.graph.getFollowers", "GET", {
|
|
41
|
-
params,
|
|
42
|
-
...opts,
|
|
43
|
-
});
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
getFollows(params: GetFollowsParams, opts?: RequestOptions) {
|
|
47
|
-
return this.call("app.rocksky.graph.getFollows", "GET", {
|
|
48
|
-
params,
|
|
49
|
-
...opts,
|
|
50
|
-
});
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
getKnownFollowers(
|
|
54
|
-
params: GetKnownFollowersParams,
|
|
55
|
-
opts?: RequestOptions,
|
|
56
|
-
) {
|
|
57
|
-
return this.call("app.rocksky.graph.getKnownFollowers", "GET", {
|
|
58
|
-
params,
|
|
59
|
-
...opts,
|
|
60
|
-
});
|
|
61
|
-
}
|
|
62
|
-
}
|
package/src/namespaces/like.ts
DELETED
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
DislikeShoutInput,
|
|
3
|
-
DislikeSongInput,
|
|
4
|
-
LikeShoutInput,
|
|
5
|
-
LikeSongInput,
|
|
6
|
-
} from "../generated/types.js";
|
|
7
|
-
import type { RequestOptions } from "../types.js";
|
|
8
|
-
import type { Call } from "./_helpers.js";
|
|
9
|
-
|
|
10
|
-
export type LikeInput = LikeSongInput;
|
|
11
|
-
|
|
12
|
-
export class LikeNamespace {
|
|
13
|
-
constructor(private readonly call: Call) {}
|
|
14
|
-
|
|
15
|
-
likeSong(input: LikeSongInput = {}, opts?: RequestOptions) {
|
|
16
|
-
return this.call("app.rocksky.like.likeSong", "POST", {
|
|
17
|
-
body: input,
|
|
18
|
-
requireAuth: true,
|
|
19
|
-
...opts,
|
|
20
|
-
});
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
dislikeSong(input: DislikeSongInput = {}, opts?: RequestOptions) {
|
|
24
|
-
return this.call("app.rocksky.like.dislikeSong", "POST", {
|
|
25
|
-
body: input,
|
|
26
|
-
requireAuth: true,
|
|
27
|
-
...opts,
|
|
28
|
-
});
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
likeShout(input: LikeShoutInput = {}, opts?: RequestOptions) {
|
|
32
|
-
return this.call("app.rocksky.like.likeShout", "POST", {
|
|
33
|
-
body: input,
|
|
34
|
-
requireAuth: true,
|
|
35
|
-
...opts,
|
|
36
|
-
});
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
dislikeShout(input: DislikeShoutInput = {}, opts?: RequestOptions) {
|
|
40
|
-
return this.call("app.rocksky.like.dislikeShout", "POST", {
|
|
41
|
-
body: input,
|
|
42
|
-
requireAuth: true,
|
|
43
|
-
...opts,
|
|
44
|
-
});
|
|
45
|
-
}
|
|
46
|
-
}
|
package/src/namespaces/mirror.ts
DELETED
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import type { PutMirrorSourceInput } from "../generated/types.js";
|
|
2
|
-
import type { RequestOptions } from "../types.js";
|
|
3
|
-
import type { Call } from "./_helpers.js";
|
|
4
|
-
|
|
5
|
-
export type { PutMirrorSourceInput };
|
|
6
|
-
|
|
7
|
-
export class MirrorNamespace {
|
|
8
|
-
constructor(private readonly call: Call) {}
|
|
9
|
-
|
|
10
|
-
getMirrorSources(opts?: RequestOptions) {
|
|
11
|
-
return this.call("app.rocksky.mirror.getMirrorSources", "GET", {
|
|
12
|
-
requireAuth: true,
|
|
13
|
-
...opts,
|
|
14
|
-
});
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
putMirrorSource(
|
|
18
|
-
input: PutMirrorSourceInput,
|
|
19
|
-
opts?: RequestOptions,
|
|
20
|
-
) {
|
|
21
|
-
return this.call("app.rocksky.mirror.putMirrorSource", "POST", {
|
|
22
|
-
body: input,
|
|
23
|
-
requireAuth: true,
|
|
24
|
-
...opts,
|
|
25
|
-
});
|
|
26
|
-
}
|
|
27
|
-
}
|
package/src/namespaces/player.ts
DELETED
|
@@ -1,125 +0,0 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
AddDirectoryToQueueParams,
|
|
3
|
-
AddItemsToQueueParams,
|
|
4
|
-
GetCurrentlyPlayingParams,
|
|
5
|
-
GetPlaybackQueueParams,
|
|
6
|
-
NextParams,
|
|
7
|
-
PauseParams,
|
|
8
|
-
PlayDirectoryParams,
|
|
9
|
-
PlayFileParams,
|
|
10
|
-
PlayParams,
|
|
11
|
-
PreviousParams,
|
|
12
|
-
SeekParams,
|
|
13
|
-
} from "../generated/types.js";
|
|
14
|
-
import type { RequestOptions } from "../types.js";
|
|
15
|
-
import type { Call } from "./_helpers.js";
|
|
16
|
-
|
|
17
|
-
export class PlayerNamespace {
|
|
18
|
-
constructor(private readonly call: Call) {}
|
|
19
|
-
|
|
20
|
-
getCurrentlyPlaying(
|
|
21
|
-
params: GetCurrentlyPlayingParams = {},
|
|
22
|
-
opts?: RequestOptions,
|
|
23
|
-
) {
|
|
24
|
-
return this.call("app.rocksky.player.getCurrentlyPlaying", "GET", {
|
|
25
|
-
params,
|
|
26
|
-
...opts,
|
|
27
|
-
});
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
getPlaybackQueue(
|
|
31
|
-
params: GetPlaybackQueueParams = {},
|
|
32
|
-
opts?: RequestOptions,
|
|
33
|
-
) {
|
|
34
|
-
return this.call("app.rocksky.player.getPlaybackQueue", "GET", {
|
|
35
|
-
params,
|
|
36
|
-
...opts,
|
|
37
|
-
});
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
play(params: PlayParams = {}, opts?: RequestOptions) {
|
|
41
|
-
return this.call("app.rocksky.player.play", "POST", {
|
|
42
|
-
params,
|
|
43
|
-
requireAuth: true,
|
|
44
|
-
...opts,
|
|
45
|
-
});
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
pause(params: PauseParams = {}, opts?: RequestOptions) {
|
|
49
|
-
return this.call("app.rocksky.player.pause", "POST", {
|
|
50
|
-
params,
|
|
51
|
-
requireAuth: true,
|
|
52
|
-
...opts,
|
|
53
|
-
});
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
next(params: NextParams = {}, opts?: RequestOptions) {
|
|
57
|
-
return this.call("app.rocksky.player.next", "POST", {
|
|
58
|
-
params,
|
|
59
|
-
requireAuth: true,
|
|
60
|
-
...opts,
|
|
61
|
-
});
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
previous(params: PreviousParams = {}, opts?: RequestOptions) {
|
|
65
|
-
return this.call("app.rocksky.player.previous", "POST", {
|
|
66
|
-
params,
|
|
67
|
-
requireAuth: true,
|
|
68
|
-
...opts,
|
|
69
|
-
});
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
seek(
|
|
73
|
-
params: SeekParams,
|
|
74
|
-
opts?: RequestOptions,
|
|
75
|
-
) {
|
|
76
|
-
return this.call("app.rocksky.player.seek", "POST", {
|
|
77
|
-
params,
|
|
78
|
-
requireAuth: true,
|
|
79
|
-
...opts,
|
|
80
|
-
});
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
playFile(
|
|
84
|
-
params: PlayFileParams,
|
|
85
|
-
opts?: RequestOptions,
|
|
86
|
-
) {
|
|
87
|
-
return this.call("app.rocksky.player.playFile", "POST", {
|
|
88
|
-
params,
|
|
89
|
-
requireAuth: true,
|
|
90
|
-
...opts,
|
|
91
|
-
});
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
playDirectory(
|
|
95
|
-
params: PlayDirectoryParams,
|
|
96
|
-
opts?: RequestOptions,
|
|
97
|
-
) {
|
|
98
|
-
return this.call("app.rocksky.player.playDirectory", "POST", {
|
|
99
|
-
params,
|
|
100
|
-
requireAuth: true,
|
|
101
|
-
...opts,
|
|
102
|
-
});
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
addItemsToQueue(
|
|
106
|
-
params: AddItemsToQueueParams,
|
|
107
|
-
opts?: RequestOptions,
|
|
108
|
-
) {
|
|
109
|
-
return this.call("app.rocksky.player.addItemsToQueue", "POST", {
|
|
110
|
-
params,
|
|
111
|
-
requireAuth: true,
|
|
112
|
-
...opts,
|
|
113
|
-
});
|
|
114
|
-
}
|
|
115
|
-
|
|
116
|
-
addDirectoryToQueue(
|
|
117
|
-
params: AddDirectoryToQueueParams,
|
|
118
|
-
opts?: RequestOptions,
|
|
119
|
-
) {
|
|
120
|
-
return this.call("app.rocksky.player.addDirectoryToQueue", "POST", {
|
|
121
|
-
params,
|
|
122
|
-
...opts,
|
|
123
|
-
});
|
|
124
|
-
}
|
|
125
|
-
}
|
|
@@ -1,95 +0,0 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
CreatePlaylistParams,
|
|
3
|
-
GetPlaylistParams,
|
|
4
|
-
GetPlaylistsParams,
|
|
5
|
-
InsertDirectoryParams,
|
|
6
|
-
InsertFilesParams,
|
|
7
|
-
RemovePlaylistParams,
|
|
8
|
-
RemoveTrackParams,
|
|
9
|
-
StartPlaylistParams,
|
|
10
|
-
} from "../generated/types.js";
|
|
11
|
-
import type { RequestOptions } from "../types.js";
|
|
12
|
-
import type { Call } from "./_helpers.js";
|
|
13
|
-
|
|
14
|
-
export class PlaylistNamespace {
|
|
15
|
-
constructor(private readonly call: Call) {}
|
|
16
|
-
|
|
17
|
-
getPlaylists(
|
|
18
|
-
params: GetPlaylistsParams = {},
|
|
19
|
-
opts?: RequestOptions,
|
|
20
|
-
) {
|
|
21
|
-
return this.call("app.rocksky.playlist.getPlaylists", "GET", {
|
|
22
|
-
params,
|
|
23
|
-
...opts,
|
|
24
|
-
});
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
getPlaylist(params: GetPlaylistParams, opts?: RequestOptions) {
|
|
28
|
-
return this.call("app.rocksky.playlist.getPlaylist", "GET", {
|
|
29
|
-
params,
|
|
30
|
-
...opts,
|
|
31
|
-
});
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
createPlaylist(
|
|
35
|
-
params: CreatePlaylistParams,
|
|
36
|
-
opts?: RequestOptions,
|
|
37
|
-
) {
|
|
38
|
-
return this.call("app.rocksky.playlist.createPlaylist", "POST", {
|
|
39
|
-
params,
|
|
40
|
-
requireAuth: true,
|
|
41
|
-
...opts,
|
|
42
|
-
});
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
removePlaylist(params: RemovePlaylistParams, opts?: RequestOptions) {
|
|
46
|
-
return this.call("app.rocksky.playlist.removePlaylist", "POST", {
|
|
47
|
-
params,
|
|
48
|
-
requireAuth: true,
|
|
49
|
-
...opts,
|
|
50
|
-
});
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
startPlaylist(
|
|
54
|
-
params: StartPlaylistParams,
|
|
55
|
-
opts?: RequestOptions,
|
|
56
|
-
) {
|
|
57
|
-
return this.call("app.rocksky.playlist.startPlaylist", "POST", {
|
|
58
|
-
params,
|
|
59
|
-
requireAuth: true,
|
|
60
|
-
...opts,
|
|
61
|
-
});
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
insertDirectory(
|
|
65
|
-
params: InsertDirectoryParams,
|
|
66
|
-
opts?: RequestOptions,
|
|
67
|
-
) {
|
|
68
|
-
return this.call("app.rocksky.playlist.insertDirectory", "POST", {
|
|
69
|
-
params,
|
|
70
|
-
requireAuth: true,
|
|
71
|
-
...opts,
|
|
72
|
-
});
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
insertFiles(
|
|
76
|
-
params: InsertFilesParams,
|
|
77
|
-
opts?: RequestOptions,
|
|
78
|
-
) {
|
|
79
|
-
return this.call("app.rocksky.playlist.insertFiles", "POST", {
|
|
80
|
-
params,
|
|
81
|
-
requireAuth: true,
|
|
82
|
-
...opts,
|
|
83
|
-
});
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
removeTrack(
|
|
87
|
-
params: RemoveTrackParams,
|
|
88
|
-
opts?: RequestOptions,
|
|
89
|
-
) {
|
|
90
|
-
return this.call("app.rocksky.playlist.removeTrack", "POST", {
|
|
91
|
-
params,
|
|
92
|
-
...opts,
|
|
93
|
-
});
|
|
94
|
-
}
|
|
95
|
-
}
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
CreateScrobbleInput,
|
|
3
|
-
GetScrobbleParams,
|
|
4
|
-
GetScrobblesParams,
|
|
5
|
-
} from "../generated/types.js";
|
|
6
|
-
import type { RequestOptions } from "../types.js";
|
|
7
|
-
import type { Call } from "./_helpers.js";
|
|
8
|
-
|
|
9
|
-
export type { CreateScrobbleInput, GetScrobblesParams };
|
|
10
|
-
|
|
11
|
-
export class ScrobbleNamespace {
|
|
12
|
-
constructor(private readonly call: Call) {}
|
|
13
|
-
|
|
14
|
-
createScrobble(
|
|
15
|
-
input: CreateScrobbleInput,
|
|
16
|
-
opts?: RequestOptions,
|
|
17
|
-
) {
|
|
18
|
-
return this.call("app.rocksky.scrobble.createScrobble", "POST", {
|
|
19
|
-
body: input,
|
|
20
|
-
requireAuth: true,
|
|
21
|
-
...opts,
|
|
22
|
-
});
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
getScrobble(params: GetScrobbleParams, opts?: RequestOptions) {
|
|
26
|
-
return this.call("app.rocksky.scrobble.getScrobble", "GET", {
|
|
27
|
-
params,
|
|
28
|
-
...opts,
|
|
29
|
-
});
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
getScrobbles(
|
|
33
|
-
params: GetScrobblesParams = {},
|
|
34
|
-
opts?: RequestOptions,
|
|
35
|
-
) {
|
|
36
|
-
return this.call("app.rocksky.scrobble.getScrobbles", "GET", {
|
|
37
|
-
params,
|
|
38
|
-
...opts,
|
|
39
|
-
});
|
|
40
|
-
}
|
|
41
|
-
}
|
package/src/namespaces/shout.ts
DELETED
|
@@ -1,99 +0,0 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
CreateShoutInput,
|
|
3
|
-
GetAlbumShoutsParams,
|
|
4
|
-
GetArtistShoutsParams,
|
|
5
|
-
GetProfileShoutsParams,
|
|
6
|
-
GetShoutRepliesParams,
|
|
7
|
-
GetTrackShoutsParams,
|
|
8
|
-
RemoveShoutParams,
|
|
9
|
-
ReplyShoutInput,
|
|
10
|
-
ReportShoutInput,
|
|
11
|
-
} from "../generated/types.js";
|
|
12
|
-
import type { RequestOptions } from "../types.js";
|
|
13
|
-
import type { Call } from "./_helpers.js";
|
|
14
|
-
|
|
15
|
-
export class ShoutNamespace {
|
|
16
|
-
constructor(private readonly call: Call) {}
|
|
17
|
-
|
|
18
|
-
createShout(
|
|
19
|
-
input: CreateShoutInput = {},
|
|
20
|
-
opts?: RequestOptions,
|
|
21
|
-
) {
|
|
22
|
-
return this.call("app.rocksky.shout.createShout", "POST", {
|
|
23
|
-
body: input,
|
|
24
|
-
requireAuth: true,
|
|
25
|
-
...opts,
|
|
26
|
-
});
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
replyShout(
|
|
30
|
-
input: ReplyShoutInput,
|
|
31
|
-
opts?: RequestOptions,
|
|
32
|
-
) {
|
|
33
|
-
return this.call("app.rocksky.shout.replyShout", "POST", {
|
|
34
|
-
body: input,
|
|
35
|
-
requireAuth: true,
|
|
36
|
-
...opts,
|
|
37
|
-
});
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
reportShout(
|
|
41
|
-
input: ReportShoutInput,
|
|
42
|
-
opts?: RequestOptions,
|
|
43
|
-
) {
|
|
44
|
-
return this.call("app.rocksky.shout.reportShout", "POST", {
|
|
45
|
-
body: input,
|
|
46
|
-
requireAuth: true,
|
|
47
|
-
...opts,
|
|
48
|
-
});
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
removeShout(params: RemoveShoutParams, opts?: RequestOptions) {
|
|
52
|
-
return this.call("app.rocksky.shout.removeShout", "POST", {
|
|
53
|
-
params,
|
|
54
|
-
requireAuth: true,
|
|
55
|
-
...opts,
|
|
56
|
-
});
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
getShoutReplies(params: GetShoutRepliesParams, opts?: RequestOptions) {
|
|
60
|
-
return this.call("app.rocksky.shout.getShoutReplies", "GET", {
|
|
61
|
-
params,
|
|
62
|
-
...opts,
|
|
63
|
-
});
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
getProfileShouts(
|
|
67
|
-
params: GetProfileShoutsParams,
|
|
68
|
-
opts?: RequestOptions,
|
|
69
|
-
) {
|
|
70
|
-
return this.call("app.rocksky.shout.getProfileShouts", "GET", {
|
|
71
|
-
params,
|
|
72
|
-
...opts,
|
|
73
|
-
});
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
getTrackShouts(
|
|
77
|
-
params: GetTrackShoutsParams,
|
|
78
|
-
opts?: RequestOptions,
|
|
79
|
-
) {
|
|
80
|
-
return this.call("app.rocksky.shout.getTrackShouts", "GET", {
|
|
81
|
-
params,
|
|
82
|
-
...opts,
|
|
83
|
-
});
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
getArtistShouts(params: GetArtistShoutsParams, opts?: RequestOptions) {
|
|
87
|
-
return this.call("app.rocksky.shout.getArtistShouts", "GET", {
|
|
88
|
-
params,
|
|
89
|
-
...opts,
|
|
90
|
-
});
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
getAlbumShouts(params: GetAlbumShoutsParams, opts?: RequestOptions) {
|
|
94
|
-
return this.call("app.rocksky.shout.getAlbumShouts", "GET", {
|
|
95
|
-
params,
|
|
96
|
-
...opts,
|
|
97
|
-
});
|
|
98
|
-
}
|
|
99
|
-
}
|
package/src/namespaces/song.ts
DELETED
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
CreateSongInput,
|
|
3
|
-
GetSongParams,
|
|
4
|
-
GetSongRecentListenersParams,
|
|
5
|
-
GetSongsParams,
|
|
6
|
-
MatchSongParams,
|
|
7
|
-
} from "../generated/types.js";
|
|
8
|
-
import type { RequestOptions } from "../types.js";
|
|
9
|
-
import type { Call } from "./_helpers.js";
|
|
10
|
-
|
|
11
|
-
export type {
|
|
12
|
-
CreateSongInput,
|
|
13
|
-
GetSongParams,
|
|
14
|
-
GetSongRecentListenersParams,
|
|
15
|
-
GetSongsParams,
|
|
16
|
-
MatchSongParams,
|
|
17
|
-
};
|
|
18
|
-
|
|
19
|
-
export class SongNamespace {
|
|
20
|
-
constructor(private readonly call: Call) {}
|
|
21
|
-
|
|
22
|
-
getSong(params: GetSongParams, opts?: RequestOptions) {
|
|
23
|
-
return this.call("app.rocksky.song.getSong", "GET", {
|
|
24
|
-
params,
|
|
25
|
-
...opts,
|
|
26
|
-
});
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
getSongs(params: GetSongsParams = {}, opts?: RequestOptions) {
|
|
30
|
-
return this.call("app.rocksky.song.getSongs", "GET", {
|
|
31
|
-
params,
|
|
32
|
-
...opts,
|
|
33
|
-
});
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
getSongRecentListeners(
|
|
37
|
-
params: GetSongRecentListenersParams,
|
|
38
|
-
opts?: RequestOptions,
|
|
39
|
-
) {
|
|
40
|
-
return this.call("app.rocksky.song.getSongRecentListeners", "GET", {
|
|
41
|
-
params,
|
|
42
|
-
...opts,
|
|
43
|
-
});
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
matchSong(params: MatchSongParams, opts?: RequestOptions) {
|
|
47
|
-
return this.call("app.rocksky.song.matchSong", "GET", {
|
|
48
|
-
params,
|
|
49
|
-
...opts,
|
|
50
|
-
});
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
createSong(input: CreateSongInput, opts?: RequestOptions) {
|
|
54
|
-
return this.call("app.rocksky.song.createSong", "POST", {
|
|
55
|
-
body: input,
|
|
56
|
-
requireAuth: true,
|
|
57
|
-
...opts,
|
|
58
|
-
});
|
|
59
|
-
}
|
|
60
|
-
}
|