A scraper and data aggregator for D&D Beyond
Allows you to query D&D Beyond for various data entities based on IDs.
npm i
npm test
to run the tests, ornode sandbox/index.js
and play around with the sandbox environment
- First bring the library in
const Regdar = require('regdar');
- Call the function you need
Regdar.getCharacter(0123456789)
.then(character => {
// use character as you want
});
Resolves to a character object.
Character object schema below
// As of v1.0.1
{
name: 'Bhaal',
race: 'Half-Orc',
class: 'Warlock 1',
classes: [
{
level: 1,
name: 'Warlock'
}
],
abilities: {
str: {
modifier: -2,
score: 6
},
dex: {
modifier: 0,
score: 11
},
con: {
modifier: 2,
score: 14
},
int: {
modifier: 1,
score: 12
},
wis: {
modifier: 1,
score: 12
},
cha: {
modifier: 3,
score: 17
}
}
}