Module genshin.models.starrail.chronicle.notes

Starrail chronicle notes.

Classes

class StarRailExpedition (**data: Any)

StarRail expedition.

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 StarRailExpedition(APIModel):
    """StarRail expedition."""

    avatars: list[str]
    status: typing.Literal["Ongoing", "Finished"]
    remaining_time: datetime.timedelta
    name: str
    item_url: str

    @property
    def finished(self) -> bool:
        """Whether the expedition has finished."""
        return self.remaining_time <= datetime.timedelta(0)

    @property
    def completion_time(self) -> datetime.datetime:
        return datetime.datetime.now().astimezone() + self.remaining_time

Ancestors

Class variables

var avatars : list[str]
var item_url : str
var model_computed_fields
var model_config : pydantic.config.ConfigDict
var model_fields
var name : str
var remaining_time : datetime.timedelta
var status : Literal['Ongoing', 'Finished']

Instance variables

prop completion_time : datetime.datetime
Expand source code
@property
def completion_time(self) -> datetime.datetime:
    return datetime.datetime.now().astimezone() + self.remaining_time
prop finished : bool

Whether the expedition has finished.

Expand source code
@property
def finished(self) -> bool:
    """Whether the expedition has finished."""
    return self.remaining_time <= datetime.timedelta(0)
class StarRailNote (**data: Any)

StarRail chronicle note.

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 StarRailNote(APIModel):
    """StarRail chronicle note."""

    current_stamina: int
    max_stamina: int
    stamina_recover_time: datetime.timedelta
    accepted_expedition_num: int = Aliased("accepted_epedition_num")
    total_expedition_num: int
    expeditions: typing.Sequence[StarRailExpedition]

    current_train_score: int
    """Current daily training activity"""
    max_train_score: int
    """Max daily training activity"""

    current_rogue_score: int
    """Current simulated universe weekly points"""
    max_rogue_score: int
    """Max simulated universe weekly points"""

    have_bonus_synchronicity_points: bool = Aliased("rogue_tourn_weekly_unlocked")
    """Whether the Divergent Universe is unlocked"""
    max_bonus_synchronicity_points: int = Aliased("rogue_tourn_weekly_max")
    """The max number of this week's Bonus Synchronicity Points"""
    current_bonus_synchronicity_points: int = Aliased("rogue_tourn_weekly_cur")
    """The current number of this week's Bonus Synchronicity Points"""

    remaining_weekly_discounts: int = Aliased("weekly_cocoon_cnt")
    """Remaining echo of war rewards"""
    max_weekly_discounts: int = Aliased("weekly_cocoon_limit")
    """Echo of war attempt limit"""

    current_reserve_stamina: int
    is_reserve_stamina_full: bool

    @property
    def stamina_recovery_time(self) -> datetime.datetime:
        """The time when stamina will be recovered."""
        return datetime.datetime.now().astimezone() + self.stamina_recover_time

Ancestors

Class variables

var accepted_expedition_num : int
var current_bonus_synchronicity_points : int

The current number of this week's Bonus Synchronicity Points

var current_reserve_stamina : int
var current_rogue_score : int

Current simulated universe weekly points

var current_stamina : int
var current_train_score : int

Current daily training activity

var expeditions : Sequence[StarRailExpedition]
var have_bonus_synchronicity_points : bool

Whether the Divergent Universe is unlocked

var is_reserve_stamina_full : bool
var max_bonus_synchronicity_points : int

The max number of this week's Bonus Synchronicity Points

var max_rogue_score : int

Max simulated universe weekly points

var max_stamina : int
var max_train_score : int

Max daily training activity

var max_weekly_discounts : int

Echo of war attempt limit

var model_computed_fields
var model_config : pydantic.config.ConfigDict
var model_fields
var remaining_weekly_discounts : int

Remaining echo of war rewards

var stamina_recover_time : datetime.timedelta
var total_expedition_num : int

Instance variables

prop stamina_recovery_time : datetime.datetime

The time when stamina will be recovered.

Expand source code
@property
def stamina_recovery_time(self) -> datetime.datetime:
    """The time when stamina will be recovered."""
    return datetime.datetime.now().astimezone() + self.stamina_recover_time