EliasRanz / twitchtv-oauth

A Open Source PHP Library that allows you to do various features via the TwitchTV API, including getting stats on your stream, updating your stream title/game, and running commercials. Future updates will be made to https://github.com/Xxplosions/twitch-api
19 stars 9 forks source link

authenticated_user #4

Closed Streusel closed 8 years ago

Streusel commented 8 years ago

It appears twitch has deprecated the 'error' field on https://github.com/Xxplosions/twitchtv-oauth/blob/master/twitchtv.php#L98 The correct way to check if something worked or not is to check the ['token']['valid'] field now, the response will be bool(true) or bool(false).

EliasRanz commented 8 years ago

Looking at this a little further it appears that they haven't changed it. If you check the json object on their Readme.md you will see that "error" is at the base of the object so you shouldn't need to hit ['token'] if you have an example of the documentation that states there is an issue then let me know and I'll adjust it accordingly. Sorry about the lengthy delay in response, haven't had the motivation to look back at it.

EliasRanz commented 8 years ago

Just checked the base url on the api and it looks like you're correct.