pytwitcherapi.models.Channel¶
-
class
pytwitcherapi.models.Channel(name, status, displayname, game, twitchid, views, followers, url, language, broadcaster_language, mature, logo, banner, video_banner, delay)[source]¶ Bases:
objectChannel on twitch.tv
-
__init__(name, status, displayname, game, twitchid, views, followers, url, language, broadcaster_language, mature, logo, banner, video_banner, delay)[source]¶ Initialize a new channel
Parameters: - name (
str) – The name of the channel - status (
str) – The status - displayname (
str) – The name displayed by the interface - game (
str) – the game of the channel - twitchid (
int) – the internal twitch id - views (
int) – the overall views - followers (
int) – the follower count - url (
str) – the url to the channel - language (
str) – the language of the channel - broadcaster_language (
str) – the language of the broadcaster - mature (
bool) – If true, the channel is only for mature audiences - logo (
str) – the link to the logos - banner (
str) – the link to the banner - video_banner (
str) – the link to the video banner - delay (
int) – stream delay
Raises: None
- name (
Methods
__init__(name, status, displayname, game, ...)Initialize a new channel wrap_get_channel(response)Wrap the response from getting a channel into an instance wrap_json(json)Create a Channel instance for the given json wrap_search(response)Wrap the response from a channel search into instances -
classmethod
wrap_search(response)[source]¶ Wrap the response from a channel search into instances and return them
Parameters: response ( requests.Response) – The response from searching a channelReturns: the new channel instances Return type: listofchannelRaises: None
-
classmethod
wrap_get_channel(response)[source]¶ Wrap the response from getting a channel into an instance and return it
Parameters: response ( requests.Response) – The response from getting a channelReturns: the new channel instance Return type: listofchannelRaises: None
-
classmethod
wrap_json(json)[source]¶ Create a Channel instance for the given json
Parameters: json ( dict) – the dict with the information of the channelReturns: the new channel instance Return type: ChannelRaises: None
-
name= None¶ The name of the channel
-
status= None¶ The current status message
-
displayname= None¶ The name displayed by the interface
-
game= None¶ The game of the channel
-
twitchid= None¶ THe internal twitch id
-
views= None¶ The overall views
-
followers= None¶ The follower count
-
url= None¶ the link to the channel page
-
language= None¶ Language of the channel
-
broadcaster_language= None¶ Language of the broadcaster
-
mature= None¶ If true, the channel is only for mature audiences
-
logo= None¶ the link to the logo
the link to the banner
the link to the video banner
-
delay= None¶ stream delay
-