pytwitcher.models.QtChannel

class pytwitcher.models.QtChannel(session, cache, name, status, displayname, game, twitchid, views, followers, url, language, broadcaster_language, mature, logo, banner, video_banner, delay)[source]

Bases: pytwitcherapi.models.Channel

A class for twitch.tv Channels.

Automatically loads pictures.

__init__(session, cache, name, status, displayname, game, twitchid, views, followers, url, language, broadcaster_language, mature, logo, banner, video_banner, delay)[source]

Initialize a new game

Parameters:
  • session (pytwitcher.session.QtTwitchSession) – The session that is used for Twitch API requests
  • cache (pytwitcher.cache.PixmapLoader) – The picture cache to use
  • 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

Methods

__init__(session, cache, name, status, ...) Initialize a new game
from_channel(session, cache, channel) Create a QtChannel from a pytwitcherapi.models.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

Attributes

banner Return the banner
logo Return the logo
video_banner Return the video_banner
classmethod from_channel(session, cache, channel)[source]

Create a QtChannel from a pytwitcherapi.models.Channel

Parameters:
Returns:

a QtChannel

Return type:

pytwitcher.models.QtChannel

Raises:

None

session = None

The session that is used for Twitch API requests

cache = None

The picture cache to use

Return the logo

Returns:the logo
Return type:QtGui.QPixmap
Raises:None
banner[source]

Return the banner

Returns:the banner
Return type:QtGui.QPixmap
Raises:None
video_banner[source]

Return the video_banner

Returns:the video_banner
Return type:QtGui.QPixmap
Raises:None