pytwitcher.models.QtUser¶
- class pytwitcher.models.QtUser(session, cache, usertype, name, logo, twitchid, displayname, bio)[source]¶
Bases: pytwitcherapi.models.User
A class for twitch.tv User.
Automatically loads pictures.
- __init__(session, cache, usertype, name, logo, twitchid, displayname, bio)[source]¶
Initialize a new user
Parameters: - session (pytwitcher.session.QtTwitchSession) – The session that is used for Twitch API requests
- cache (pytwitcher.cache.PixmapLoader) – The picture cache to use
- usertype (str) – the user type on twitch, e.g. "user"
- name (str) – the username
- logo (str) – the link to the logo
- twitchid (int) – the internal twitch id
- displayname (str) – the name diplayed by the interface
- bio (str) – the user bio
Raises: None
Methods
__init__(session, cache, usertype, name, ...) Initialize a new user from_user(session, cache, user) Create a QtUser from a pytwitcherapi.models.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 Attributes
logo Return the logo - classmethod from_user(session, cache, user)[source]¶
Create a QtUser from a pytwitcherapi.models.User
Parameters: - session (pytwitcher.session.QtTwitchSession) – The session that is used for Twitch API requests
- cache (pytwitcher.cache.PixmapLoader) – The picture cache to use
- name – The name of the user
- user (pytwitcherapi.models.User) – the user to wrap
Returns: a QtUser
Return type: Raises: None