partialgroup
roblox.partials.partialgroup
¶
This file contains partial objects related to Roblox groups.
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:
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. |
Source code in roblox/partials/partialgroup.py
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.
"""
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"]
super().__init__(client, self.id)
def __repr__(self):
return f"<{self.__class__.__name__} id={self.id} name={self.name!r}>"
__init__(self, client: Client, data: dict)
special
¶
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
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"]
super().__init__(client, self.id)
__repr__(self)
special
¶
Source code in roblox/partials/partialgroup.py
def __repr__(self):
return f"<{self.__class__.__name__} id={self.id} name={self.name!r}>"
UniversePartialGroup (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 |
Source code in roblox/partials/partialgroup.py
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
"""
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"]
super().__init__(client, self.id)
def __repr__(self):
return f"<{self.__class__.__name__} id={self.id} name={self.name!r}>"
__init__(self, client: Client, data: dict)
special
¶
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
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"]
super().__init__(client, self.id)
__repr__(self)
special
¶
Source code in roblox/partials/partialgroup.py
def __repr__(self):
return f"<{self.__class__.__name__} id={self.id} name={self.name!r}>"