Skip to content

Commit e5c0594

Browse files
committed
[v5] search resolve shadowed variable naming
1 parent d4719cf commit e5c0594

1 file changed

Lines changed: 14 additions & 14 deletions

File tree

resources/lib/twitch/api/v5/search.py

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -8,29 +8,29 @@
88

99

1010
@query
11-
def channels(query, limit=25, offset=0):
11+
def channels(search_query, limit=25, offset=0):
1212
q = Qry('search/channels')
13-
q.add_param(keys.QUERY, query)
13+
q.add_param(keys.QUERY, search_query)
1414
q.add_param(keys.LIMIT, limit, 25)
1515
q.add_param(keys.OFFSET, offset, 0)
1616
return q
1717

1818

1919
@query
20-
def streams(query, limit=25, offset=0, hls=Boolean.FALSE):
21-
q = Qry('search/streams')
22-
q.add_param(keys.QUERY, query)
23-
q.add_param(keys.LIMIT, limit, 25)
24-
q.add_param(keys.OFFSET, offset, 0)
25-
q.add_param(keys.HLS, hls, Boolean.FALSE)
20+
def games(search_query, live=Boolean.FALSE):
21+
q = Qry('search/games')
22+
q.add_param(keys.QUERY, search_query)
23+
q.add_param(keys.TYPE, 'suggest') # 'type' can currently only be suggest, so it is hardcoded
24+
25+
q.add_param(keys.LIVE, live, Boolean.FALSE)
2626
return q
2727

2828

29-
# 'type' can currently only be suggest, so it is hardcoded
3029
@query
31-
def games(query, live=Boolean.FALSE):
32-
q = Qry('search/games')
33-
q.add_param(keys.QUERY, query)
34-
q.add_param(keys.TYPE, 'suggest')
35-
q.add_param(keys.LIVE, live, Boolean.FALSE)
30+
def streams(search_query, limit=25, offset=0, hls=Boolean.FALSE):
31+
q = Qry('search/streams')
32+
q.add_param(keys.QUERY, search_query)
33+
q.add_param(keys.LIMIT, limit, 25)
34+
q.add_param(keys.OFFSET, offset, 0)
35+
q.add_param(keys.HLS, hls, Boolean.FALSE)
3636
return q

0 commit comments

Comments
 (0)