@@ -41,14 +41,15 @@ public function getStreamByUser($userIdendifier, $streamType = 'live')
41
41
* @param string $streamType
42
42
* @param int $limit
43
43
* @param int $offset
44
+ * @param string $broadcaster_language
44
45
* @throws InvalidTypeException
45
46
* @throws InvalidIdentifierException
46
47
* @throws InvalidStreamTypeException
47
48
* @throws InvalidLimitException
48
49
* @throws InvalidOffsetException
49
50
* @return array|json
50
51
*/
51
- public function getLiveStreams ($ channel = null , $ game = null , $ language = null , $ streamType = 'live ' , $ limit = 25 , $ offset = 0 )
52
+ public function getLiveStreams ($ channel = null , $ game = null , $ language = null , $ streamType = 'live ' , $ limit = 25 , $ offset = 0 , $ broadcaster_language = null )
52
53
{
53
54
if ($ channel ) {
54
55
if (!is_string ($ channel )) {
@@ -73,6 +74,10 @@ public function getLiveStreams($channel = null, $game = null, $language = null,
73
74
throw new InvalidTypeException ('language ' , 'string ' , gettype ($ language ));
74
75
}
75
76
77
+ if ($ broadcaster_language && !is_string ($ broadcaster_language )) {
78
+ throw new InvalidTypeException ('broadcaster_language ' , 'string ' , gettype ($ broadcaster_language ));
79
+ }
80
+
76
81
if (!$ this ->isValidStreamType ($ streamType )) {
77
82
throw new InvalidStreamTypeException ();
78
83
}
@@ -89,6 +94,7 @@ public function getLiveStreams($channel = null, $game = null, $language = null,
89
94
'channel ' => $ channel ,
90
95
'game ' => $ game ,
91
96
'language ' => $ language ,
97
+ 'broadcaster_language ' => $ broadcaster_language ,
92
98
'stream_type ' => $ streamType ,
93
99
'limit ' => intval ($ limit ),
94
100
'offset ' => intval ($ offset ),
0 commit comments