robloxbadges
roblox.robloxbadges
¶
This module contains classes intended to parse and deal with data from Roblox badge endpoints.
RobloxBadge (BaseRobloxBadge)
¶
Represents a Roblox roblox badge.
Attributes:
Name | Type | Description |
---|---|---|
id |
int |
The badge's ID. |
name |
str |
The badge's name. |
description |
str |
The badge's description. |
image_url |
str |
A link to the badge's image. |
Source code in roblox/robloxbadges.py
class RobloxBadge(BaseRobloxBadge):
"""
Represents a Roblox roblox badge.
Attributes:
id: The badge's ID.
name: The badge's name.
description: The badge's description.
image_url: A link to the badge's image.
"""
def __init__(self, shared: ClientSharedObject, data: dict):
self._shared: ClientSharedObject = shared
self.id: int = data["id"]
super().__init__(shared=self._shared, roblox_badge_id=self.id)
self.name: str = data["name"]
self.description: str = data["description"]
self.image_url: str = data["imageUrl"]
def __repr__(self):
return f"<{self.__class__.__name__} name={self.name!r}>"
__init__(self, shared: ClientSharedObject, data: dict)
special
¶
Source code in roblox/robloxbadges.py
def __init__(self, shared: ClientSharedObject, data: dict):
self._shared: ClientSharedObject = shared
self.id: int = data["id"]
super().__init__(shared=self._shared, roblox_badge_id=self.id)
self.name: str = data["name"]
self.description: str = data["description"]
self.image_url: str = data["imageUrl"]
__repr__(self)
special
¶
Source code in roblox/robloxbadges.py
def __repr__(self):
return f"<{self.__class__.__name__} name={self.name!r}>"