UNPKG

guildwars2-ts

Version:

GuildWars 2 API Wrapper in Typescript

40 lines (39 loc) 1.41 kB
import type { z } from 'zod'; import { ApiBase } from '../../base/apiBase'; import { AchievementCategoriesDTO, AchievementGroupsDTO, AchievementsDTO } from '../../models/'; import { numberArrayType, stringArrayType } from '../v2apiUtils'; /** * /v2/achievements api */ export declare class AchievementsApi extends ApiBase { /** * Returns all (whitelisted) achievements in the game, including localized names and icons. */ get(): Promise<z.infer<typeof numberArrayType>>; /** * Returns all (whitelisted) achievements in the game, including localized names and icons. * * @param ids - List of achievement ids */ get(ids: number[]): Promise<z.infer<typeof AchievementsDTO>>; /** * Returns all the categories for achievements. */ getCategories(): Promise<z.infer<typeof numberArrayType>>; /** * Returns all the categories for achievements. * * @param ids - (optional) List of category ids, or "all". */ getCategories(ids: number[] | 'all'): Promise<z.infer<typeof AchievementCategoriesDTO>>; /** * Returns all the top-level groups for achievements. */ getGroups(): Promise<z.infer<typeof stringArrayType>>; /** * Returns all the top-level groups for achievements. * * @param id - (optional) Group id. */ getGroups(id: string): Promise<z.infer<typeof AchievementGroupsDTO>>; }