@@ 13-28 (lines=16) @@ | ||
10 | * @package LoLApi\Api |
|
11 | * @see https://developer.riotgames.com/api-methods/ |
|
12 | */ |
|
13 | class MasteryApi extends BaseApi |
|
14 | { |
|
15 | const API_URL_MASTERIES_BY_SUMMONER_ID = '/lol/platform/v3/masteries/by-summoner/{summonerId}'; |
|
16 | ||
17 | /** |
|
18 | * @param string $summonerId |
|
19 | * |
|
20 | * @return ApiResult |
|
21 | */ |
|
22 | public function getMasteriesBySummonerId($summonerId) |
|
23 | { |
|
24 | $url = str_replace('{summonerId}', $summonerId, self::API_URL_MASTERIES_BY_SUMMONER_ID); |
|
25 | ||
26 | return $this->callApiUrl($url, []); |
|
27 | } |
|
28 | } |
|
29 |
@@ 13-28 (lines=16) @@ | ||
10 | * @package LoLApi\Api |
|
11 | * @see https://developer.riotgames.com/api-methods/ |
|
12 | */ |
|
13 | class RuneApi extends BaseApi |
|
14 | { |
|
15 | const API_URL_RUNES_BY_SUMMONER_ID = '/lol/platform/v3/runes/by-summoner/{summonerId}'; |
|
16 | ||
17 | /** |
|
18 | * @param string $summonerId |
|
19 | * |
|
20 | * @return ApiResult |
|
21 | */ |
|
22 | public function getRunesBySummonerId($summonerId) |
|
23 | { |
|
24 | $url = str_replace('{summonerId}', $summonerId, self::API_URL_RUNES_BY_SUMMONER_ID); |
|
25 | ||
26 | return $this->callApiUrl($url, []); |
|
27 | } |
|
28 | } |
|
29 |
@@ 13-37 (lines=25) @@ | ||
10 | * @package LoLApi\Api |
|
11 | * @see https://developer.riotgames.com/api-methods/ |
|
12 | */ |
|
13 | class SpectatorApi extends BaseApi |
|
14 | { |
|
15 | const API_URL_SPECTATOR_FEATURED = '/lol/spectator/v3/featured-games'; |
|
16 | const API_URL_CURRENT_GAME_BY_SUMMONER_ID = '/lol/spectator/v3/active-games/by-summoner/{summonerId}'; |
|
17 | ||
18 | /** |
|
19 | * @return ApiResult |
|
20 | */ |
|
21 | public function getFeaturedGames() |
|
22 | { |
|
23 | return $this->callApiUrl(self::API_URL_SPECTATOR_FEATURED, []); |
|
24 | } |
|
25 | ||
26 | /** |
|
27 | * @param string $summonerId |
|
28 | * |
|
29 | * @return ApiResult |
|
30 | */ |
|
31 | public function getCurrentGameByPlatformIdAndSummonerId($summonerId) |
|
32 | { |
|
33 | $url = str_replace('{summonerId}', $summonerId, self::API_URL_CURRENT_GAME_BY_SUMMONER_ID); |
|
34 | ||
35 | return $this->callApiUrl($url, []); |
|
36 | } |
|
37 | } |
|
38 |