Skip to content

Commit

Permalink
feat: Add light cone path
Browse files Browse the repository at this point in the history
  • Loading branch information
seriaati committed Jun 7, 2024
1 parent 74c3cb6 commit 3b214b9
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions hakushin/models/hsr/light_cone.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ class LightConeDetail(APIModel):
id: int = Field(alias="Id")
name: str = Field(alias="Name")
description: str = Field(alias="Desc")
path: HSRPath = Field(alias="BaseType")
rarity: Literal[3, 4, 5] = Field(alias="Rarity")
superimpose_info: SuperimposeInfo = Field(alias="Refinements")
ascension_stats: list[dict[str, Any]] = Field(alias="Stats")
Expand All @@ -41,9 +42,9 @@ def _convert_rarity(cls, value: str) -> Literal[3, 4, 5]:

@model_validator(mode="before")
def _extract_id(cls, values: dict[str, Any]) -> dict[str, Any]:
"""Use a hacky way to extract character ID from relic recommendation.
"""Use a hacky way to extract LC ID from relic recommendation.
I don't understand why the API doesn't have the character ID in the response.
I don't understand why the API doesn't have the LC ID in the response.
"""
values["Id"] = values["Stats"][0]["EquipmentID"]
return values
Expand Down

0 comments on commit 3b214b9

Please sign in to comment.