@retroachievements/api
Version:
A well-tested library that lets you get achievement, user, and game data from RetroAchievements.
48 lines (47 loc) • 1.34 kB
TypeScript
import type { AuthObject } from "../utils/public";
import type { UserWantToPlayList } from "./models";
/**
* A call to this function will retrieve a user's "Want to Play Games" list.
*
* @param authorization An object containing your username and webApiKey.
* This can be constructed with `buildAuthorization()`.
*
* @param payload.username The user for which to retrieve the
* want to play games list for.
*
* @param payload.offset Defaults to 0. The number of entries to skip.
*
* @param payload.count Defaults to 100, has a max of 500.
*
* @example
* ```
* const wantToPlayList = await getUserWantToPlayList(
* authorization,
* { username: "wv_pinball" }
* );
* ```
*
* @returns An object containing a user's list of "Want to Play Games".
* ```json
* {
* "count": 100,
* "total": 1287,
* "results": [
* {
* "id": 20246,
* "title": "~Hack~ Knuckles the Echidna in Sonic the Hedgehog",
* "imageIcon": "/Images/074560.png",
* "consoleID": 1,
* "consoleName": "Genesis/Mega Drive",
* "pointsTotal": 1500,
* "achievementsPublished": 50
* }
* ]
* }
* ```
*/
export declare const getUserWantToPlayList: (authorization: AuthObject, payload: {
username: string;
offset?: number;
count?: number;
}) => Promise<UserWantToPlayList>;