1 | <?php |
||
15 | class BattleNet extends AbstractService { |
||
16 | |||
17 | /** ----------------------------------------------------------------------- |
||
18 | * Defined scopes. |
||
19 | * |
||
20 | * @link 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 | * @link 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() { |
||
76 | |||
77 | /** ----------------------------------------------------------------------- |
||
78 | * {@inheritdoc} |
||
79 | */ |
||
80 | public function getAccessTokenEndpoint() { |
||
83 | |||
84 | /** ----------------------------------------------------------------------- |
||
85 | * {@inheritdoc} |
||
86 | */ |
||
87 | protected function getAuthorizationMethod() |
||
91 | |||
92 | /** ----------------------------------------------------------------------- |
||
93 | * {@inheritdoc} |
||
94 | */ |
||
95 | protected function parseAccessTokenResponse( $responseBody ) |
||
116 | } |
||
117 |