Skip to content

Classes

client.classes — playable classes and metadata.

Official docs: Classes.

ts
type ClassName = "archer" | "warrior" | "assassin" | "mage" | "shaman";

Same union as ability ClassTree — use either for class-scoped calls.

When to use which

GoalMethod
Catalog of all classeslist
One class + archetypesgetClass

list()

GET /classes

ts
const { data } = await client.classes.list();
console.log(Object.values(data).map((entry) => entry.name));

getClass(className)

GET /classes/:className

ts
type GetClassResult = {
  id: string;
  name: string;
  lore: string;
  overallDifficulty: number;
  overallMax: number;
  archetypes: Record<
    string,
    {
      name: string;
      difficulty: number;
      max: number;
      icon: string;
      damage: number;
      defence: number;
      range: number;
      speed: number;
    }
  >;
};
ts
const { data } = await client.classes.getClass("warrior");
console.log(data.name, data.overallDifficulty);
for (const [id, arch] of Object.entries(data.archetypes)) {
  console.log(id, arch.name, arch.damage, arch.defence);
}

Unknown class names throw NotFound (or a validation-style API error depending on the path).

Unofficial TypeScript tooling for the Wynncraft API