[+] Add summary to SDK

This commit is contained in:
Azalea
2024-02-12 01:23:32 -05:00
parent 48558bec0f
commit 2ca6be77ed
3 changed files with 28 additions and 1 deletions

View File

@@ -1,5 +1,6 @@
import {aqua_host} from "./config";
import type {TrendEntry} from "./generalTypes";
import type {MaimaiUserSummaryEntry} from "./maimaiTypes";
const multTable = [
@@ -39,4 +40,8 @@ export async function getMaimaiApi(endpoint: string, params: any) {
export async function getMaimaiTrend(userId: number): Promise<TrendEntry[]> {
return await getMaimaiApi("trend", {userId})
}
export async function getMaimaiUser(userId: number): Promise<MaimaiUserSummaryEntry> {
return await getMaimaiApi("user-summary", {userId})
}