Skip to content

promotionchannels

roblox.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
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__}>"

__init__(self, data: dict) special

Source code in roblox/promotionchannels.py
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"]

__repr__(self) special

Source code in roblox/promotionchannels.py
def __repr__(self):
    return f"<{self.__class__.__name__}>"