1 | <?php |
||
15 | class BattleNet extends AbstractService |
||
16 | { |
||
17 | /** ----------------------------------------------------------------------- |
||
18 | * Defined scopes. |
||
19 | * |
||
20 | * @see https://dev.battle.net/docs |
||
21 | */ |
||
22 | const SCOPE_WOW_PROFILE = 'wow.profile'; |
||
23 | const SCOPE_SC2_PROFILE = 'sc2.profile'; |
||
24 | |||
25 | /** ----------------------------------------------------------------------- |
||
26 | * Defined API URIs. |
||
27 | * |
||
28 | * @see https://dev.battle.net/docs |
||
29 | */ |
||
30 | const API_URI_US = 'https://us.api.battle.net/'; |
||
31 | const API_URI_EU = 'https://eu.api.battle.net/'; |
||
32 | const API_URI_KR = 'https://kr.api.battle.net/'; |
||
33 | const API_URI_TW = 'https://tw.api.battle.net/'; |
||
34 | const API_URI_CN = 'https://api.battlenet.com.cn/'; |
||
35 | const API_URI_SEA = 'https://sea.api.battle.net/'; |
||
36 | |||
37 | public function __construct(CredentialsInterface $credentials, |
||
50 | |||
51 | /** ----------------------------------------------------------------------- |
||
52 | * Translates the current base API URI into an OAuth base URI. |
||
53 | * |
||
54 | * @returns string Base URI of oauth services. |
||
55 | */ |
||
56 | private function GetOAuthBaseUri() |
||
69 | |||
70 | /** ----------------------------------------------------------------------- |
||
71 | * {@inheritdoc} |
||
72 | */ |
||
73 | public function getAuthorizationEndpoint() |
||
77 | |||
78 | /** ----------------------------------------------------------------------- |
||
79 | * {@inheritdoc} |
||
80 | */ |
||
81 | public function getAccessTokenEndpoint() |
||
85 | |||
86 | /** ----------------------------------------------------------------------- |
||
87 | * {@inheritdoc} |
||
88 | */ |
||
89 | protected function getAuthorizationMethod() |
||
93 | |||
94 | /** ----------------------------------------------------------------------- |
||
95 | * {@inheritdoc} |
||
96 | */ |
||
97 | protected function parseAccessTokenResponse($responseBody) |
||
118 | } |
||
119 |