badges
This module contains classes intended to parse and deal with data from Roblox badge information endpoints.
Badge
¶
Bases: BaseBadge
Represents a badge from the API.
Attributes:
Name | Type | Description |
---|---|---|
id |
int
|
The badge Id. |
name |
str
|
The name of the badge. |
description |
str
|
The badge description. |
display_name |
str
|
The localized name of the badge. |
display_description |
str
|
The localized badge description. |
enabled |
bool
|
Whether or not the badge is enabled. |
icon |
BaseAsset
|
The badge icon. |
display_icon |
BaseAsset
|
The localized badge icon. |
created |
datetime
|
When the badge was created. |
updated |
datetime
|
When the badge was updated. |
statistics |
BadgeStatistics
|
Badge award statistics. |
awarding_universe |
PartialUniverse
|
The universe the badge is being awarded from. |
Source code in roblox/badges.py
42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 |
|
__init__(client, data)
¶
Parameters:
Name | Type | Description | Default |
---|---|---|---|
client |
Client
|
The Client to be used when getting information on badges. |
required |
data |
dict
|
The data from the endpoint. |
required |
Source code in roblox/badges.py
61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 |
|
BadgeStatistics
¶
Attributes:
Name | Type | Description |
---|---|---|
past_day_awarded_count |
int
|
How many instances of this badge were awarded in the last day. |
awarded_count |
int
|
How many instances of this badge have been awarded. |
win_rate_percentage |
int
|
Percentage of players who have joined the parent universe have been awarded this badge. |
Source code in roblox/badges.py
21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 |
|
__init__(data)
¶
Parameters:
Name | Type | Description | Default |
---|---|---|---|
data |
dict
|
The raw input data. |
required |
Source code in roblox/badges.py
29 30 31 32 33 34 35 36 |
|