We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent fe0ccb4 commit 180ddd9Copy full SHA for 180ddd9
twitch-class.php
@@ -294,6 +294,22 @@ public function streamStart()
294
}
295
296
297
+ /**
298
+ * Gets users stream language
299
+ * @return string
300
+ * @throws Exception
301
+ *
302
+ */
303
+ public function streamLanguage()
304
+ {
305
+ $data = json_decode($this->data, true);
306
+ if (!isset($data['data'][0]['language'])) {
307
+ throw new Exception("No data found");
308
+ } else {
309
+ return $data['data'][0]['language'];
310
+ }
311
312
+
313
/**
314
* Gets users current stream thumbnail
315
* @return string
0 commit comments