RyanBayne / TwitchPress

TwitchPress is a system of plugins that combines the power of Twitch.tv with WordPress
http://twitchpress.wordpress.com
GNU General Public License v3.0
12 stars 6 forks source link

Twitch API Class has too many purposes #261

Closed RyanBayne closed 5 years ago

RyanBayne commented 6 years ago

I've identified a poor design decision that has led to class.twitch-api.php being used for too many purposes.

The issues...

I've already begun to make the required changes. The first change is establishing app and oauth creds in the main file. That is being done in 2.0.4 and should also help to clear up a bit of confusion about the values in question.

  1. Next step is to create a listener class and remove the need for TWITCHPRESS_Twitch_API() to listen.
  2. Look at what TWITCHPRESS_Twitch_API_Calls() actually needs from this class. I'm thinking there may be methods that can be moved to a functions file or the plugins main file.
RyanBayne commented 5 years ago

The new "helix/class.twitch-api.php" class resolves this issue.