| 1 | <?php |
||
| 11 | class Dnd5eApi |
||
| 12 | { |
||
| 13 | |||
| 14 | /** |
||
| 15 | * Base URI |
||
| 16 | * |
||
| 17 | * The base URI for the API. |
||
| 18 | * |
||
| 19 | * @var string |
||
| 20 | */ |
||
| 21 | protected $base_uri = 'https://www.dnd5eapi.co/api/'; |
||
| 22 | |||
| 23 | /** |
||
| 24 | * @var Client |
||
| 25 | */ |
||
| 26 | private $client; |
||
| 27 | |||
| 28 | public function __construct() { |
||
| 33 | |||
| 34 | /** |
||
| 35 | * Ability Scores |
||
| 36 | * |
||
| 37 | * Return a new instance of the DND API |
||
| 38 | * under the Ability Scores. |
||
| 39 | * |
||
| 40 | * @return AbilityScores |
||
| 41 | */ |
||
| 42 | protected function ability_scores(): AbilityScores |
||
| 46 | |||
| 47 | /** |
||
| 48 | * Skills |
||
| 49 | * |
||
| 50 | * Return a new instance of the DND API |
||
| 51 | * under the Skills. |
||
| 52 | * |
||
| 53 | * @return Skills |
||
| 54 | */ |
||
| 55 | protected function skills(): Skills |
||
| 59 | |||
| 60 | /** |
||
| 61 | * @param null $endpoint |
||
| 62 | * @return mixed |
||
| 63 | * @throws GuzzleException|NotFoundException |
||
| 64 | */ |
||
| 65 | protected function get($endpoint = null) { |
||
| 77 | } |
||
| 78 |