Skip to content

shout

Contains the Shout object, which represents a group's shout.

Shout

Represents a Group Shout.

Attributes:

Name Type Description
body str

The text of the shout.

created datetime

When the shout was created.

updated datetime

When the shout was updated.

poster PartialUser

Who posted the shout.

Source code in roblox/shout.py
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
class Shout:
    """
    Represents a Group Shout.

    Attributes:
        body: The text of the shout.
        created: When the shout was created.
        updated: When the shout was updated.
        poster: Who posted the shout.
    """

    def __init__(
            self,
            client: Client,
            data: dict
    ):
        """
        Arguments:
            client: Client object.
            data: The data from the request.
        """
        self._client: Client = client

        self.body: str = data["body"]
        self.created: datetime = parse(data["created"])
        self.updated: datetime = parse(data["updated"])
        self.poster: PartialUser = PartialUser(
            client=self._client,
            data=data["poster"]
        )

    def __repr__(self):
        return f"<{self.__class__.__name__} created={self.created} updated={self.updated} body={self.body!r} " \
               f"poster={self.poster!r}>"

__init__(client, data)

Parameters:

Name Type Description Default
client Client

Client object.

required
data dict

The data from the request.

required
Source code in roblox/shout.py
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
def __init__(
        self,
        client: Client,
        data: dict
):
    """
    Arguments:
        client: Client object.
        data: The data from the request.
    """
    self._client: Client = client

    self.body: str = data["body"]
    self.created: datetime = parse(data["created"])
    self.updated: datetime = parse(data["updated"])
    self.poster: PartialUser = PartialUser(
        client=self._client,
        data=data["poster"]
    )