pytwitcherapi.models.User¶
-
class
pytwitcherapi.models.
User
(usertype, name, logo, twitchid, displayname, bio)[source]¶ Bases:
object
A user on twitch.tv
-
__init__
(usertype, name, logo, twitchid, displayname, bio)[source]¶ Initialize a new user
Parameters: Raises: None
Methods
__init__
(usertype, name, logo, twitchid, ...)Initialize a new user wrap_get_user
(response)Wrap the response from getting a user into an instance wrap_json
(json)Create a User instance for the given json -
classmethod
wrap_get_user
(response)[source]¶ Wrap the response from getting a user into an instance and return it
Parameters: response ( requests.Response
) – The response from getting a userReturns: the new user instance Return type: list
ofUser
Raises: None
-
classmethod
wrap_json
(json)[source]¶ Create a User instance for the given json
Parameters: json ( dict
| None) – the dict with the information of the userReturns: the new user instance Return type: User
Raises: None
-
usertype
= None¶ the user type on twitch, e.g.
"user"
-
name
= None¶ the username
-
logo
= None¶ link to the logo
-
twitchid
= None¶ internal twitch id
-
displayname
= None¶ name displayed by the interface
-
bio
= None¶ the user bio
-