]> git.localhorst.tv Git - alttp.git/commitdiff
document twitch channel info structure
authorDaniel Karbach <daniel.karbach@localhorst.tv>
Fri, 9 Aug 2024 19:26:25 +0000 (21:26 +0200)
committerDaniel Karbach <daniel.karbach@localhorst.tv>
Fri, 9 Aug 2024 19:26:25 +0000 (21:26 +0200)
app/Console/Commands/TwitchChannelInfo.php

index 7b373c8c94ed54fe611280078158799e35002775..c297c7cb4ab34868691434fc9e5d1c9a6055dc8a 100644 (file)
@@ -88,6 +88,20 @@ class TwitchChannelInfo extends Command {
                foreach ($channels as $channel) {
                        $data = null;
                        foreach ($rsp['data'] as $info) {
+                               // id => numeric string
+                               // user_id => numeric string
+                               // user_login => string
+                               // user_name => string
+                               // game_id => numeric string
+                               // game_name => string
+                               // type => "live" (or "rerun"?)
+                               // title => string
+                               // viewer_count => int
+                               // started_at => ISO date
+                               // language => 2 letter code
+                               // thumbnail_url => url
+                               // tags [string]
+                               // is_mature => bool
                                if ($info['user_id'] == $channel->twitch_id) {
                                        $data = $info;
                                        break;