Skip to content

brianclogan/dnd-5e-api-php

Repository files navigation

DND 5e API Wrapper in PHP

Latest Version on Packagist Build Status Quality Score Total Downloads

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.

About

A PHP Wrapper for the D&D 5e API

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Sponsor this project

Packages

No packages published

Languages