@@ -336,15 +336,47 @@ public function getStreamTags($stream_id)
336
336
return $ this ->apiCall ('/helix/streams/tags?broadcaster_id= ' . rawurlencode ($ stream_id ));
337
337
}
338
338
339
+ /**
340
+ * Returns all tags for stream
341
+ * @param string $tag_id
342
+ * @return string
343
+ */
344
+ public function getAllStreamTags ($ tag_id )
345
+ {
346
+ return $ this ->apiCall ('/helix/tags/streams?tag_id= ' . rawurlencode ($ tag_id ));
347
+ }
348
+
339
349
/**
340
350
* Returns clips for game id
341
351
* @param int $game_id
352
+ * @param string $pagination
353
+ * @param int $amount
354
+ * @return string
355
+ */
356
+ public function getGameClips ($ game_id , $ pagination = null , $ amount = 25 )
357
+ {
358
+ if ($ pagination == '' ) {
359
+ return $ this ->apiCall ('/helix/clips?game_id= ' . rawurlencode ($ game_id ) . '&first= ' . rawurlencode ($ amount ));
360
+ } else {
361
+ return $ this ->apiCall ('/helix/clips?game_id= ' . rawurlencode ($ game_id ) . '&first= ' . rawurlencode ($ amount ) . '&after= ' . rawurlencode ($ pagination ) . '' );
362
+ }
363
+ }
364
+
365
+ /**
366
+ * Returns clips for user and game id
367
+ * @param int $user_id
368
+ * @param int $game_id
369
+ * @param string $pagination
342
370
* @param int $amount
343
371
* @return string
344
372
*/
345
- public function getGameClips ( $ game_id , $ amount = 25 )
373
+ public function getUserGameClips ( $ user_id , $ game_id, $ pagination = null , $ amount = 25 )
346
374
{
347
- return $ this ->apiCall ('/helix/clips?game_id= ' . rawurlencode ($ game_id ) . '&first= ' . rawurlencode ($ amount ));
375
+ if ($ pagination == '' ) {
376
+ return $ this ->apiCall ('/helix/clips?broadcaster_id= ' . rawurlencode ($ user_id ) . '&game_id= ' . rawurlencode ($ game_id ) . '&first= ' . rawurlencode ($ amount ));
377
+ } else {
378
+ return $ this ->apiCall ('/helix/clips?broadcaster_id= ' . rawurlencode ($ user_id ) . '&game_id= ' . rawurlencode ($ game_id ) . '&first= ' . rawurlencode ($ amount ) . '&after= ' . rawurlencode ($ pagination ) . '' );
379
+ }
348
380
}
349
381
350
382
0 commit comments