Skip to content

Lootbox

genjishimada_sdk.lootbox

LootboxKeyType = Literal['Classic', 'Winter'] module-attribute

LootboxKeyTypeResponse

Bases: Struct

Represents a lootbox key type.

Attributes:

Name Type Description
name str

Name of the key type.

name: str instance-attribute

RewardTypeResponse

Bases: Struct

Reward definition returned from lootbox operations.

Attributes:

Name Type Description
name str

Display name of the reward.

key_type LootboxKeyType

Lootbox key type associated with the reward.

rarity str

Rarity tier of the reward.

type str

Reward category (e.g., spray, skin).

duplicate bool

Whether the reward is a duplicate.

coin_amount int

Coin payout when receiving a duplicate reward.

url str | None

Asset URL associated with the reward.

__post_init__() -> None

Compute the asset URL for the reward.

coin_amount: int = 0 class-attribute instance-attribute

duplicate: bool = False class-attribute instance-attribute

key_type: LootboxKeyType instance-attribute

name: str instance-attribute

rarity: str instance-attribute

type: str instance-attribute

url: str | None = None class-attribute instance-attribute

UserLootboxKeyAmountResponse

Bases: Struct

Amount of lootbox keys a user currently holds.

Attributes:

Name Type Description
key_type LootboxKeyType

Type of key counted.

amount int

Number of keys available.

amount: int instance-attribute

key_type: LootboxKeyType instance-attribute

UserRewardResponse

Bases: Struct

Represents a reward granted to a user.

Attributes:

Name Type Description
user_id int

Identifier of the rewarded user.

earned_at datetime

Timestamp when the reward was earned.

name str

Name of the reward item.

type str

Reward category (e.g., mastery, spray).

rarity str

Rarity tier of the reward.

medal str | None

Medal tier when the reward relates to mastery.

url str | None

Asset URL associated with the reward.

__post_init__() -> None

Compute the asset URL for the reward.

earned_at: dt.datetime instance-attribute

medal: str | None instance-attribute

name: str instance-attribute

rarity: str instance-attribute

type: str instance-attribute

url: str | None = None class-attribute instance-attribute

user_id: int instance-attribute

__all__ = ('LootboxKeyType', 'LootboxKeyTypeResponse', 'RewardTypeResponse', 'UserLootboxKeyAmountResponse', 'UserRewardResponse') module-attribute