UNPKG

@retroachievements/api

Version:

A well-tested library that lets you get achievement, user, and game data from RetroAchievements.

38 lines (37 loc) 1.19 kB
import type { AuthObject } from "../utils/public"; import type { FetchedSystem } from "./models"; /** * A call to this function will retrieve the complete list * of console ID and name pairs on the RetroAchievements.org * platform. * * @param authorization An object containing your username and webApiKey. * This can be constructed with `buildAuthorization()`. * * @param payload.shouldOnlyRetrieveActiveSystems If true, only systems that * officially support achievements will be returned. * * @param payload.shouldOnlyRetrieveGameSystems If true, events and hubs will * not be returned. * * @example * ``` * const consoleIds = await getConsoleIds(authorization); * ``` * * @returns An array containing a complete list of console ID * and name pairs for RetroAchievements.org. * ```json * { * id: "1", * name: "Mega Drive", * iconUrl: "https://static.retroachievements.org/assets/images/system/md.png", * active: true, * isGameSystem: true * } * ``` */ export declare const getConsoleIds: (authorization: AuthObject, payload?: { shouldOnlyRetrieveActiveSystems: boolean; shouldOnlyRetrieveGameSystems: boolean; }) => Promise<FetchedSystem[]>;