Module genshin.models.zzz.chronicle.gacha
ZZZ chronicle gacha info models.
Classes
class ZZZGachaBannerInfo (**data: Any)-
Expand source code
class ZZZGachaBannerInfo(APIModel): """ZZZ gacha banner info model.""" type: ZZZGachaEventType = Aliased("gacha_type") pity: int = Aliased("more_s_need_cnt") """Number of pulls needed until guaranteed S."""ZZZ gacha banner info model.
Create a new model by parsing and validating input data from keyword arguments.
Raises [
ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.selfis explicitly positional-only to allowselfas a field name.Ancestors
- APIModel
- pydantic.main.BaseModel
Class variables
var model_config : pydantic.config.ConfigDictvar pity : int-
Number of pulls needed until guaranteed S.
var type : ZZZGachaEventType
class ZZZGachaCurrencies (**data: Any)-
Expand source code
class ZZZGachaCurrencies(APIModel): """ZZZ gacha currency counts.""" monochrome: int polychrome: int encrypted_master_tape: int master_tape: int boopon: intZZZ gacha currency counts.
Create a new model by parsing and validating input data from keyword arguments.
Raises [
ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.selfis explicitly positional-only to allowselfas a field name.Ancestors
- APIModel
- pydantic.main.BaseModel
Class variables
var boopon : intvar encrypted_master_tape : intvar master_tape : intvar model_config : pydantic.config.ConfigDictvar monochrome : intvar polychrome : int
class ZZZGachaInfo (**data: Any)-
Expand source code
class ZZZGachaInfo(APIModel): """ZZZ gacha info model.""" currencies: ZZZGachaCurrencies banners: list[ZZZGachaBannerInfo] = Aliased("gacha_info_list") @pydantic.model_validator(mode="before") @classmethod def __convert_currencies(cls, data: dict[str, typing.Any]) -> dict[str, typing.Any]: currency_mapping = { "GACHA_TICKET_TYPE_RECHARGE_MONOCHROME": "monochrome", "GACHA_TICKET_TYPE_POLYCHROME": "polychrome", "GACHA_TICKET_TYPE_ENCRYPTED_MASTER_TAPE": "encrypted_master_tape", "GACHA_TICKET_TYPE_MASTER_TAPE": "master_tape", "GACHA_TICKET_TYPE_BOOPON": "boopon", } tickets = data.get("tickets", []) converted_currencies = { currency_mapping[ticket["ticket_type"]]: ticket["ticket_cnt"] for ticket in tickets if ticket["ticket_type"] in currency_mapping } data["currencies"] = converted_currencies return dataZZZ gacha info model.
Create a new model by parsing and validating input data from keyword arguments.
Raises [
ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.selfis explicitly positional-only to allowselfas a field name.Ancestors
- APIModel
- pydantic.main.BaseModel
Class variables
var currencies : ZZZGachaCurrenciesvar model_config : pydantic.config.ConfigDict