Skip to content

promotionchannels

This module contains classes intended to parse and deal with data from Roblox promotion channel endpoints.

UserPromotionChannels

Represents a user's promotion channels.

Attributes:

Name Type Description
facebook Optional[str]

A link to the user's Facebook profile.

twitter Optional[str]

A Twitter handle.

youtube Optional[str]

A link to the user's YouTube channel.

twitch Optional[str]

A link to the user's Twitch channel.

Source code in roblox/promotionchannels.py
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
class UserPromotionChannels:
    """
    Represents a user's promotion channels.

    Attributes:
        facebook: A link to the user's Facebook profile.
        twitter: A Twitter handle.
        youtube: A link to the user's YouTube channel.
        twitch: A link to the user's Twitch channel.
    """

    def __init__(self, data: dict):
        self.facebook: Optional[str] = data["facebook"]
        self.twitter: Optional[str] = data["twitter"]
        self.youtube: Optional[str] = data["youtube"]
        self.twitch: Optional[str] = data["twitch"]
        self.guilded: Optional[str] = data["guilded"]

    def __repr__(self):
        return f"<{self.__class__.__name__}>"