Skip to content

Commit

Permalink
Fix Var Names
Browse files Browse the repository at this point in the history
  • Loading branch information
Brandin committed Jul 30, 2021
1 parent 3ed7683 commit 5bcf412
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@ $twitch_client_secret = 'TWITCH_CLIENT_SECRET';
$twitch_scopes = '';

$helixGuzzleClient = new \TwitchApi\HelixGuzzleClient($twitch_client_id);
$TwitchApi = new \TwitchApi\TwitchApi($helixGuzzleClient, $twitch_client_id, $twitch_client_secret);
$oauth = $TwitchApi->getOauthApi();
$twitchApi = new \TwitchApi\TwitchApi($helixGuzzleClient, $twitch_client_id, $twitch_client_secret);
$oauth = $twitchApi->getOauthApi();

try {
$token = $oauth->getAppAccessToken($twitch_scopes ?? '');
Expand All @@ -63,8 +63,8 @@ $twitch_client_secret = 'TWITCH_CLIENT_SECRET';
$twitch_scopes = '';

$helixGuzzleClient = new \TwitchApi\HelixGuzzleClient($twitch_client_id);
$TwitchApi = new \TwitchApi\TwitchApi($helixGuzzleClient, $twitch_client_id, $twitch_client_secret);
$oauth = $TwitchApi->getOauthApi();
$twitchApi = new \TwitchApi\TwitchApi($helixGuzzleClient, $twitch_client_id, $twitch_client_secret);
$oauth = $twitchApi->getOauthApi();

// Get the code from URI
$code = $_GET['code'];
Expand Down Expand Up @@ -105,8 +105,8 @@ $twitch_scopes = '';
$user_refresh_token = 'REFRESH_TOKEN';

$helixGuzzleClient = new \TwitchApi\HelixGuzzleClient($twitch_client_id);
$TwitchApi = new \TwitchApi\TwitchApi($helixGuzzleClient, $twitch_client_id, $twitch_client_secret);
$oauth = $TwitchApi->getOauthApi();
$twitchApi = new \TwitchApi\TwitchApi($helixGuzzleClient, $twitch_client_id, $twitch_client_secret);
$oauth = $twitchApi->getOauthApi();

try {
$token = $oauth->getAppAccessToken($twitch_scopes ?? '');
Expand Down Expand Up @@ -143,11 +143,11 @@ $twitch_access_token = 'the token';
$helixGuzzleClient = new \TwitchApi\HelixGuzzleClient($twitch_client_id);

// Instantiate TwitchApi. Can be done in a service layer and injected as well.
$TwitchApi = new TwitchApi($helixGuzzleClient, $twitch_client_id, $twitch_client_secret);
$twitchApi = new TwitchApi($helixGuzzleClient, $twitch_client_id, $twitch_client_secret);

try {
// Make the API call. A ResponseInterface object is returned.
$response = $TwitchApi->getUsersApi()->getUserByAccessToken($twitch_access_token);
$response = $twitchApi->getUsersApi()->getUserByAccessToken($twitch_access_token);

// Get and decode the actual content sent by Twitch.
$responseContent = json_decode($response->getBody()->getContents());
Expand Down

0 comments on commit 5bcf412

Please sign in to comment.