1 | <?php |
||
14 | class Client |
||
15 | { |
||
16 | |||
17 | /** |
||
18 | * @var ApiClient |
||
19 | */ |
||
20 | private $apiClient; |
||
21 | |||
22 | 13 | public function __construct(ApiClient $apiClient) |
|
26 | |||
27 | /** |
||
28 | * Create default API client setup |
||
29 | */ |
||
30 | 1 | public static function create(string $apiKey): self |
|
31 | { |
||
32 | 1 | return new self( |
|
33 | 1 | new ApiClient( |
|
34 | 1 | $apiKey, |
|
35 | 1 | new GuzzleClient() |
|
36 | ) |
||
37 | ); |
||
38 | } |
||
39 | |||
40 | 1 | public function getStatus(): Status |
|
47 | |||
48 | 3 | public function getMatches(MatchesQuery $query = null): Matches |
|
56 | |||
57 | 2 | public function getMatch(string $matchId): DetailedMatch |
|
64 | |||
65 | 2 | public function getPlayers(PlayersQuery $query = null): Players |
|
73 | |||
74 | 2 | public function getPlayer(string $playerId): DetailedPlayer |
|
81 | } |
||
82 |