mirror of https://github.com/hykilpikonna/AquaDX
[+] SDK for settings/get settings/set
parent
44bab8c0c7
commit
ba13bfd9ad
|
@ -114,3 +114,11 @@ export interface MusicMeta {
|
||||||
}
|
}
|
||||||
|
|
||||||
export type AllMusic = { [key: string]: MusicMeta }
|
export type AllMusic = { [key: string]: MusicMeta }
|
||||||
|
|
||||||
|
export interface GameOption {
|
||||||
|
name: string
|
||||||
|
desc: string
|
||||||
|
key: string
|
||||||
|
value: any
|
||||||
|
type: "Boolean"
|
||||||
|
}
|
||||||
|
|
|
@ -6,7 +6,7 @@ import type {
|
||||||
GenericGameSummary,
|
GenericGameSummary,
|
||||||
GenericRanking,
|
GenericRanking,
|
||||||
TrendEntry,
|
TrendEntry,
|
||||||
AquaNetUser
|
AquaNetUser, GameOption
|
||||||
} from "./generalTypes";
|
} from "./generalTypes";
|
||||||
import type { GameName } from "./scoring";
|
import type { GameName } from "./scoring";
|
||||||
|
|
||||||
|
@ -153,3 +153,10 @@ export const DATA = {
|
||||||
allMusic: (game: GameName): Promise<AllMusic> =>
|
allMusic: (game: GameName): Promise<AllMusic> =>
|
||||||
fetch(`${DATA_HOST}/d/${game}/00/all-music.json`).then(it => it.json())
|
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 }),
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in New Issue