1 | <?php |
||
13 | class BattleNet extends AbstractService { |
||
14 | |||
15 | /** |
||
16 | * Defined scopes. |
||
17 | * |
||
18 | * @link https://dev.battle.net/docs |
||
19 | */ |
||
20 | const SCOPE_WOW_PROFILE = "wow.profile"; |
||
21 | const SCOPE_SC2_PROFILE = "sc2.profile"; |
||
22 | |||
23 | /** |
||
24 | * Defined API URIs. |
||
25 | * |
||
26 | * @link https://dev.battle.net/docs |
||
27 | */ |
||
28 | const API_URI_US = 'https://us.api.battle.net/'; |
||
29 | const API_URI_EU = 'https://eu.api.battle.net/'; |
||
30 | const API_URI_KR = 'https://kr.api.battle.net/'; |
||
31 | const API_URI_TW = 'https://tw.api.battle.net/'; |
||
32 | const API_URI_CN = 'https://api.battlenet.com.cn/'; |
||
33 | const API_URI_SEA = 'https://sea.api.battle.net/'; |
||
34 | |||
35 | /** |
||
36 | * {@inheritdoc} |
||
37 | */ |
||
38 | protected function init() |
||
44 | |||
45 | |||
46 | /** |
||
47 | * Translates the current base API URI into an OAuth base URI. |
||
48 | * |
||
49 | * @returns string Base URI of oauth services. |
||
50 | */ |
||
51 | private function GetOAuthBaseUri() { |
||
64 | |||
65 | /** |
||
66 | * {@inheritdoc} |
||
67 | */ |
||
68 | public function getAuthorizationEndpoint() { |
||
71 | |||
72 | /** |
||
73 | * {@inheritdoc} |
||
74 | */ |
||
75 | public function getAccessTokenEndpoint() { |
||
78 | |||
79 | /** |
||
80 | * {@inheritdoc} |
||
81 | */ |
||
82 | protected function getAuthorizationMethod() |
||
86 | |||
87 | /** |
||
88 | * {@inheritdoc} |
||
89 | */ |
||
90 | protected function parseAccessTokenResponse( $responseBody ) |
||
111 | } |
||
112 |