darkgoldblade01 / dnd-5e-api
A DND 5e API wrapper written in PHP
Fund package maintenance!
darkgoldblade01
Patreon
Requires
- php: ^7.3|^8.0
- ext-json: *
- guzzlehttp/guzzle: ^7.0.1
Requires (Dev)
- phpunit/phpunit: ^9.0
- scrutinizer/ocular: ^1.8
This package is auto-updated.
Last update: 2024-11-04 14:46:11 UTC
README
This package is a PHP wrapper for the DND5eAPI.
Installation
You can install the package via composer:
composer require darkgoldblade01/dnd-5e-api
Usage
use 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
Testing
composer test
Changelog
Please see CHANGELOG for more information what has changed recently.
Contributing
Please see CONTRIBUTING for details.
Security
If you discover any security related issues, please use the issue tracker.
Credits
License
The MIT License (MIT). Please see License File for more information.