Skip to content

wall

Contains objects related to Roblox group walls.

WallPost

Bases: WallPostRelationship

Represents a post on a Roblox group wall.

Attributes:

Name Type Description
id int

The post ID.

poster Optional[Member]

The member who made the post.

body str

Body of the post.

created datetime

Creation date of the post.

updated datetime

Last updated date of the post.

Source code in roblox/wall.py
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
class WallPost(WallPostRelationship):
    """
    Represents a post on a Roblox group wall.

    Attributes:
        id: The post ID.
        poster: The member who made the post.
        body: Body of the post.
        created: Creation date of the post.
        updated: Last updated date of the post.
    """

    def __init__(self, client: Client, data: dict, group: BaseGroup):
        self._client: Client = client

        self.id: int = data["id"]

        super().__init__(
            client=self._client,
            post_id=self.id,
            group=group
        )

        self.poster: Optional[Member] = data["poster"] and Member(
            client=self._client,
            data=data["poster"],
            group=self.group
        ) or None
        self.body: str = data["body"]
        self.created: datetime = parse(data["created"])
        self.updated: datetime = parse(data["updated"])

    def __repr__(self):
        return f"<{self.__class__.__name__} id={self.id} body={self.body!r} group={self.group}>"

WallPostRelationship

Represents a Roblox wall post ID.

Attributes:

Name Type Description
id int

The post ID.

group BaseGroup

The group whose wall this post exists on.

Source code in roblox/wall.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
53
54
class WallPostRelationship:
    """
    Represents a Roblox wall post ID.

    Attributes:
        id: The post ID.
        group: The group whose wall this post exists on.
    """

    def __init__(self, client: Client, post_id: int, group: Union[BaseGroup, int]):
        """
        Arguments:
            client: The Client.
            post_id: The post ID.
        """

        self._client: Client = client
        self.id: int = post_id

        self.group: BaseGroup

        if isinstance(group, int):
            self.group = BaseGroup(client=self._client, group_id=group)
        else:
            self.group = group

    async def delete(self):
        """
        Deletes this wall post.
        """
        await self._client.requests.delete(
            url=self._client.url_generator.get_url("groups", f"v1/groups/{self.group.id}/wall/posts/{self.id}")
        )

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

__init__(client, post_id, group)

Parameters:

Name Type Description Default
client Client

The Client.

required
post_id int

The post ID.

required
Source code in roblox/wall.py
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
def __init__(self, client: Client, post_id: int, group: Union[BaseGroup, int]):
    """
    Arguments:
        client: The Client.
        post_id: The post ID.
    """

    self._client: Client = client
    self.id: int = post_id

    self.group: BaseGroup

    if isinstance(group, int):
        self.group = BaseGroup(client=self._client, group_id=group)
    else:
        self.group = group

delete() async

Deletes this wall post.

Source code in roblox/wall.py
45
46
47
48
49
50
51
async def delete(self):
    """
    Deletes this wall post.
    """
    await self._client.requests.delete(
        url=self._client.url_generator.get_url("groups", f"v1/groups/{self.group.id}/wall/posts/{self.id}")
    )