Skip to content

HoYoLAB Record Models

record

Base hoyolab APIModels.

Classes:

__all__ module-attribute

__all__ = ['FullHoyolabUser', 'Gender', 'GenshinAccount', 'HoyolabUserCertification', 'HoyolabUserLevel', 'PartialHoyolabUser', 'RecordCard', 'RecordCardData', 'RecordCardSetting', 'RecordCardSettingType', 'UserInfo']

FullHoyolabUser pydantic-model

Full hoyolab user.

Not actually full, but most of the data is useless.

Fields:

Validators:

bg_url pydantic-field

bg_url: Optional[str] = None

certification pydantic-field

certification: Optional[HoyolabUserCertification] = None

level pydantic-field

level: Optional[HoyolabUserLevel] = None

pc_bg_url pydantic-field

pc_bg_url: Optional[str] = None

pendant_url pydantic-field

pendant_url: str

Gender

Gender used on hoyolab.

Attributes:

female class-attribute instance-attribute

female = 2

male class-attribute instance-attribute

male = 1

other class-attribute instance-attribute

other = 3

unknown class-attribute instance-attribute

unknown = 0

GenshinAccount pydantic-model

Genshin account.

Fields:

game property

game: Game

game_biz pydantic-field

game_biz: str

level pydantic-field

level: int

nickname pydantic-field

nickname: str

server pydantic-field

server: str

server_name pydantic-field

server_name: str

uid pydantic-field

uid: int

GenshinRecordCard pydantic-model

Genshin record card.

Fields:

achievements property

achievements: int

characters property

characters: int

days_active property

days_active: int

game property

game: Game

spiral_abyss property

spiral_abyss: str

HonkaiRecordCard pydantic-model

Honkai record card.

Fields:

battlesuits property

battlesuits: int

days_active property

days_active: int

game property

game: Game

outfits property

outfits: int

stigmata property

stigmata: int

HoyolabUserCertification pydantic-model

Hoyolab user certification.

For example artist's type is 2.

Fields:

description pydantic-field

description: Optional[str] = None

icon_url pydantic-field

icon_url: Optional[str] = None

type pydantic-field

type: int

HoyolabUserLevel pydantic-model

Hoyolab user level.

Fields:

bg_color pydantic-field

bg_color: str

bg_image pydantic-field

bg_image: str

exp pydantic-field

exp: int

level pydantic-field

level: int

level_desc pydantic-field

level_desc: str

PartialHoyolabUser pydantic-model

Partial hoyolab user from a search result.

Fields:

Validators:

avatar_id pydantic-field

avatar_id: int

gender pydantic-field

gender: Gender

hoyolab_id pydantic-field

hoyolab_id: int

icon pydantic-field

icon: str

introduction pydantic-field

introduction: str

nickname pydantic-field

nickname: str

__remove_highlight pydantic-validator

__remove_highlight(v: str) -> str

RecordCard pydantic-model

Hoyolab record card.

Fields:

background_image pydantic-field

background_image: str

data pydantic-field

game_biz pydantic-field

game_biz: str = ''

game_id pydantic-field

game_id: int
game_logo: str

game_name pydantic-field

game_name: str

has_uid pydantic-field

has_uid: bool

public pydantic-field

public: bool

settings pydantic-field

uid pydantic-field

uid: int

url pydantic-field

url: str

__new__

__new__(**kwargs: Any) -> RecordCard

Create the appropriate record card.

as_dict

as_dict() -> dict[str, Any]

Return data as a dictionary.

RecordCardData pydantic-model

Data entry of a record card.

Fields:

name pydantic-field

name: str

value pydantic-field

value: str

RecordCardSetting pydantic-model

Privacy setting of a record card.

Fields:

description pydantic-field

description: str

id pydantic-field

id: int

public pydantic-field

public: bool

RecordCardSettingType

Privacy setting of a record card.

Attributes:

ENABLE_REAL_TIME_NOTES class-attribute instance-attribute

ENABLE_REAL_TIME_NOTES = 3

SHOW_CHARACTER_DETAILS class-attribute instance-attribute

SHOW_CHARACTER_DETAILS = 2

SHOW_CHRONICLE class-attribute instance-attribute

SHOW_CHRONICLE = 1

StarRailRecodeCard pydantic-model

Star rail record card.

Fields:

achievements property

achievements: int

characters property

characters: int

chests property

chests: int

days_active property

days_active: int

game property

game: Game

UserInfo pydantic-model

Chronicle user info.

Fields:

icon pydantic-field

icon: str

in_game_avatar pydantic-field

in_game_avatar: Optional[str] = None

level pydantic-field

level: int

nickname pydantic-field

nickname: str

server pydantic-field

server: str

ZZZRecordCard pydantic-model

ZZZ record card.

Fields:

agents_recruited property

agents_recruited: int

bangboo_obtained property

bangboo_obtained: int

days_active property

days_active: int

game property

game: Game

inter_knot_reputation property

inter_knot_reputation: str