|
8 | 8 |
|
9 | 9 |
|
10 | 10 | @query |
11 | | -def channels(query, limit=25, offset=0): |
| 11 | +def channels(search_query, limit=25, offset=0): |
12 | 12 | q = Qry('search/channels') |
13 | | - q.add_param(keys.QUERY, query) |
| 13 | + q.add_param(keys.QUERY, search_query) |
14 | 14 | q.add_param(keys.LIMIT, limit, 25) |
15 | 15 | q.add_param(keys.OFFSET, offset, 0) |
16 | 16 | return q |
17 | 17 |
|
18 | 18 |
|
19 | 19 | @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) |
26 | 26 | return q |
27 | 27 |
|
28 | 28 |
|
29 | | -# 'type' can currently only be suggest, so it is hardcoded |
30 | 29 | @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) |
36 | 36 | return q |
0 commit comments