Files
AquaDX/AquaNet/src/libs/maimai.ts
2024-03-06 00:21:27 -05:00

14 lines
428 B
TypeScript

import { AQUA_HOST, DATA_HOST } from './config'
export async function getMaimai(endpoint: string, params: any) {
return await fetch(`${AQUA_HOST}/Maimai2Servlet/${endpoint}`, {
method: 'POST',
body: JSON.stringify(params)
}).then(res => res.json())
}
export async function getMaimaiAllMusic(): Promise<{ [key: string]: any }> {
return fetch(`${DATA_HOST}/maimai/meta/00/all-music.json`).then(it => it.json())
}