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