1 | <?php |
||
13 | class Twitch extends AbstractService |
||
14 | { |
||
15 | /** |
||
16 | * Scopes defined at: |
||
17 | * https://github.com/justintv/Twitch-API/blob/master/authentication.md#scopes |
||
18 | */ |
||
19 | |||
20 | /** |
||
21 | * Read access to non-public user information, such as email address. |
||
22 | */ |
||
23 | const SCOPE_USER_READ = 'user_read'; |
||
24 | |||
25 | /** |
||
26 | * Ability to ignore or unignore on behalf of a user. |
||
27 | */ |
||
28 | const SCOPE_BLOCKS_EDIT = 'user_blocks_edit'; |
||
29 | |||
30 | /** |
||
31 | * Read access to a user's list of ignored users. |
||
32 | */ |
||
33 | const SCOPE_BLOCKS_READ = 'user_blocks_read'; |
||
34 | |||
35 | /** |
||
36 | * Access to manage a user's followed channels. |
||
37 | */ |
||
38 | const SCOPE_CHANNEL_READ = 'channel_read'; |
||
39 | |||
40 | /** |
||
41 | * Write access to channel metadata (game, status, etc). |
||
42 | */ |
||
43 | const SCOPE_CHANNEL_EDITOR = 'channel_editor'; |
||
44 | |||
45 | /** |
||
46 | * Access to trigger commercials on channel. |
||
47 | */ |
||
48 | const SCOPE_CHANNEL_COMMERCIAL = 'channel_commercial'; |
||
49 | |||
50 | /** |
||
51 | * Ability to reset a channel's stream key. |
||
52 | */ |
||
53 | const SCOPE_CHANNEL_STREAM = 'channnel_stream'; |
||
54 | |||
55 | /** |
||
56 | * Read access to all subscribers to your channel. |
||
57 | */ |
||
58 | const SCOPE_CHANNEL_SUBSCRIPTIONS = 'channel_subscriptions'; |
||
59 | |||
60 | /** |
||
61 | * Read access to subscriptions of a user. |
||
62 | */ |
||
63 | const SCOPE_USER_SUBSCRIPTIONS = 'user_subscriptions'; |
||
64 | |||
65 | /** |
||
66 | * Read access to check if a user is subscribed to your channel. |
||
67 | */ |
||
68 | const SCOPE_CHANNEL_CHECK_SUBSCRIPTION = 'channel_check_subscription'; |
||
69 | |||
70 | /** |
||
71 | * Ability to log into chat and send messages. |
||
72 | */ |
||
73 | const SCOPE_CHAT_LOGIN = 'chat_login'; |
||
74 | |||
75 | public function __construct( |
||
98 | |||
99 | /** |
||
100 | * {@inheritdoc} |
||
101 | */ |
||
102 | public function getAuthorizationEndpoint() |
||
106 | |||
107 | /** |
||
108 | * {@inheritdoc} |
||
109 | */ |
||
110 | public function getAccessTokenEndpoint() |
||
114 | |||
115 | /** |
||
116 | * {@inheritdoc} |
||
117 | */ |
||
118 | protected function parseAccessTokenResponse($responseBody) |
||
137 | |||
138 | /** |
||
139 | * {@inheritdoc} |
||
140 | */ |
||
141 | protected function getExtraApiHeaders() |
||
148 | } |
||
149 |