Skip to content

partialgroup

This file contains partial objects related to Roblox groups.

AssetPartialGroup

Bases: BaseGroup

Represents a partial group in the context of a Roblox asset. Intended to parse the data[0]["creator"] data from https://games.roblox.com/v1/games.

Attributes:

Name Type Description
_client Client

The Client object, which is passed to all objects this Client generates.

id int

The group's name.

creator BaseUser

The group's owner.

name str

The group's name.

has_verified_badge bool

If the group has a verified badge.

Source code in roblox/partials/partialgroup.py
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
class AssetPartialGroup(BaseGroup):
    """
    Represents a partial group in the context of a Roblox asset.
    Intended to parse the `data[0]["creator"]` data from https://games.roblox.com/v1/games.

    Attributes:
        _client: The Client object, which is passed to all objects this Client generates.
        id: The group's name.
        creator: The group's owner.
        name: The group's name.
        has_verified_badge: If the group has a verified badge.
    """

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

        self.creator: BaseUser = BaseUser(client=client, user_id=data["Id"])
        self.id: int = data["CreatorTargetId"]
        self.name: str = data["Name"]
        self.has_verified_badge: bool = data["HasVerifiedBadge"]

        super().__init__(client, self.id)

__init__(client, data)

Parameters:

Name Type Description Default
client Client

The Client.

required
data dict

The data from the endpoint.

required
Source code in roblox/partials/partialgroup.py
29
30
31
32
33
34
35
36
37
38
39
40
41
42
def __init__(self, client: Client, data: dict):
    """
    Arguments:
        client: The Client.
        data: The data from the endpoint.
    """
    self._client: Client = client

    self.creator: BaseUser = BaseUser(client=client, user_id=data["Id"])
    self.id: int = data["CreatorTargetId"]
    self.name: str = data["Name"]
    self.has_verified_badge: bool = data["HasVerifiedBadge"]

    super().__init__(client, self.id)

UniversePartialGroup

Bases: BaseGroup

Represents a partial group in the context of a Roblox universe.

Attributes:

Name Type Description
_data

The data we get back from the endpoint.

_client Client

The client object, which is passed to all objects this client generates.

id

Id of the group

name str

Name of the group

has_verified_badge bool

If the group has a verified badge.

Source code in roblox/partials/partialgroup.py
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
class UniversePartialGroup(BaseGroup):
    """
    Represents a partial group in the context of a Roblox universe.

    Attributes:
        _data: The data we get back from the endpoint.
        _client: The client object, which is passed to all objects this client generates.
        id: Id of the group
        name: Name of the group
        has_verified_badge: If the group has a verified badge.
    """

    def __init__(self, client: Client, data: dict):
        """
        Arguments:
            client: The ClientSharedObject.
            data: The data from the endpoint.
        """
        self._client: Client = client
        self.id = data["id"]
        self.name: str = data["name"]
        self.has_verified_badge: bool = data["hasVerifiedBadge"]

        super().__init__(client, self.id)

__init__(client, data)

Parameters:

Name Type Description Default
client Client

The ClientSharedObject.

required
data dict

The data from the endpoint.

required
Source code in roblox/partials/partialgroup.py
57
58
59
60
61
62
63
64
65
66
67
68
def __init__(self, client: Client, data: dict):
    """
    Arguments:
        client: The ClientSharedObject.
        data: The data from the endpoint.
    """
    self._client: Client = client
    self.id = data["id"]
    self.name: str = data["name"]
    self.has_verified_badge: bool = data["hasVerifiedBadge"]

    super().__init__(client, self.id)