mirror of
https://github.com/MewoLab/AquaDX.git
synced 2026-02-11 04:47:26 +08:00
[+] SDK for settings/get settings/set
This commit is contained in:
@@ -6,7 +6,7 @@ import type {
|
||||
GenericGameSummary,
|
||||
GenericRanking,
|
||||
TrendEntry,
|
||||
AquaNetUser
|
||||
AquaNetUser, GameOption
|
||||
} from "./generalTypes";
|
||||
import type { GameName } from "./scoring";
|
||||
|
||||
@@ -153,3 +153,10 @@ export const DATA = {
|
||||
allMusic: (game: GameName): Promise<AllMusic> =>
|
||||
fetch(`${DATA_HOST}/d/${game}/00/all-music.json`).then(it => it.json())
|
||||
}
|
||||
|
||||
export const SETTING = {
|
||||
get: (): Promise<GameOption[]> =>
|
||||
post('/api/v2/settings/get', {}),
|
||||
set: (key: string, value: string) =>
|
||||
post('/api/v2/settings/set', { key, value }),
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user