Videos¶
-
class
twitch.api.videos.
Videos
¶ This class provides methods for easy access to Twitch Videos API.
-
classmethod
get_by_id
(video_id)¶ Gets a Video object based on specified video ID.
Parameters: video_id ('string) – Video ID
-
classmethod
get_top
(limit, offset, game, period, broadcast_type)¶ Gets a list of top videos.
Parameters: - limit (int) – Maximum number of objects to return. Default 10. Maximum 100.
- offset (int) – Object offset for pagination of result. Default 0.
- game (string) – Name of the game.
- period (string) – Window of time to search. Default PERIOD_WEEK.
- broadcast_type (string) – Type of broadcast returned. Default BROADCAST_TYPE_HIGHLIGHT.
-
classmethod
get_followed_videos
(limit, offset, broadcast_type)¶ Gets a list of followed videos based on a specified OAuth token.
Parameters: - limit (int) – Maximum number of objects to return. Default 10. Maximum 100.
- offset (int) – Object offset for pagination of result. Default 0.
- broadcast_type (string) – Type of broadcast returned. Default BROADCAST_TYPE_HIGHLIGHT.
>>> from twitch import TwitchClient >>> client = TwitchClient('<my client id>', '<my oauth token>') >>> videos = client.videos.get_followed_videos()
-
classmethod