22# https://dev.twitch.tv/docs/v5/reference/clips/
33
44from twitch import keys
5- from twitch .api .parameters import Boolean , ClipPeriod , Cursor
5+ from twitch .api .parameters import Boolean , ClipPeriod , Cursor , Language
66from twitch .queries import V5Query as Qry
77from twitch .queries import query
88
@@ -17,22 +17,25 @@ def by_slug(slug):
1717
1818# required scope: None
1919@query
20- def get_top (channels = None , games = None , period = ClipPeriod .WEEK , trending = Boolean .FALSE , cursor = 'MA==' , limit = 10 ):
20+ def get_top (channels = None , games = None , period = ClipPeriod .WEEK , trending = Boolean .FALSE ,
21+ language = Language .ALL , cursor = 'MA==' , limit = 10 ):
2122 q = Qry ('clips/top' )
2223 q .add_param (keys .CHANNEL , channels , None )
2324 q .add_param (keys .GAME , games , None )
2425 q .add_param (keys .PERIOD , ClipPeriod .validate (period ), ClipPeriod .WEEK )
2526 q .add_param (keys .TRENDING , Boolean .validate (trending ), Boolean .FALSE )
27+ q .add_param (keys .LANGUAGE , Language .validate (language ), Language .ALL )
2628 q .add_param (keys .LIMIT , limit , 10 )
2729 q .add_param (keys .CURSOR , Cursor .validate (cursor ), 'MA==' )
2830 return q
2931
3032
3133# required scope: user_read
3234@query
33- def get_followed (trending = Boolean .FALSE , cursor = 'MA==' , limit = 10 ):
35+ def get_followed (trending = Boolean .FALSE , language = Language . ALL , cursor = 'MA==' , limit = 10 ):
3436 q = Qry ('clips/followed' )
3537 q .add_param (keys .TRENDING , Boolean .validate (trending ), Boolean .FALSE )
38+ q .add_param (keys .LANGUAGE , Language .validate (language ), Language .ALL )
3639 q .add_param (keys .LIMIT , limit , 10 )
3740 q .add_param (keys .CURSOR , Cursor .validate (cursor ), 'MA==' )
3841 return q
0 commit comments