darkgoldblade01/dnd-5e-api

用PHP编写的DND 5e API包装器

dev-master 2021-02-04 06:38 UTC

This package is auto-updated.

Last update: 2024-09-04 14:29:18 UTC


README

Latest Version on Packagist Build Status Quality Score Total Downloads

此包是DND5eAPI的PHP包装器。

安装

您可以通过composer安装此包

composer require darkgoldblade01/dnd-5e-api

用法

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
        

测试

composer test

变更日志

请参阅 CHANGELOG 以获取更多关于最近更改的信息。

贡献

请参阅 CONTRIBUTING 以获取详细信息。

安全

如果您发现任何与安全相关的问题,请使用问题跟踪器。

致谢

许可

MIT许可(MIT)。请参阅 许可文件 以获取更多信息。