1 | <?php |
||
2 | |||
3 | namespace Seaony\ValorantApi\Endpoints; |
||
4 | |||
5 | trait PreGameEndpoints |
||
6 | { |
||
7 | /** |
||
8 | * Get the pre-game match ID for the provided player |
||
9 | * |
||
10 | * @param string $shard |
||
11 | * @param string $region |
||
12 | * @param string $puuid |
||
13 | * |
||
14 | * @return mixed |
||
15 | */ |
||
16 | public function preGamePlayer(string $shard, string $region, string $puuid) |
||
17 | { |
||
18 | return $this->request('GET', "https://glz-{$region}-1.{$shard}.a.pvp.net/pregame/v1/players/{$puuid}"); |
||
0 ignored issues
–
show
Bug
introduced
by
![]() |
|||
19 | } |
||
20 | |||
21 | /** |
||
22 | * Get Pre-Game match data |
||
23 | * |
||
24 | * @param string $shard |
||
25 | * @param string $region |
||
26 | * @param string $preGameMatchId |
||
27 | * |
||
28 | * @return mixed|\Psr\Http\Message\ResponseInterface |
||
29 | * @throws \GuzzleHttp\Exception\GuzzleException |
||
30 | */ |
||
31 | public function preGameMatch(string $shard, string $region, string $preGameMatchId) |
||
32 | { |
||
33 | return $this->request('GET', "https://glz-{$region}-1.{$shard}.a.pvp.net/pregame/v1/matches/{$preGameMatchId}"); |
||
34 | } |
||
35 | |||
36 | /** |
||
37 | * Get Pre-Game loadout data |
||
38 | * |
||
39 | * @param string $shard |
||
40 | * @param string $region |
||
41 | * @param string $preGameMatchId |
||
42 | * |
||
43 | * @return mixed|\Psr\Http\Message\ResponseInterface |
||
44 | * @throws \GuzzleHttp\Exception\GuzzleException |
||
45 | */ |
||
46 | public function preGameLoadouts(string $shard, string $region, string $preGameMatchId) |
||
47 | { |
||
48 | return $this->request('GET', "https://glz-{$region}-1.{$shard}.a.pvp.net/pregame/v1/matches/{$preGameMatchId}/loadouts"); |
||
49 | } |
||
50 | } |
||
51 |