Module genshin.models.hoyolab.mimo
Classes
class MimoGame (**data: Any)
-
Expand source code
class MimoGame(APIModel): """Mimo game.""" id: int = Aliased("game_id") version_id: int expire_point: bool point: int start_time: TZDateTime end_time: TZDateTime @property def game(self) -> typing.Union[typing.Literal["hoyolab"], types.Game, int]: if self.id == 5: return "hoyolab" if self.id == 6: return types.Game.STARRAIL if self.id == 8: return types.Game.ZZZ if self.id == 2: return types.Game.GENSHIN return self.id
Mimo game.
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.self
is explicitly positional-only to allowself
as a field name.Ancestors
- APIModel
- pydantic.main.BaseModel
Class variables
var end_time : datetime.datetime
var expire_point : bool
var id : int
var model_config : pydantic.config.ConfigDict
var point : int
var start_time : datetime.datetime
var version_id : int
Instance variables
prop game : Literal['hoyolab'] | Game | int
-
Expand source code
@property def game(self) -> typing.Union[typing.Literal["hoyolab"], types.Game, int]: if self.id == 5: return "hoyolab" if self.id == 6: return types.Game.STARRAIL if self.id == 8: return types.Game.ZZZ if self.id == 2: return types.Game.GENSHIN return self.id
class MimoLotteryInfo (**data: Any)
-
Expand source code
class MimoLotteryInfo(APIModel): """Mimo lottery info.""" current_point: int = Aliased("point") cost: int current_count: int = Aliased("count") limit_count: int rewards: typing.Sequence[MimoLotteryReward] = Aliased("award_list")
Mimo lottery info.
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.self
is explicitly positional-only to allowself
as a field name.Ancestors
- APIModel
- pydantic.main.BaseModel
Class variables
var cost : int
var current_count : int
var current_point : int
var limit_count : int
var model_config : pydantic.config.ConfigDict
var rewards : Sequence[MimoLotteryReward]
class MimoLotteryResult (**data: Any)
-
Expand source code
class MimoLotteryResult(APIModel): """Mimo lottery result.""" reward: PartialMimoLotteryReward reward_id: int = Aliased("award_id") game_id: int src_type: int code: str = Aliased("exchange_code") @pydantic.model_validator(mode="before") def __nest_reward(cls, v: typing.Dict[str, typing.Any]) -> typing.Dict[str, typing.Any]: v["reward"] = {"type": v.pop("type"), "icon": v.pop("icon"), "name": v.pop("name")} return v
Mimo lottery result.
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.self
is explicitly positional-only to allowself
as a field name.Ancestors
- APIModel
- pydantic.main.BaseModel
Class variables
var code : str
var game_id : int
var model_config : pydantic.config.ConfigDict
var reward : PartialMimoLotteryReward
var reward_id : int
var src_type : int
class MimoLotteryReward (**data: Any)
-
Expand source code
class MimoLotteryReward(PartialMimoLotteryReward): """Mimo lottery reward.""" expire_day: int
Mimo lottery reward.
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.self
is explicitly positional-only to allowself
as a field name.Ancestors
- PartialMimoLotteryReward
- APIModel
- pydantic.main.BaseModel
Class variables
var expire_day : int
var model_config : pydantic.config.ConfigDict
class MimoShopItem (**data: Any)
-
Expand source code
class MimoShopItem(APIModel): """Mimo shop item.""" id: int = Aliased("award_id") status: MimoShopItemStatus icon: str name: str cost: int stock: int user_count: int next_refresh_time: datetime.timedelta expire_day: int
Mimo shop item.
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.self
is explicitly positional-only to allowself
as a field name.Ancestors
- APIModel
- pydantic.main.BaseModel
Class variables
var cost : int
var expire_day : int
var icon : str
var id : int
var model_config : pydantic.config.ConfigDict
var name : str
var next_refresh_time : datetime.timedelta
var status : MimoShopItemStatus
var stock : int
var user_count : int
class MimoShopItemStatus (value, names=None, *, module=None, qualname=None, type=None, start=1)
-
Expand source code
class MimoShopItemStatus(enum.IntEnum): """Mimo shop item status.""" EXCHANGEABLE = 1 NOT_EXCHANGEABLE = 2 LIMIT_REACHED = 3 SOLD_OUT = 4
Mimo shop item status.
Ancestors
- enum.IntEnum
- builtins.int
- enum.Enum
Class variables
var EXCHANGEABLE
var LIMIT_REACHED
var NOT_EXCHANGEABLE
var SOLD_OUT
class MimoTask (**data: Any)
-
Expand source code
class MimoTask(APIModel): """Mimo task.""" id: int = Aliased("task_id") name: str = Aliased("task_name") time_type: int point: int progress: int total_progress: int status: MimoTaskStatus jump_url: str window_text: str type: typing.Union[int, MimoTaskType] = Aliased("task_type") af_url: str @pydantic.field_validator("type", mode="before") def __transform_task_type(cls, v: int) -> typing.Union[int, MimoTaskType]: try: return MimoTaskType(v) except ValueError: return v
Mimo task.
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.self
is explicitly positional-only to allowself
as a field name.Ancestors
- APIModel
- pydantic.main.BaseModel
Class variables
var af_url : str
var id : int
var jump_url : str
var model_config : pydantic.config.ConfigDict
var name : str
var point : int
var progress : int
var status : MimoTaskStatus
var time_type : int
var total_progress : int
var type : int | MimoTaskType
var window_text : str
class MimoTaskStatus (value, names=None, *, module=None, qualname=None, type=None, start=1)
-
Expand source code
class MimoTaskStatus(enum.IntEnum): """Mimo task status.""" FINISHED = 1 ONGOING = 2 CLAIMED = 3
Mimo task status.
Ancestors
- enum.IntEnum
- builtins.int
- enum.Enum
Class variables
var CLAIMED
var FINISHED
var ONGOING
class MimoTaskType (value, names=None, *, module=None, qualname=None, type=None, start=1)
-
Expand source code
class MimoTaskType(enum.IntEnum): """Mimo task type.""" FINISHABLE = 1 """e.g. Sunday Advanced Tutorial: What is the core Charge mechanic?""" VISIT = 2 """e.g. Visit the 【Honkai: Star Rail】 Interest Group on the day""" COMMENT = 3 """e.g. Participate in this week's creative interactions and leave your creations in the comments""" VIEW_TOPIC = 4 """e.g. View the "Roaming Through the Realm of Saurians" topic""" GI_LOGIN = 5 """e.g. Log into Genshin Impact today""" GI_GAME = 6 """e.g. Claim rewards from Ley Line Blossoms 2 times""" HSR_GAME = 8 """e.g. Complete Divergent Universe or Simulated Universe 1 time""" TRAILER = 10 """e.g. Myriad Celestia Trailer — "After the Sunset" | Honkai: Star Rail""" ZZZ_DAILY_LOGIN = 12 """e.g. Log into Zenless Zone Zero today""" ZZZ_CONSECUTIVE_LOGIN = 13 """e.g. Log into the game for 7 days""" ZZZ_GAME = 16 """e.g. Reach 400 Engagement today"""
Mimo task type.
Ancestors
- enum.IntEnum
- builtins.int
- enum.Enum
Class variables
var COMMENT
-
e.g. Participate in this week's creative interactions and leave your creations in the comments
var FINISHABLE
-
e.g. Sunday Advanced Tutorial: What is the core Charge mechanic?
var GI_GAME
-
e.g. Claim rewards from Ley Line Blossoms 2 times
var GI_LOGIN
-
e.g. Log into Genshin Impact today
var HSR_GAME
-
e.g. Complete Divergent Universe or Simulated Universe 1 time
var TRAILER
-
e.g. Myriad Celestia Trailer — "After the Sunset" | Honkai: Star Rail
var VIEW_TOPIC
-
e.g. View the "Roaming Through the Realm of Saurians" topic
var VISIT
-
e.g. Visit the 【Honkai: Star Rail】 Interest Group on the day
var ZZZ_CONSECUTIVE_LOGIN
-
e.g. Log into the game for 7 days
var ZZZ_DAILY_LOGIN
-
e.g. Log into Zenless Zone Zero today
var ZZZ_GAME
-
e.g. Reach 400 Engagement today
class PartialMimoLotteryReward (**data: Any)
-
Expand source code
class PartialMimoLotteryReward(APIModel): """Partial mimo lottery reward.""" type: int icon: str name: str
Partial mimo lottery reward.
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.self
is explicitly positional-only to allowself
as a field name.Ancestors
- APIModel
- pydantic.main.BaseModel
Subclasses
Class variables
var icon : str
var model_config : pydantic.config.ConfigDict
var name : str
var type : int