pytwitcherapi.models.Stream¶
-
class
pytwitcherapi.models.Stream(game, channel, twitchid, viewers, preview)[source]¶ Bases:
objectA stream on twitch.tv
-
__init__(game, channel, twitchid, viewers, preview)[source]¶ Initialize a new stream
Parameters: Raises: None
Methods
__init__(game, channel, twitchid, viewers, ...)Initialize a new stream wrap_get_stream(response)Wrap the response from getting a stream into an instance wrap_json(json)Create a Stream instance for the given json wrap_search(response)Wrap the response from a stream search into instances -
classmethod
wrap_search(response)[source]¶ Wrap the response from a stream search into instances and return them
Parameters: response ( requests.Response) – The response from searching a streamReturns: the new stream instances Return type: listofstreamRaises: None
-
classmethod
wrap_get_stream(response)[source]¶ Wrap the response from getting a stream into an instance and return it
Parameters: response ( requests.Response) – The response from getting a streamReturns: the new stream instance Return type: listofstreamRaises: None
-
classmethod
wrap_json(json)[source]¶ Create a Stream instance for the given json
Parameters: json ( dict| None) – the dict with the information of the streamReturns: the new stream instance Return type: Stream| NoneRaises: None
-
game= None¶ Name of the game that is beeing streamed
-
channel= None¶ The channel instance
-
twitchid= None¶ The internal twitch id
-
viewers= None¶ the viewer count
-
preview= None¶ A dict with preview picture links of the stream
-