This package is a PHP wrapper for the DND5eAPI.
You can install the package via composer:
composer require darkgoldblade01/dnd-5e-apiuse Darkgoldblade01\Dnd5eApi;
$api = new Dnd5eApi();
// Get Ability Scores API
$ability_scores_api = $api->ability_scores();
// Get Skills
$skills_api = $api->skills();
// Get Proficiences
$proficiencies_api = $api->proficiencies();
// You can get all items under an api
// This returns an array with all the ability scores in the AbilityScores Models
$ability_scores_api->all();
// Returns the AbilityScore Model based on the index
$ability_scores_api->{ability_score_index}();
//For instance:
$ability_scores_api->cha(); // Returns the Charisma AbilityScores Model
composer testPlease see CHANGELOG for more information what has changed recently.
Please see CONTRIBUTING for details.
If you discover any security related issues, please use the issue tracker.
The MIT License (MIT). Please see License File for more information.