Search¶
-
class
twitch.api.search.
Search
¶ This class provides methods for easy access to Twitch Search API.
-
classmethod
channels
(query, limit, offset)¶ Searches for channels based on a specified query parameter.
Parameters: - query (string) – Search query
- limit (int) – Maximum number of objects to return. Default 25. Maximum 100.
- offset (int) – Object offset for pagination of result. Default 0.
>>> from twitch import TwitchClient >>> client = TwitchClient('<my client id>') >>> channels = client.search.channels('lirik', limit=69, offset=420)
-
classmethod
games
(query, live)¶ Searches for games based on a specified query parameter.
Parameters: - query (string) – Search query
- live (boolean) – If True, returns only games that are live on at least one channel. Default: False.
-
classmethod
streams
(query, limit, offset, hls)¶ Searches for streams based on a specified query parameter.
Parameters: - query (string) – Search query
- limit (int) – Maximum number of objects to return. Default 25. Maximum 100.
- offset (int) – Object offset for pagination of result. Default 0.
- hls (boolean) – If True, returns only HLS streams; if False, only RTMP streams; if None, both HLS and RTMP streams.
-
classmethod