@natowb/ddb-parser
TypeScript icon, indicating that this package has built-in type declarations

0.2.2 • Public • Published

@natowb/ddb-parser

a simple parser of dnd beyond character json

Usage

import { DndCharacter } from "@natowb/ddb-parser";
  // data can be retrieved by calling the character-service api of dnd beyond
  // https://character-service.dndbeyond.com/character/v5/character/<id>

  const character = new DndCharacter(data)

DndCharacter Class

class DndCharacter {
  id: string;
  name: string;
  avatarUrl: string | null;
  level: number;
  health: DndHealth;
  ac: number;
  proficiencyBonus: number;
  savingThrows: SavingThrows;
  passiveScores: PassiveScores;
  walkSpeed: number;
  classes: DndClass[];
  casting: {
    dc: number;
  }
  initiativeBonus: number;
}

Readme

Keywords

none

Package Sidebar

Install

npm i @natowb/ddb-parser

Weekly Downloads

1

Version

0.2.2

License

ISC

Unpacked Size

61.6 kB

Total Files

55

Last publish

Collaborators

  • natowb