UNPKG

@retroachievements/api

Version:

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

31 lines (30 loc) 804 B
import type { AuthObject } from "../utils/public"; import type { UserPoints } from "./models"; /** * A call to this function will retrieve a given user's hardcore * and softcore points. * * @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 point totals for. * * @example * ``` * const userPoints = await getUserPoints( * authorization, * { username: "xelnia" } * ); * ``` * * @returns An object containing metadata about a target user's points. * ```json * { * points: 7640, * softcorePoints: 25 * } * ``` */ export declare const getUserPoints: (authorization: AuthObject, payload: { username: string; }) => Promise<UserPoints>;