Skip to content

robloxbadges

This module contains classes intended to parse and deal with data from Roblox badge endpoints.

RobloxBadge

Bases: 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
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
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, client: Client, data: dict):
        self._client: Client = client
        self.id: int = data["id"]
        super().__init__(client=self._client, roblox_badge_id=self.id)

        self.name: str = data["name"]
        self.description: str = data["description"]
        self.image_url: str = data["imageUrl"]