Module genshin.models.hoyolab.announcements

Public genshin announcement models.

Classes

class Announcement (**data: Any)

Announcement 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.

self is explicitly positional-only to allow self as a field name.

Expand source code
class Announcement(APIModel, Unique):
    """Announcement model."""

    id: int = Aliased("ann_id")
    title: str
    subtitle: str
    banner: str
    content: str
    img: typing.Optional[str] = None

    type_label: str
    type: int
    tag_icon: str

    login_alert: bool
    remind: bool
    alert: bool
    remind_ver: int
    extra_remind: bool

    start_time: datetime.datetime
    end_time: datetime.datetime
    tag_start_time: datetime.datetime
    tag_end_time: datetime.datetime

    lang: str  # type: ignore
    has_content: bool

Ancestors

Class variables

var alert : bool
var banner : str
var content : str
var end_time : datetime.datetime
var extra_remind : bool
var has_content : bool
var id : int
var img : Optional[str]
var lang : str
var login_alert : bool
var model_computed_fields
var model_config : pydantic.config.ConfigDict
var model_fields
var remind : bool
var remind_ver : int
var start_time : datetime.datetime
var subtitle : str
var tag_end_time : datetime.datetime
var tag_icon : str
var tag_start_time : datetime.datetime
var title : str
var type : int
var type_label : str