lxns-rhythm-api 0.1.11 → 0.1.12
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/index.cjs +458 -0
- package/dist/index.d.cts +575 -10
- package/dist/index.d.mts +575 -10
- package/dist/index.mjs +458 -0
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -35,6 +35,29 @@ let LevelIndex = /* @__PURE__ */ function(LevelIndex) {
|
|
|
35
35
|
}({});
|
|
36
36
|
//#endregion
|
|
37
37
|
//#region src/api/chunithm/personal-api.ts
|
|
38
|
+
function scoreSearchParams$1(options) {
|
|
39
|
+
const params = new URLSearchParams();
|
|
40
|
+
if (options?.songId !== void 0) params.set("song_id", String(options.songId));
|
|
41
|
+
if (options?.songType !== void 0) params.set("song_type", options.songType);
|
|
42
|
+
if (options?.levelIndex !== void 0) params.set("level_index", String(options.levelIndex));
|
|
43
|
+
return params;
|
|
44
|
+
}
|
|
45
|
+
function aliasListSearchParams$1(options) {
|
|
46
|
+
const params = new URLSearchParams();
|
|
47
|
+
if (options?.page !== void 0) params.set("page", String(options.page));
|
|
48
|
+
if (options?.sort !== void 0) params.set("sort", options.sort);
|
|
49
|
+
if (options?.approved !== void 0) params.set("approved", String(options.approved));
|
|
50
|
+
if (options?.songId !== void 0) params.set("song_id", String(options.songId));
|
|
51
|
+
return params;
|
|
52
|
+
}
|
|
53
|
+
function commentSearchParams$1(options) {
|
|
54
|
+
const params = new URLSearchParams({
|
|
55
|
+
song_id: String(options.songId),
|
|
56
|
+
level_index: String(options.levelIndex)
|
|
57
|
+
});
|
|
58
|
+
if (options.songType !== void 0) params.set("song_type", options.songType);
|
|
59
|
+
return params;
|
|
60
|
+
}
|
|
38
61
|
/**
|
|
39
62
|
* chunithm 个人 API(需用户身份)
|
|
40
63
|
*/
|
|
@@ -51,6 +74,20 @@ var ChunithmPersonalApi = class {
|
|
|
51
74
|
return this.http.get("player").json();
|
|
52
75
|
}
|
|
53
76
|
/**
|
|
77
|
+
* 更新玩家信息
|
|
78
|
+
* PUT /api/v0/user/chunithm/player
|
|
79
|
+
*/
|
|
80
|
+
async updatePlayer(player) {
|
|
81
|
+
return this.http.put("player", { json: player }).json();
|
|
82
|
+
}
|
|
83
|
+
/**
|
|
84
|
+
* 解绑玩家信息
|
|
85
|
+
* DELETE /api/v0/user/chunithm/player
|
|
86
|
+
*/
|
|
87
|
+
async deletePlayer() {
|
|
88
|
+
return this.http.delete("player").json();
|
|
89
|
+
}
|
|
90
|
+
/**
|
|
54
91
|
* 获取玩家所有成绩
|
|
55
92
|
* GET /api/v0/user/chunithm/player/scores
|
|
56
93
|
*/
|
|
@@ -65,9 +102,217 @@ var ChunithmPersonalApi = class {
|
|
|
65
102
|
const body = { scores };
|
|
66
103
|
return this.http.post("player/scores", { json: body }).json();
|
|
67
104
|
}
|
|
105
|
+
/**
|
|
106
|
+
* 删除玩家成绩。不传参数时删除全部成绩,传参数时删除匹配的历史成绩。
|
|
107
|
+
* DELETE /api/v0/user/chunithm/player/scores
|
|
108
|
+
*/
|
|
109
|
+
async deleteScores(options) {
|
|
110
|
+
return this.http.delete("player/scores", { searchParams: scoreSearchParams$1(options) }).json();
|
|
111
|
+
}
|
|
112
|
+
/**
|
|
113
|
+
* 删除单条最佳成绩
|
|
114
|
+
* DELETE /api/v0/user/chunithm/player/score
|
|
115
|
+
*/
|
|
116
|
+
async deleteScore(options) {
|
|
117
|
+
return this.http.delete("player/score", { searchParams: scoreSearchParams$1(options) }).json();
|
|
118
|
+
}
|
|
119
|
+
async getBests(options) {
|
|
120
|
+
return this.http.get("player/bests", { searchParams: scoreSearchParams$1(options) }).json();
|
|
121
|
+
}
|
|
122
|
+
/**
|
|
123
|
+
* 获取单谱面成绩排行
|
|
124
|
+
* GET /api/v0/user/chunithm/player/score/ranking
|
|
125
|
+
*/
|
|
126
|
+
async getScoreRanking(options) {
|
|
127
|
+
return this.http.get("player/score/ranking", { searchParams: scoreSearchParams$1(options) }).json();
|
|
128
|
+
}
|
|
129
|
+
/**
|
|
130
|
+
* 获取单谱面成绩历史
|
|
131
|
+
* GET /api/v0/user/chunithm/player/score/history
|
|
132
|
+
*/
|
|
133
|
+
async getScoreHistory(options) {
|
|
134
|
+
return this.http.get("player/score/history", { searchParams: scoreSearchParams$1(options) }).json();
|
|
135
|
+
}
|
|
136
|
+
/**
|
|
137
|
+
* 获取成绩上传热力图
|
|
138
|
+
* GET /api/v0/user/chunithm/player/heatmap
|
|
139
|
+
*/
|
|
140
|
+
async getHeatmap() {
|
|
141
|
+
return this.http.get("player/heatmap").json();
|
|
142
|
+
}
|
|
143
|
+
/**
|
|
144
|
+
* 获取 Rating 趋势
|
|
145
|
+
* GET /api/v0/user/chunithm/player/trend
|
|
146
|
+
*/
|
|
147
|
+
async getTrend(version) {
|
|
148
|
+
return this.http.get("player/trend", { searchParams: { version } }).json();
|
|
149
|
+
}
|
|
150
|
+
/**
|
|
151
|
+
* 获取玩家已获得的收藏品列表
|
|
152
|
+
* GET /api/v0/user/chunithm/player/{collectionType}
|
|
153
|
+
*/
|
|
154
|
+
async getPlayerCollectionList(collectionType) {
|
|
155
|
+
return this.http.get(`player/${collectionType}`).json();
|
|
156
|
+
}
|
|
157
|
+
/**
|
|
158
|
+
* 获取玩家收藏品进度
|
|
159
|
+
* GET /api/v0/user/chunithm/player/{collectionType}/{id}
|
|
160
|
+
*/
|
|
161
|
+
async getPlayerCollection(collectionType, id) {
|
|
162
|
+
return this.http.get(`player/${collectionType}/${id}`).json();
|
|
163
|
+
}
|
|
164
|
+
/**
|
|
165
|
+
* 通过 NET 的 HTML 源代码同步玩家数据
|
|
166
|
+
* POST /api/v0/user/chunithm/player/html
|
|
167
|
+
*/
|
|
168
|
+
async postHtml(htmlSource) {
|
|
169
|
+
return this.http.post("player/html", {
|
|
170
|
+
body: htmlSource,
|
|
171
|
+
headers: { "content-type": "text/plain" }
|
|
172
|
+
}).json();
|
|
173
|
+
}
|
|
174
|
+
/**
|
|
175
|
+
* 导出玩家成绩
|
|
176
|
+
* GET /api/v0/user/chunithm/player/scores/export/{type}
|
|
177
|
+
*/
|
|
178
|
+
async exportScores(type = "csv") {
|
|
179
|
+
return new Uint8Array(await this.http.get(`player/scores/export/${type}`).arrayBuffer());
|
|
180
|
+
}
|
|
181
|
+
/**
|
|
182
|
+
* 导入玩家成绩
|
|
183
|
+
* POST /api/v0/user/chunithm/player/scores/import
|
|
184
|
+
*/
|
|
185
|
+
async importScores(file, fileName) {
|
|
186
|
+
const body = new FormData();
|
|
187
|
+
if (fileName) body.append("file", file, fileName);
|
|
188
|
+
else body.append("file", file);
|
|
189
|
+
return this.http.post("player/scores/import", { body }).json();
|
|
190
|
+
}
|
|
191
|
+
/**
|
|
192
|
+
* 获取玩家年度总结
|
|
193
|
+
* GET /api/v0/user/chunithm/player/year-in-review/{year}
|
|
194
|
+
*/
|
|
195
|
+
async getYearInReview(year, options) {
|
|
196
|
+
return this.http.get(`player/year-in-review/${year}`, { searchParams: { ...options } }).json();
|
|
197
|
+
}
|
|
198
|
+
/**
|
|
199
|
+
* 生成年度总结分享链接
|
|
200
|
+
* POST /api/v0/user/chunithm/player/year-in-review/{year}/share
|
|
201
|
+
*/
|
|
202
|
+
async createYearInReviewShare(year, body = { public: true }) {
|
|
203
|
+
return this.http.post(`player/year-in-review/${year}/share`, { json: body }).json();
|
|
204
|
+
}
|
|
205
|
+
/**
|
|
206
|
+
* 获取游戏个人配置
|
|
207
|
+
* GET /api/v0/user/chunithm/config
|
|
208
|
+
*/
|
|
209
|
+
async getConfig() {
|
|
210
|
+
return this.http.get("config").json();
|
|
211
|
+
}
|
|
212
|
+
/**
|
|
213
|
+
* 更新游戏个人配置
|
|
214
|
+
* POST /api/v0/user/chunithm/config
|
|
215
|
+
*/
|
|
216
|
+
async updateConfig(config) {
|
|
217
|
+
return this.http.post("config", { json: config }).json();
|
|
218
|
+
}
|
|
219
|
+
/**
|
|
220
|
+
* 获取登录用户可见的别名列表
|
|
221
|
+
* GET /api/v0/user/chunithm/alias/list
|
|
222
|
+
*/
|
|
223
|
+
async getAliasList(options) {
|
|
224
|
+
return this.http.get("alias/list", { searchParams: aliasListSearchParams$1(options) }).json();
|
|
225
|
+
}
|
|
226
|
+
/**
|
|
227
|
+
* 获取登录用户的别名投票记录
|
|
228
|
+
* GET /api/v0/user/chunithm/alias/votes
|
|
229
|
+
*/
|
|
230
|
+
async getAliasVotes() {
|
|
231
|
+
return this.http.get("alias/votes").json();
|
|
232
|
+
}
|
|
233
|
+
/**
|
|
234
|
+
* 创建曲目别名
|
|
235
|
+
* POST /api/v0/user/chunithm/alias
|
|
236
|
+
*/
|
|
237
|
+
async createAlias(body) {
|
|
238
|
+
return this.http.post("alias", { json: body }).json();
|
|
239
|
+
}
|
|
240
|
+
/**
|
|
241
|
+
* 为曲目别名投票
|
|
242
|
+
* POST /api/v0/user/chunithm/alias/{aliasId}/vote/{up|down}
|
|
243
|
+
*/
|
|
244
|
+
async voteAlias(aliasId, vote) {
|
|
245
|
+
const direction = typeof vote === "boolean" ? vote ? "up" : "down" : vote;
|
|
246
|
+
return this.http.post(`alias/${aliasId}/vote/${direction}`).json();
|
|
247
|
+
}
|
|
248
|
+
/**
|
|
249
|
+
* 删除当前用户创建的曲目别名
|
|
250
|
+
* DELETE /api/v0/user/chunithm/alias/{aliasId}
|
|
251
|
+
*/
|
|
252
|
+
async deleteAlias(aliasId) {
|
|
253
|
+
return this.http.delete(`alias/${aliasId}`).json();
|
|
254
|
+
}
|
|
255
|
+
/**
|
|
256
|
+
* 获取谱面评论
|
|
257
|
+
* GET /api/v0/user/chunithm/comment/list
|
|
258
|
+
*/
|
|
259
|
+
async getComments(options) {
|
|
260
|
+
return this.http.get("comment/list", { searchParams: commentSearchParams$1(options) }).json();
|
|
261
|
+
}
|
|
262
|
+
/**
|
|
263
|
+
* 创建或更新谱面评论
|
|
264
|
+
* POST /api/v0/user/chunithm/comment
|
|
265
|
+
*/
|
|
266
|
+
async createComment(body) {
|
|
267
|
+
return this.http.post("comment", { json: body }).json();
|
|
268
|
+
}
|
|
269
|
+
/**
|
|
270
|
+
* 删除谱面评论
|
|
271
|
+
* DELETE /api/v0/user/chunithm/comment/{commentId}
|
|
272
|
+
*/
|
|
273
|
+
async deleteComment(commentId) {
|
|
274
|
+
return this.http.delete(`comment/${commentId}`).json();
|
|
275
|
+
}
|
|
276
|
+
/**
|
|
277
|
+
* 点赞谱面评论
|
|
278
|
+
* POST /api/v0/user/chunithm/comment/{commentId}/like
|
|
279
|
+
*/
|
|
280
|
+
async likeComment(commentId) {
|
|
281
|
+
return this.http.post(`comment/${commentId}/like`).json();
|
|
282
|
+
}
|
|
283
|
+
/**
|
|
284
|
+
* 取消点赞谱面评论
|
|
285
|
+
* DELETE /api/v0/user/chunithm/comment/{commentId}/like
|
|
286
|
+
*/
|
|
287
|
+
async unlikeComment(commentId) {
|
|
288
|
+
return this.http.delete(`comment/${commentId}/like`).json();
|
|
289
|
+
}
|
|
68
290
|
};
|
|
69
291
|
//#endregion
|
|
70
292
|
//#region src/api/maimai/personal-api.ts
|
|
293
|
+
function scoreSearchParams(options) {
|
|
294
|
+
const params = new URLSearchParams();
|
|
295
|
+
if (options?.songId !== void 0) params.set("song_id", String(options.songId));
|
|
296
|
+
if (options?.songType !== void 0) params.set("song_type", options.songType);
|
|
297
|
+
if (options?.levelIndex !== void 0) params.set("level_index", String(options.levelIndex));
|
|
298
|
+
return params;
|
|
299
|
+
}
|
|
300
|
+
function aliasListSearchParams(options) {
|
|
301
|
+
const params = new URLSearchParams();
|
|
302
|
+
if (options?.page !== void 0) params.set("page", String(options.page));
|
|
303
|
+
if (options?.sort !== void 0) params.set("sort", options.sort);
|
|
304
|
+
if (options?.approved !== void 0) params.set("approved", String(options.approved));
|
|
305
|
+
if (options?.songId !== void 0) params.set("song_id", String(options.songId));
|
|
306
|
+
return params;
|
|
307
|
+
}
|
|
308
|
+
function commentSearchParams(options) {
|
|
309
|
+
const params = new URLSearchParams({
|
|
310
|
+
song_id: String(options.songId),
|
|
311
|
+
level_index: String(options.levelIndex)
|
|
312
|
+
});
|
|
313
|
+
if (options.songType !== void 0) params.set("song_type", options.songType);
|
|
314
|
+
return params;
|
|
315
|
+
}
|
|
71
316
|
/**
|
|
72
317
|
* maimai 个人 API(需用户身份,路径遵循文档)
|
|
73
318
|
*/
|
|
@@ -85,6 +330,20 @@ var MaimaiPersonalApi = class {
|
|
|
85
330
|
return this.http.get("player").json();
|
|
86
331
|
}
|
|
87
332
|
/**
|
|
333
|
+
* 更新玩家信息
|
|
334
|
+
* PUT /api/v0/user/maimai/player
|
|
335
|
+
*/
|
|
336
|
+
async updatePlayer(player) {
|
|
337
|
+
return this.http.put("player", { json: player }).json();
|
|
338
|
+
}
|
|
339
|
+
/**
|
|
340
|
+
* 解绑玩家信息
|
|
341
|
+
* DELETE /api/v0/user/maimai/player
|
|
342
|
+
*/
|
|
343
|
+
async deletePlayer() {
|
|
344
|
+
return this.http.delete("player").json();
|
|
345
|
+
}
|
|
346
|
+
/**
|
|
88
347
|
* 获取玩家所有成绩
|
|
89
348
|
* GET /api/v0/user/maimai/player/scores
|
|
90
349
|
* @returns PlayerScores
|
|
@@ -102,6 +361,191 @@ var MaimaiPersonalApi = class {
|
|
|
102
361
|
const body = { scores };
|
|
103
362
|
return this.http.post("player/scores", { json: body }).json();
|
|
104
363
|
}
|
|
364
|
+
/**
|
|
365
|
+
* 删除玩家成绩。不传参数时删除全部成绩,传参数时删除匹配的历史成绩。
|
|
366
|
+
* DELETE /api/v0/user/maimai/player/scores
|
|
367
|
+
*/
|
|
368
|
+
async deleteScores(options) {
|
|
369
|
+
return this.http.delete("player/scores", { searchParams: scoreSearchParams(options) }).json();
|
|
370
|
+
}
|
|
371
|
+
/**
|
|
372
|
+
* 删除单条最佳成绩
|
|
373
|
+
* DELETE /api/v0/user/maimai/player/score
|
|
374
|
+
*/
|
|
375
|
+
async deleteScore(options) {
|
|
376
|
+
return this.http.delete("player/score", { searchParams: scoreSearchParams(options) }).json();
|
|
377
|
+
}
|
|
378
|
+
async getBests(options) {
|
|
379
|
+
return this.http.get("player/bests", { searchParams: scoreSearchParams(options) }).json();
|
|
380
|
+
}
|
|
381
|
+
/**
|
|
382
|
+
* 获取单谱面成绩排行
|
|
383
|
+
* GET /api/v0/user/maimai/player/score/ranking
|
|
384
|
+
*/
|
|
385
|
+
async getScoreRanking(options) {
|
|
386
|
+
return this.http.get("player/score/ranking", { searchParams: scoreSearchParams(options) }).json();
|
|
387
|
+
}
|
|
388
|
+
/**
|
|
389
|
+
* 获取单谱面成绩历史
|
|
390
|
+
* GET /api/v0/user/maimai/player/score/history
|
|
391
|
+
*/
|
|
392
|
+
async getScoreHistory(options) {
|
|
393
|
+
return this.http.get("player/score/history", { searchParams: scoreSearchParams(options) }).json();
|
|
394
|
+
}
|
|
395
|
+
/**
|
|
396
|
+
* 获取成绩上传热力图
|
|
397
|
+
* GET /api/v0/user/maimai/player/heatmap
|
|
398
|
+
*/
|
|
399
|
+
async getHeatmap() {
|
|
400
|
+
return this.http.get("player/heatmap").json();
|
|
401
|
+
}
|
|
402
|
+
/**
|
|
403
|
+
* 获取 DX Rating 趋势
|
|
404
|
+
* GET /api/v0/user/maimai/player/trend
|
|
405
|
+
*/
|
|
406
|
+
async getTrend(version) {
|
|
407
|
+
return this.http.get("player/trend", { searchParams: { version } }).json();
|
|
408
|
+
}
|
|
409
|
+
/**
|
|
410
|
+
* 获取玩家已获得的收藏品列表
|
|
411
|
+
* GET /api/v0/user/maimai/player/{collectionType}
|
|
412
|
+
*/
|
|
413
|
+
async getPlayerCollectionList(collectionType) {
|
|
414
|
+
return this.http.get(`player/${collectionType}`).json();
|
|
415
|
+
}
|
|
416
|
+
/**
|
|
417
|
+
* 获取玩家收藏品进度
|
|
418
|
+
* GET /api/v0/user/maimai/player/{collectionType}/{id}
|
|
419
|
+
*/
|
|
420
|
+
async getPlayerCollection(collectionType, id) {
|
|
421
|
+
return this.http.get(`player/${collectionType}/${id}`).json();
|
|
422
|
+
}
|
|
423
|
+
/**
|
|
424
|
+
* 通过 NET 的 HTML 源代码同步玩家数据
|
|
425
|
+
* POST /api/v0/user/maimai/player/html
|
|
426
|
+
*/
|
|
427
|
+
async postHtml(htmlSource) {
|
|
428
|
+
return this.http.post("player/html", {
|
|
429
|
+
body: htmlSource,
|
|
430
|
+
headers: { "content-type": "text/plain" }
|
|
431
|
+
}).json();
|
|
432
|
+
}
|
|
433
|
+
/**
|
|
434
|
+
* 导出玩家成绩
|
|
435
|
+
* GET /api/v0/user/maimai/player/scores/export/{type}
|
|
436
|
+
*/
|
|
437
|
+
async exportScores(type = "csv") {
|
|
438
|
+
return new Uint8Array(await this.http.get(`player/scores/export/${type}`).arrayBuffer());
|
|
439
|
+
}
|
|
440
|
+
/**
|
|
441
|
+
* 导入玩家成绩
|
|
442
|
+
* POST /api/v0/user/maimai/player/scores/import
|
|
443
|
+
*/
|
|
444
|
+
async importScores(file, fileName) {
|
|
445
|
+
const body = new FormData();
|
|
446
|
+
if (fileName) body.append("file", file, fileName);
|
|
447
|
+
else body.append("file", file);
|
|
448
|
+
return this.http.post("player/scores/import", { body }).json();
|
|
449
|
+
}
|
|
450
|
+
/**
|
|
451
|
+
* 获取玩家年度总结
|
|
452
|
+
* GET /api/v0/user/maimai/player/year-in-review/{year}
|
|
453
|
+
*/
|
|
454
|
+
async getYearInReview(year, options) {
|
|
455
|
+
return this.http.get(`player/year-in-review/${year}`, { searchParams: { ...options } }).json();
|
|
456
|
+
}
|
|
457
|
+
/**
|
|
458
|
+
* 生成年度总结分享链接
|
|
459
|
+
* POST /api/v0/user/maimai/player/year-in-review/{year}/share
|
|
460
|
+
*/
|
|
461
|
+
async createYearInReviewShare(year, body = { public: true }) {
|
|
462
|
+
return this.http.post(`player/year-in-review/${year}/share`, { json: body }).json();
|
|
463
|
+
}
|
|
464
|
+
/**
|
|
465
|
+
* 获取游戏个人配置
|
|
466
|
+
* GET /api/v0/user/maimai/config
|
|
467
|
+
*/
|
|
468
|
+
async getConfig() {
|
|
469
|
+
return this.http.get("config").json();
|
|
470
|
+
}
|
|
471
|
+
/**
|
|
472
|
+
* 更新游戏个人配置
|
|
473
|
+
* POST /api/v0/user/maimai/config
|
|
474
|
+
*/
|
|
475
|
+
async updateConfig(config) {
|
|
476
|
+
return this.http.post("config", { json: config }).json();
|
|
477
|
+
}
|
|
478
|
+
/**
|
|
479
|
+
* 获取登录用户可见的别名列表
|
|
480
|
+
* GET /api/v0/user/maimai/alias/list
|
|
481
|
+
*/
|
|
482
|
+
async getAliasList(options) {
|
|
483
|
+
return this.http.get("alias/list", { searchParams: aliasListSearchParams(options) }).json();
|
|
484
|
+
}
|
|
485
|
+
/**
|
|
486
|
+
* 获取登录用户的别名投票记录
|
|
487
|
+
* GET /api/v0/user/maimai/alias/votes
|
|
488
|
+
*/
|
|
489
|
+
async getAliasVotes() {
|
|
490
|
+
return this.http.get("alias/votes").json();
|
|
491
|
+
}
|
|
492
|
+
/**
|
|
493
|
+
* 创建曲目别名
|
|
494
|
+
* POST /api/v0/user/maimai/alias
|
|
495
|
+
*/
|
|
496
|
+
async createAlias(body) {
|
|
497
|
+
return this.http.post("alias", { json: body }).json();
|
|
498
|
+
}
|
|
499
|
+
/**
|
|
500
|
+
* 为曲目别名投票
|
|
501
|
+
* POST /api/v0/user/maimai/alias/{aliasId}/vote/{up|down}
|
|
502
|
+
*/
|
|
503
|
+
async voteAlias(aliasId, vote) {
|
|
504
|
+
const direction = typeof vote === "boolean" ? vote ? "up" : "down" : vote;
|
|
505
|
+
return this.http.post(`alias/${aliasId}/vote/${direction}`).json();
|
|
506
|
+
}
|
|
507
|
+
/**
|
|
508
|
+
* 删除当前用户创建的曲目别名
|
|
509
|
+
* DELETE /api/v0/user/maimai/alias/{aliasId}
|
|
510
|
+
*/
|
|
511
|
+
async deleteAlias(aliasId) {
|
|
512
|
+
return this.http.delete(`alias/${aliasId}`).json();
|
|
513
|
+
}
|
|
514
|
+
/**
|
|
515
|
+
* 获取谱面评论
|
|
516
|
+
* GET /api/v0/user/maimai/comment/list
|
|
517
|
+
*/
|
|
518
|
+
async getComments(options) {
|
|
519
|
+
return this.http.get("comment/list", { searchParams: commentSearchParams(options) }).json();
|
|
520
|
+
}
|
|
521
|
+
/**
|
|
522
|
+
* 创建或更新谱面评论
|
|
523
|
+
* POST /api/v0/user/maimai/comment
|
|
524
|
+
*/
|
|
525
|
+
async createComment(body) {
|
|
526
|
+
return this.http.post("comment", { json: body }).json();
|
|
527
|
+
}
|
|
528
|
+
/**
|
|
529
|
+
* 删除谱面评论
|
|
530
|
+
* DELETE /api/v0/user/maimai/comment/{commentId}
|
|
531
|
+
*/
|
|
532
|
+
async deleteComment(commentId) {
|
|
533
|
+
return this.http.delete(`comment/${commentId}`).json();
|
|
534
|
+
}
|
|
535
|
+
/**
|
|
536
|
+
* 点赞谱面评论
|
|
537
|
+
* POST /api/v0/user/maimai/comment/{commentId}/like
|
|
538
|
+
*/
|
|
539
|
+
async likeComment(commentId) {
|
|
540
|
+
return this.http.post(`comment/${commentId}/like`).json();
|
|
541
|
+
}
|
|
542
|
+
/**
|
|
543
|
+
* 取消点赞谱面评论
|
|
544
|
+
* DELETE /api/v0/user/maimai/comment/{commentId}/like
|
|
545
|
+
*/
|
|
546
|
+
async unlikeComment(commentId) {
|
|
547
|
+
return this.http.delete(`comment/${commentId}/like`).json();
|
|
548
|
+
}
|
|
105
549
|
};
|
|
106
550
|
//#endregion
|
|
107
551
|
//#region src/api/oauth/user.ts
|
|
@@ -818,6 +1262,13 @@ var ChunithmPublicApi = class {
|
|
|
818
1262
|
async getCollectionInfo(collectionType, id, version) {
|
|
819
1263
|
return this.http.get(`${collectionType}/${id}`, { searchParams: { version } }).json();
|
|
820
1264
|
}
|
|
1265
|
+
/**
|
|
1266
|
+
* 获取公开分享的年度总结
|
|
1267
|
+
* GET /api/v0/chunithm/year-in-review/{year}/share/{shareToken}
|
|
1268
|
+
*/
|
|
1269
|
+
async getYearInReviewShare(year, shareToken, options) {
|
|
1270
|
+
return this.http.get(`year-in-review/${year}/share/${shareToken}`, { searchParams: { ...options } }).json();
|
|
1271
|
+
}
|
|
821
1272
|
};
|
|
822
1273
|
//#endregion
|
|
823
1274
|
//#region src/api/maimai/dev-api.ts
|
|
@@ -1074,6 +1525,13 @@ var MaimaiPublicApi = class {
|
|
|
1074
1525
|
async getCollectionGenreInfo(id, options) {
|
|
1075
1526
|
return this.http.get(`collection-genre/${id}`, { searchParams: { ...options } }).json();
|
|
1076
1527
|
}
|
|
1528
|
+
/**
|
|
1529
|
+
* 获取公开分享的年度总结
|
|
1530
|
+
* GET /api/v0/maimai/year-in-review/{year}/share/{shareToken}
|
|
1531
|
+
*/
|
|
1532
|
+
async getYearInReviewShare(year, shareToken, options) {
|
|
1533
|
+
return this.http.get(`year-in-review/${year}/share/${shareToken}`, { searchParams: { ...options } }).json();
|
|
1534
|
+
}
|
|
1077
1535
|
};
|
|
1078
1536
|
//#endregion
|
|
1079
1537
|
//#region src/lxns-api-error.ts
|