@rian8337/osu-droid-replay-analyzer 1.0.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/LICENSE +21 -0
- package/README.md +11 -0
- package/dist/ReplayAnalyzer.js +540 -0
- package/dist/analysis/BeatmapSectionGenerator.js +47 -0
- package/dist/analysis/ThreeFingerChecker.js +684 -0
- package/dist/analysis/TwoHandChecker.js +237 -0
- package/dist/analysis/data/BeatmapSection.js +17 -0
- package/dist/analysis/data/ThreeFingerBeatmapSection.js +15 -0
- package/dist/analysis/objects/IndexedHitObject.js +17 -0
- package/dist/constants/hitResult.js +25 -0
- package/dist/constants/movementType.js +12 -0
- package/dist/data/CursorData.js +20 -0
- package/dist/data/ReplayData.js +35 -0
- package/dist/data/ReplayObjectData.js +18 -0
- package/dist/index.js +19 -0
- package/package.json +47 -0
- package/typings/index.d.ts +565 -0
|
@@ -0,0 +1,565 @@
|
|
|
1
|
+
declare module "@rian8337/osu-droid-replay-analyzer" {
|
|
2
|
+
import { Beatmap, Accuracy, Mod } from "@rian8337/osu-base";
|
|
3
|
+
import { DroidStarRating } from "@rian8337/osu-difficulty-calculator";
|
|
4
|
+
import { DroidStarRating as RebalanceDroidStarRating } from "@rian8337/osu-rebalance-difficulty-calculator";
|
|
5
|
+
|
|
6
|
+
//#region Classes
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* Represents a cursor instance in an osu!droid replay.
|
|
10
|
+
*
|
|
11
|
+
* Stores cursor movement data such as x and y coordinates, movement size, etc.
|
|
12
|
+
*
|
|
13
|
+
* This is used when analyzing replays using replay analyzer.
|
|
14
|
+
*/
|
|
15
|
+
export class CursorData implements CursorInformation {
|
|
16
|
+
size: number;
|
|
17
|
+
readonly time: number[];
|
|
18
|
+
readonly x: number[];
|
|
19
|
+
readonly y: number[];
|
|
20
|
+
readonly id: movementType[];
|
|
21
|
+
constructor(values: CursorInformation);
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* A replay analyzer that analyzes a replay from osu!droid.
|
|
26
|
+
*
|
|
27
|
+
* Created by reverse engineering the replay parser from the game itself, which can be found {@link https://github.com/osudroid/osu-droid/blob/master/src/ru/nsu/ccfit/zuev/osu/scoring/Replay.java here}.
|
|
28
|
+
*
|
|
29
|
+
* Once analyzed, the result can be accessed via the `data` property.
|
|
30
|
+
*/
|
|
31
|
+
export class ReplayAnalyzer {
|
|
32
|
+
/**
|
|
33
|
+
* The score ID of the replay.
|
|
34
|
+
*/
|
|
35
|
+
scoreID: number;
|
|
36
|
+
/**
|
|
37
|
+
* The original odr file of the replay.
|
|
38
|
+
*/
|
|
39
|
+
originalODR: Buffer | null;
|
|
40
|
+
/**
|
|
41
|
+
* The fixed odr file of the replay.
|
|
42
|
+
*/
|
|
43
|
+
fixedODR: Buffer | null;
|
|
44
|
+
/**
|
|
45
|
+
* Whether or not the play is considered using >=3 finger abuse.
|
|
46
|
+
*/
|
|
47
|
+
is3Finger?: boolean;
|
|
48
|
+
/**
|
|
49
|
+
* Whether or not the play is considered 2-handed.
|
|
50
|
+
*/
|
|
51
|
+
is2Hand?: boolean;
|
|
52
|
+
/**
|
|
53
|
+
* The beatmap that is being analyzed. `DroidStarRating` or `RebalanceDroidStarRating` is required for three finger or two hand analyzing.
|
|
54
|
+
*/
|
|
55
|
+
map?: Beatmap | DroidStarRating | RebalanceDroidStarRating;
|
|
56
|
+
/**
|
|
57
|
+
* The results of the analyzer. `null` when initialized.
|
|
58
|
+
*/
|
|
59
|
+
data: ReplayData | null;
|
|
60
|
+
/**
|
|
61
|
+
* Penalty value used to penalize dpp for 2-hand.
|
|
62
|
+
*/
|
|
63
|
+
aimPenalty: number;
|
|
64
|
+
/**
|
|
65
|
+
* Penalty value used to penalize dpp for 3 finger abuse.
|
|
66
|
+
*/
|
|
67
|
+
tapPenalty: number;
|
|
68
|
+
/**
|
|
69
|
+
* Whether this replay has been checked against 3 finger usage.
|
|
70
|
+
*/
|
|
71
|
+
hasBeenCheckedFor3Finger: boolean;
|
|
72
|
+
/**
|
|
73
|
+
* Whether this replay has been checked against 2 hand usage.
|
|
74
|
+
*/
|
|
75
|
+
hasBeenCheckedFor2Hand: boolean;
|
|
76
|
+
private readonly BYTE_LENGTH: number;
|
|
77
|
+
private readonly SHORT_LENGTH: number;
|
|
78
|
+
private readonly INT_LENGTH: number;
|
|
79
|
+
private readonly LONG_LENGTH: number;
|
|
80
|
+
constructor(values: {
|
|
81
|
+
/**
|
|
82
|
+
* The ID of the score.
|
|
83
|
+
*/
|
|
84
|
+
scoreID: number;
|
|
85
|
+
/**
|
|
86
|
+
* The beatmap to analyze.
|
|
87
|
+
*
|
|
88
|
+
* `DroidStarRating` or `RebalanceDroidStarRating` is required for three finger or two hand analyzing.
|
|
89
|
+
*/
|
|
90
|
+
map?: Beatmap | DroidStarRating | RebalanceDroidStarRating;
|
|
91
|
+
});
|
|
92
|
+
/**
|
|
93
|
+
* Analyzes a replay.
|
|
94
|
+
*/
|
|
95
|
+
analyze(): Promise<ReplayAnalyzer>;
|
|
96
|
+
/**
|
|
97
|
+
* Downloads the given score ID's replay.
|
|
98
|
+
*/
|
|
99
|
+
private downloadReplay(): Promise<Buffer | null>;
|
|
100
|
+
/**
|
|
101
|
+
* Decompresses a replay.
|
|
102
|
+
*
|
|
103
|
+
* The decompressed replay is in a form of Java object. This will be converted to a buffer and deserialized to read data from the replay.
|
|
104
|
+
*/
|
|
105
|
+
private decompress(): Promise<Buffer>;
|
|
106
|
+
/**
|
|
107
|
+
* Parses a replay after being downloaded and converted to a buffer.
|
|
108
|
+
*/
|
|
109
|
+
private parseReplay(): void;
|
|
110
|
+
/**
|
|
111
|
+
* Converts replay mods to droid mod string.
|
|
112
|
+
*/
|
|
113
|
+
private convertDroidMods(replayMods: string[]): string;
|
|
114
|
+
/**
|
|
115
|
+
* Converts replay mods to regular mod string.
|
|
116
|
+
*/
|
|
117
|
+
private convertMods(replayMods: string[]): string;
|
|
118
|
+
/**
|
|
119
|
+
* Gets hit error information of the replay.
|
|
120
|
+
*
|
|
121
|
+
* `analyze()` must be called before calling this.
|
|
122
|
+
*/
|
|
123
|
+
calculateHitError(): HitErrorInformation | null;
|
|
124
|
+
/**
|
|
125
|
+
* Checks if a play is using 3 fingers.
|
|
126
|
+
*
|
|
127
|
+
* Requires `analyze()` to be called first and `map` to be defined as `DroidStarRating`.
|
|
128
|
+
*/
|
|
129
|
+
checkFor3Finger(): void;
|
|
130
|
+
/**
|
|
131
|
+
* Checks if a play is using 2 hands.
|
|
132
|
+
*
|
|
133
|
+
* Requires `analyze()` to be called first and `map` to be defined as `DroidStarRating`.
|
|
134
|
+
*/
|
|
135
|
+
checkFor2Hand(): void;
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
/**
|
|
139
|
+
* Represents a replay data in an osu!droid replay.
|
|
140
|
+
*
|
|
141
|
+
* Stores generic information about an osu!droid replay such as player name, MD5 hash, time set, etc.
|
|
142
|
+
*
|
|
143
|
+
* This is used when analyzing replays using replay analyzer.
|
|
144
|
+
*/
|
|
145
|
+
export class ReplayData implements ReplayInformation {
|
|
146
|
+
readonly replayVersion: number;
|
|
147
|
+
readonly folderName: string;
|
|
148
|
+
readonly fileName: string;
|
|
149
|
+
readonly hash: string;
|
|
150
|
+
readonly time: Date;
|
|
151
|
+
readonly hit300k: number;
|
|
152
|
+
readonly hit100k: number;
|
|
153
|
+
readonly score: number;
|
|
154
|
+
readonly maxCombo: number;
|
|
155
|
+
readonly accuracy: Accuracy;
|
|
156
|
+
readonly isFullCombo: boolean;
|
|
157
|
+
readonly playerName: string;
|
|
158
|
+
readonly rawMods: string;
|
|
159
|
+
readonly rank: string;
|
|
160
|
+
readonly convertedMods: Mod[];
|
|
161
|
+
readonly cursorMovement: CursorData[];
|
|
162
|
+
readonly hitObjectData: ReplayObjectData[];
|
|
163
|
+
readonly speedModification: number;
|
|
164
|
+
readonly forcedAR?: number;
|
|
165
|
+
constructor(values: ReplayInformation);
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
/**
|
|
169
|
+
* Represents a hitobject in an osu!droid replay.
|
|
170
|
+
*
|
|
171
|
+
* Stores information about hitobjects in an osu!droid replay such as hit offset, tickset, and hit result.
|
|
172
|
+
*
|
|
173
|
+
* This is used when analyzing replays using replay analyzer.
|
|
174
|
+
*/
|
|
175
|
+
export class ReplayObjectData {
|
|
176
|
+
/**
|
|
177
|
+
* The offset of which the hitobject was hit in milliseconds.
|
|
178
|
+
*/
|
|
179
|
+
accuracy: number;
|
|
180
|
+
/**
|
|
181
|
+
* The tickset of the hitobject.
|
|
182
|
+
*
|
|
183
|
+
* This is used to determine whether or not a slider event (tick/repeat/end) is hit based on the order they appear.
|
|
184
|
+
*/
|
|
185
|
+
tickset: boolean[];
|
|
186
|
+
/**
|
|
187
|
+
* The bitwise hit result of the hitobject.
|
|
188
|
+
*/
|
|
189
|
+
result: hitResult;
|
|
190
|
+
constructor(values: {
|
|
191
|
+
/**
|
|
192
|
+
* The offset of which the hitobject was hit in milliseconds.
|
|
193
|
+
*/
|
|
194
|
+
accuracy: number;
|
|
195
|
+
/**
|
|
196
|
+
* The tickset of the hitobject.
|
|
197
|
+
*
|
|
198
|
+
* This is used to determine whether or not a slider event (tick/repeat/end) is hit based on the order they appear.
|
|
199
|
+
*/
|
|
200
|
+
tickset: boolean[];
|
|
201
|
+
/**
|
|
202
|
+
* The bitwise hit result of the hitobject.
|
|
203
|
+
*/
|
|
204
|
+
result: hitResult;
|
|
205
|
+
});
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
//#endregion
|
|
209
|
+
|
|
210
|
+
//#region Enums
|
|
211
|
+
|
|
212
|
+
/**
|
|
213
|
+
* The result of a hit in an osu!droid replay.
|
|
214
|
+
*/
|
|
215
|
+
export enum hitResult {
|
|
216
|
+
/**
|
|
217
|
+
* Miss (0).
|
|
218
|
+
*/
|
|
219
|
+
RESULT_0 = 1,
|
|
220
|
+
/**
|
|
221
|
+
* Meh (50).
|
|
222
|
+
*/
|
|
223
|
+
RESULT_50 = 2,
|
|
224
|
+
/**
|
|
225
|
+
* Great (100).
|
|
226
|
+
*/
|
|
227
|
+
RESULT_100 = 3,
|
|
228
|
+
/**
|
|
229
|
+
* Good (300).
|
|
230
|
+
*/
|
|
231
|
+
RESULT_300 = 4,
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
/**
|
|
235
|
+
* Mode enum to switch things between osu!droid and osu!standard.
|
|
236
|
+
*/
|
|
237
|
+
export enum modes {
|
|
238
|
+
droid = "droid",
|
|
239
|
+
osu = "osu",
|
|
240
|
+
}
|
|
241
|
+
|
|
242
|
+
/**
|
|
243
|
+
* Movement type of a cursor in an osu!droid replay.
|
|
244
|
+
*/
|
|
245
|
+
export enum movementType {
|
|
246
|
+
DOWN = 0,
|
|
247
|
+
MOVE = 1,
|
|
248
|
+
UP = 2,
|
|
249
|
+
}
|
|
250
|
+
|
|
251
|
+
//#endregion
|
|
252
|
+
|
|
253
|
+
//#region Interfaces
|
|
254
|
+
|
|
255
|
+
/**
|
|
256
|
+
* Contains information about a cursor instance.
|
|
257
|
+
*/
|
|
258
|
+
export interface CursorInformation {
|
|
259
|
+
/**
|
|
260
|
+
* The movement size of the cursor instance.
|
|
261
|
+
*/
|
|
262
|
+
size: number;
|
|
263
|
+
/**
|
|
264
|
+
* The time during which this cursor instance is active in milliseconds.
|
|
265
|
+
*/
|
|
266
|
+
time: number[];
|
|
267
|
+
/**
|
|
268
|
+
* The x coordinates of this cursor instance in osu!pixels.
|
|
269
|
+
*/
|
|
270
|
+
x: number[];
|
|
271
|
+
/**
|
|
272
|
+
* The y coordinates of this cursor instance in osu!pixels.
|
|
273
|
+
*/
|
|
274
|
+
y: number[];
|
|
275
|
+
/**
|
|
276
|
+
* The hit IDs of this cursor instance.
|
|
277
|
+
*/
|
|
278
|
+
id: number[];
|
|
279
|
+
}
|
|
280
|
+
|
|
281
|
+
/**
|
|
282
|
+
* Represents a replay's hit error information.
|
|
283
|
+
*/
|
|
284
|
+
export interface HitErrorInformation {
|
|
285
|
+
/**
|
|
286
|
+
* Average of hits below 0ms.
|
|
287
|
+
*/
|
|
288
|
+
readonly negativeAvg: number;
|
|
289
|
+
/**
|
|
290
|
+
* Average of hits above 0ms.
|
|
291
|
+
*/
|
|
292
|
+
readonly positiveAvg: number;
|
|
293
|
+
/**
|
|
294
|
+
* The unstable rate of the replay.
|
|
295
|
+
*/
|
|
296
|
+
readonly unstableRate: number;
|
|
297
|
+
}
|
|
298
|
+
|
|
299
|
+
|
|
300
|
+
/**
|
|
301
|
+
* Contains information about a replay.
|
|
302
|
+
*/
|
|
303
|
+
export interface ReplayInformation {
|
|
304
|
+
/**
|
|
305
|
+
* The version of the replay.
|
|
306
|
+
*/
|
|
307
|
+
replayVersion: number;
|
|
308
|
+
/**
|
|
309
|
+
* The folder name containing the beatmap played.
|
|
310
|
+
*/
|
|
311
|
+
folderName: string;
|
|
312
|
+
/**
|
|
313
|
+
* The file name of the beatmap played.
|
|
314
|
+
*/
|
|
315
|
+
fileName: string;
|
|
316
|
+
/**
|
|
317
|
+
* The MD5 hash of the beatmap played.
|
|
318
|
+
*/
|
|
319
|
+
hash: string;
|
|
320
|
+
/**
|
|
321
|
+
* The date of which the play was set.
|
|
322
|
+
*
|
|
323
|
+
* Only available in replay v3 or later.
|
|
324
|
+
*/
|
|
325
|
+
time?: Date;
|
|
326
|
+
/**
|
|
327
|
+
* The amount of geki and 300 katu achieved in the play. See {@link https://osu.ppy.sh/help/wiki/Score this} osu! wiki page for more information.
|
|
328
|
+
*
|
|
329
|
+
* Only available in replay v3 or later.
|
|
330
|
+
*
|
|
331
|
+
* If `map` is defined in analyzer (either in `Beatmap` or `StarRating` instance), this will be analyzed using beatmap hitobject information and replay hitobject data for replay v1 and v2.
|
|
332
|
+
*/
|
|
333
|
+
hit300k?: number;
|
|
334
|
+
/**
|
|
335
|
+
* The amount of 300s achieved in the play.
|
|
336
|
+
*
|
|
337
|
+
* Only available in replay v3 or later.
|
|
338
|
+
*
|
|
339
|
+
* If `map` is defined in analyzer (either in `Beatmap` or `StarRating` instance), this will be analyzed using beatmap hitobject information and replay hitobject data for replay v1 and v2.
|
|
340
|
+
*/
|
|
341
|
+
hit300?: number;
|
|
342
|
+
/**
|
|
343
|
+
* The amount of 100 katu achieved in the play. See {@link https://osu.ppy.sh/help/wiki/Score this} osu! wiki page for more information.
|
|
344
|
+
*
|
|
345
|
+
* Only available in replay v3 or later.
|
|
346
|
+
*
|
|
347
|
+
* If `map` is defined in analyzer (either in `Beatmap` or `StarRating` instance), this will be analyzed using beatmap hitobject information and replay hitobject data for replay v1 and v2.
|
|
348
|
+
*/
|
|
349
|
+
hit100k?: number;
|
|
350
|
+
/**
|
|
351
|
+
* The total score achieved in the play.
|
|
352
|
+
*
|
|
353
|
+
* Only available in replay v3 or later.
|
|
354
|
+
*/
|
|
355
|
+
score?: number;
|
|
356
|
+
/**
|
|
357
|
+
* The maximum combo achieved in the play.
|
|
358
|
+
*
|
|
359
|
+
* Only available in replay v3 or later.
|
|
360
|
+
*/
|
|
361
|
+
maxCombo?: number;
|
|
362
|
+
/**
|
|
363
|
+
* The accuracy achieved in the play.
|
|
364
|
+
*
|
|
365
|
+
* Only available in replay v3 or later.
|
|
366
|
+
*
|
|
367
|
+
* If `map` is defined in analyzer (either in `Beatmap` or `StarRating` instance), this will be analyzed using beatmap hitobject information and replay hitobject data for replay v1 and v2.
|
|
368
|
+
*/
|
|
369
|
+
accuracy?: Accuracy;
|
|
370
|
+
/**
|
|
371
|
+
* Whether the play achieved the beatmap's maximum combo.
|
|
372
|
+
*
|
|
373
|
+
* Only available in replay v3 or later.
|
|
374
|
+
*/
|
|
375
|
+
isFullCombo?: boolean;
|
|
376
|
+
/**
|
|
377
|
+
* The name of the player in the replay.
|
|
378
|
+
*
|
|
379
|
+
* Only available in replay v3 or later.
|
|
380
|
+
*/
|
|
381
|
+
playerName?: string;
|
|
382
|
+
/**
|
|
383
|
+
* Enabled modifications during the play in raw Java object format.
|
|
384
|
+
*
|
|
385
|
+
* Only available in replay v3 or later.
|
|
386
|
+
*/
|
|
387
|
+
rawMods?: string;
|
|
388
|
+
/**
|
|
389
|
+
* The rank achieved in the play.
|
|
390
|
+
*
|
|
391
|
+
* Only available in replay v3 or later.
|
|
392
|
+
*
|
|
393
|
+
* If `map` is defined in analyzer (either in `Beatmap` or `StarRating` instance), this will be analyzed using beatmap hitobject information and replay hitobject data for replay v1 and v2.
|
|
394
|
+
*/
|
|
395
|
+
rank?: string;
|
|
396
|
+
/**
|
|
397
|
+
* Enabled modifications during the play in osu!standard format.
|
|
398
|
+
*
|
|
399
|
+
* Only available in replay v3 or later.
|
|
400
|
+
*/
|
|
401
|
+
convertedMods?: Mod[];
|
|
402
|
+
/**
|
|
403
|
+
* The speed modification of the replay.
|
|
404
|
+
*
|
|
405
|
+
* Only available in replay v4 or later. By default this is 1.
|
|
406
|
+
*/
|
|
407
|
+
speedModification?: number;
|
|
408
|
+
/**
|
|
409
|
+
* The forced AR of the replay.
|
|
410
|
+
*
|
|
411
|
+
* Only available in replay v4 or later.
|
|
412
|
+
*/
|
|
413
|
+
forcedAR?: number;
|
|
414
|
+
/**
|
|
415
|
+
* The cursor movement data of the replay.
|
|
416
|
+
*/
|
|
417
|
+
cursorMovement: CursorData[];
|
|
418
|
+
/**
|
|
419
|
+
* The hit object data of the replay.
|
|
420
|
+
*/
|
|
421
|
+
hitObjectData: ReplayObjectData[];
|
|
422
|
+
}
|
|
423
|
+
|
|
424
|
+
/**
|
|
425
|
+
* Represents an exported replay's JSON structure.
|
|
426
|
+
*/
|
|
427
|
+
export interface ExportedReplayJSON {
|
|
428
|
+
/**
|
|
429
|
+
* The version of the exported replay.
|
|
430
|
+
*/
|
|
431
|
+
version: number;
|
|
432
|
+
/**
|
|
433
|
+
* Data of the exported replay.
|
|
434
|
+
*/
|
|
435
|
+
replaydata: {
|
|
436
|
+
/**
|
|
437
|
+
* The path towards the beatmap's `.osu` file from the song directory of the game.
|
|
438
|
+
*/
|
|
439
|
+
filename: string;
|
|
440
|
+
/**
|
|
441
|
+
* The name of the player.
|
|
442
|
+
*/
|
|
443
|
+
playername: string;
|
|
444
|
+
/**
|
|
445
|
+
* The name of the replay file.
|
|
446
|
+
*/
|
|
447
|
+
replayfile: string;
|
|
448
|
+
/**
|
|
449
|
+
* Droid modifications that are used in the replay.
|
|
450
|
+
*/
|
|
451
|
+
mod: string;
|
|
452
|
+
/**
|
|
453
|
+
* The amount of total score achieved.
|
|
454
|
+
*/
|
|
455
|
+
score: number;
|
|
456
|
+
/**
|
|
457
|
+
* The maximum combo achieved.
|
|
458
|
+
*/
|
|
459
|
+
combo: number;
|
|
460
|
+
/**
|
|
461
|
+
* The rank achieved in the replay.
|
|
462
|
+
*/
|
|
463
|
+
mark: string;
|
|
464
|
+
/**
|
|
465
|
+
* The amount of geki hits in the replay.
|
|
466
|
+
*/
|
|
467
|
+
h300k: number;
|
|
468
|
+
/**
|
|
469
|
+
* The amount of great hits in the replay.
|
|
470
|
+
*/
|
|
471
|
+
h300: number;
|
|
472
|
+
/**
|
|
473
|
+
* The amount of katu hits in the replay.
|
|
474
|
+
*/
|
|
475
|
+
h100k: number;
|
|
476
|
+
/**
|
|
477
|
+
* The amount of good hits in the replay.
|
|
478
|
+
*/
|
|
479
|
+
h100: number;
|
|
480
|
+
/**
|
|
481
|
+
* The amount of meh hits in the replay.
|
|
482
|
+
*/
|
|
483
|
+
h50: number;
|
|
484
|
+
/**
|
|
485
|
+
* The amount of misses in the replay.
|
|
486
|
+
*/
|
|
487
|
+
misses: number;
|
|
488
|
+
/**
|
|
489
|
+
* Accuracy gained in the replay.
|
|
490
|
+
*/
|
|
491
|
+
accuracy: number;
|
|
492
|
+
/**
|
|
493
|
+
* The epoch date at which the score was set, in milliseconds.
|
|
494
|
+
*/
|
|
495
|
+
time: number;
|
|
496
|
+
/**
|
|
497
|
+
* Whether the score is a full combo (1 is `true`, 0 is `false`).
|
|
498
|
+
*/
|
|
499
|
+
perfect: number;
|
|
500
|
+
};
|
|
501
|
+
}
|
|
502
|
+
|
|
503
|
+
/**
|
|
504
|
+
* Represents a response from an API request.
|
|
505
|
+
*/
|
|
506
|
+
export interface RequestResponse {
|
|
507
|
+
/**
|
|
508
|
+
* The result of the API request.
|
|
509
|
+
*/
|
|
510
|
+
readonly data: Buffer;
|
|
511
|
+
/**
|
|
512
|
+
* The status code of the API request.
|
|
513
|
+
*/
|
|
514
|
+
readonly statusCode: number;
|
|
515
|
+
}
|
|
516
|
+
|
|
517
|
+
export interface ScoreInformation {
|
|
518
|
+
/**
|
|
519
|
+
* The uid of the player.
|
|
520
|
+
*/
|
|
521
|
+
uid?: number;
|
|
522
|
+
/**
|
|
523
|
+
* The ID of the score.
|
|
524
|
+
*/
|
|
525
|
+
scoreID?: number;
|
|
526
|
+
/**
|
|
527
|
+
* The player's name.
|
|
528
|
+
*/
|
|
529
|
+
username: string;
|
|
530
|
+
/**
|
|
531
|
+
* The title of the beatmap.
|
|
532
|
+
*/
|
|
533
|
+
title: string;
|
|
534
|
+
/**
|
|
535
|
+
* The maximum combo achieved in the play.
|
|
536
|
+
*/
|
|
537
|
+
combo: number;
|
|
538
|
+
/**
|
|
539
|
+
* The score achieved in the play.
|
|
540
|
+
*/
|
|
541
|
+
score: number;
|
|
542
|
+
/**
|
|
543
|
+
* The rank achieved in the play.
|
|
544
|
+
*/
|
|
545
|
+
rank: string;
|
|
546
|
+
/**
|
|
547
|
+
* The date of which the play was set.
|
|
548
|
+
*/
|
|
549
|
+
date: Date | number;
|
|
550
|
+
/**
|
|
551
|
+
* The accuracy achieved in the play.
|
|
552
|
+
*/
|
|
553
|
+
accuracy: Accuracy;
|
|
554
|
+
/**
|
|
555
|
+
* Enabled modifications in the play.
|
|
556
|
+
*/
|
|
557
|
+
mods: Mod[];
|
|
558
|
+
/**
|
|
559
|
+
* MD5 hash of the play.
|
|
560
|
+
*/
|
|
561
|
+
hash: string;
|
|
562
|
+
}
|
|
563
|
+
|
|
564
|
+
//#endregion
|
|
565
|
+
}
|