Skip to content

partialuniverse

roblox.partials.partialuniverse

This file contains partial objects related to Roblox universes.

ChatPartialUniverse (BaseUniverse)

Represents a partial universe in the context of a chat conversation.

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 int

The universe ID.

root_place BasePlace

The universe's root place.

Source code in roblox/partials/partialuniverse.py
class ChatPartialUniverse(BaseUniverse):
    """
    Represents a partial universe in the context of a chat conversation.

    Attributes:
        _data: The data we get back from the endpoint.
        _client: The client object, which is passed to all objects this client generates.
        id: The universe ID.
        root_place: The universe's root place.
    """

    def __init__(self, client: Client, data: dict):
        """
        Arguments:
            client: The ClientSharedObject.
            data: The raw data.
        """
        self._client: Client = client

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

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

        self.root_place: BasePlace = BasePlace(client=client, place_id=data["rootPlaceId"])

__init__(self, client: Client, data: dict) special

Parameters:

Name Type Description Default
client Client

The ClientSharedObject.

required
data dict

The raw data.

required
Source code in roblox/partials/partialuniverse.py
def __init__(self, client: Client, data: dict):
    """
    Arguments:
        client: The ClientSharedObject.
        data: The raw data.
    """
    self._client: Client = client

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

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

    self.root_place: BasePlace = BasePlace(client=client, place_id=data["rootPlaceId"])

PartialUniverse (BaseUniverse)

Represents partial universe information.

Attributes:. _client: The Client object, which is passed to all objects this Client generates. id: The universe ID. name: The name of the universe. root_place: The universe's root place.

Source code in roblox/partials/partialuniverse.py
class PartialUniverse(BaseUniverse):
    """
    Represents partial universe information.

    Attributes:.
        _client: The Client object, which is passed to all objects this Client generates.
        id: The universe ID.
        name: The name of the universe.
        root_place: The universe's root place.
    """

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

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

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

        self.name: str = data["name"]
        self.root_place: BasePlace = BasePlace(client=client, place_id=data["rootPlaceId"])

    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 raw data.

required
Source code in roblox/partials/partialuniverse.py
def __init__(self, client: Client, data: dict):
    """
    Arguments:
        client: The Client.
        data: The raw data.
    """
    self._client: Client = client

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

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

    self.name: str = data["name"]
    self.root_place: BasePlace = BasePlace(client=client, place_id=data["rootPlaceId"])

__repr__(self) special

Source code in roblox/partials/partialuniverse.py
def __repr__(self):
    return f"<{self.__class__.__name__} id={self.id} name={self.name!r}>"