rborges / dnd-5e-wrapper
There is no license information available for the latest version (dev-main) of this package.
A Dnd 5e PHP wrapper made with symfony
dev-main
2022-01-31 20:32 UTC
Requires
- guzzlehttp/guzzle: ^7.4
Requires (Dev)
- phpunit/phpunit: ^9.5
This package is auto-updated.
Last update: 2025-07-29 02:17:27 UTC
README
Installation
You can clone the repository to a path of your choice or install via composer.
composer require rborges/dnd-5e-wrapper
Usage
There are 12 entities total including these ones
use Dnd5eApi\DndApi;
$dndApi = new DndApi();
//get dnd classes
$class = $dnd->classes();
//get specific class
$bard = $class->bard();
//get bard proficiencies
$bardProficiencies = $bard->getProficiencies();
//get dnd races
$race = $dnd->races();
$dwarf = $race->dwarf();
$dwarfStartingProficencies = $dwarf->getStartingProficiencies();
Tests
To test the app simply use
composer test
The Data
This app uses the 'Dungeons and Dragons 5th Edition REST API v1' api as the source of the data used. You can find it here.
Requirements
- PHP >= 7.3
- OpenSSL PHP Extension
- PDO PHP Extension
- Mbstring PHP Extension