12 lines
277 B
TypeScript
12 lines
277 B
TypeScript
const API_ENDPOINT = 'https://osu.direct/api/';
|
|
|
|
export const osudirect = {
|
|
osu: async (mapId: number): Promise<string | undefined> => {
|
|
try {
|
|
return await (await fetch(API_ENDPOINT + `osu/${mapId}?raw`)).text();
|
|
} catch {
|
|
return undefined;
|
|
}
|
|
},
|
|
};
|