@@ -41,8 +41,8 @@ $twitch_client_secret = 'TWITCH_CLIENT_SECRET';
41
41
$twitch_scopes = '';
42
42
43
43
$helixGuzzleClient = new \TwitchApi\HelixGuzzleClient($twitch_client_id);
44
- $TwitchApi = new \TwitchApi\TwitchApi($helixGuzzleClient, $twitch_client_id, $twitch_client_secret);
45
- $oauth = $TwitchApi ->getOauthApi();
44
+ $twitchApi = new \TwitchApi\TwitchApi($helixGuzzleClient, $twitch_client_id, $twitch_client_secret);
45
+ $oauth = $twitchApi ->getOauthApi();
46
46
47
47
try {
48
48
$token = $oauth->getAppAccessToken($twitch_scopes ?? '');
@@ -63,8 +63,8 @@ $twitch_client_secret = 'TWITCH_CLIENT_SECRET';
63
63
$twitch_scopes = '';
64
64
65
65
$helixGuzzleClient = new \TwitchApi\HelixGuzzleClient($twitch_client_id);
66
- $TwitchApi = new \TwitchApi\TwitchApi($helixGuzzleClient, $twitch_client_id, $twitch_client_secret);
67
- $oauth = $TwitchApi ->getOauthApi();
66
+ $twitchApi = new \TwitchApi\TwitchApi($helixGuzzleClient, $twitch_client_id, $twitch_client_secret);
67
+ $oauth = $twitchApi ->getOauthApi();
68
68
69
69
// Get the code from URI
70
70
$code = $_GET['code'];
@@ -105,8 +105,8 @@ $twitch_scopes = '';
105
105
$user_refresh_token = 'REFRESH_TOKEN';
106
106
107
107
$helixGuzzleClient = new \TwitchApi\HelixGuzzleClient($twitch_client_id);
108
- $TwitchApi = new \TwitchApi\TwitchApi($helixGuzzleClient, $twitch_client_id, $twitch_client_secret);
109
- $oauth = $TwitchApi ->getOauthApi();
108
+ $twitchApi = new \TwitchApi\TwitchApi($helixGuzzleClient, $twitch_client_id, $twitch_client_secret);
109
+ $oauth = $twitchApi ->getOauthApi();
110
110
111
111
try {
112
112
$token = $oauth->getAppAccessToken($twitch_scopes ?? '');
@@ -143,11 +143,11 @@ $twitch_access_token = 'the token';
143
143
$helixGuzzleClient = new \TwitchApi\HelixGuzzleClient($twitch_client_id);
144
144
145
145
// Instantiate TwitchApi. Can be done in a service layer and injected as well.
146
- $TwitchApi = new TwitchApi($helixGuzzleClient, $twitch_client_id, $twitch_client_secret);
146
+ $twitchApi = new TwitchApi($helixGuzzleClient, $twitch_client_id, $twitch_client_secret);
147
147
148
148
try {
149
149
// Make the API call. A ResponseInterface object is returned.
150
- $response = $TwitchApi ->getUsersApi()->getUserByAccessToken($twitch_access_token);
150
+ $response = $twitchApi ->getUsersApi()->getUserByAccessToken($twitch_access_token);
151
151
152
152
// Get and decode the actual content sent by Twitch.
153
153
$responseContent = json_decode($response->getBody()->getContents());
0 commit comments