pytwitcherapi.models.Game¶
-
class
pytwitcherapi.models.Game(name, box, logo, twitchid, viewers=None, channels=None)[source]¶ Bases:
objectGame on twitch.tv
-
__init__(name, box, logo, twitchid, viewers=None, channels=None)[source]¶ Initialize a new game
Parameters: Raises: None
Methods
__init__(name, box, logo, twitchid[, ...])Initialize a new game wrap_json(json[, viewers, channels])Create a Game instance for the given json wrap_search(response)Wrap the response from a game search into instances wrap_topgames(response)Wrap the response from quering the top games into instances -
classmethod
wrap_search(response)[source]¶ Wrap the response from a game search into instances and return them
Parameters: response ( requests.Response) – The response from searching a gameReturns: the new game instances Return type: listofGameRaises: None
-
classmethod
wrap_topgames(response)[source]¶ Wrap the response from quering the top games into instances and return them
Parameters: response ( requests.Response) – The response for quering the top gamesReturns: the new game instances Return type: listofGameRaises: None
-
classmethod
wrap_json(json, viewers=None, channels=None)[source]¶ Create a Game instance for the given json
Parameters: Returns: the new game instance
Return type: Raises: None
-
name= None¶ The name of the game
-
box= None¶ Links for the box logos
-
logo= None¶ Links for the logos
-
twitchid= None¶ Id used by twitch
-
viewers= None¶ Current amount of viewers
-
channels= None¶ Current amount of channels
-