Creates a new instance of Hoyolab
.
The options to initialize the Hoyolab
instance.
If ltuidV2
or ltokenV2
keys are missing in the ICookie
object.
Because CookieTokenV2 has a short expiration time and cannot be refreshed so far. It is evident that every few days, when logging in, it always requests authentication first. Therefore, this method that uses CookieTokenV2 is not suitable if filled statically.
Readonly
cookieThe parsed ICookie object used to authenticate requests.
The language used for API responses.
Readonly
requestThe underlying Request
object used to make HTTP requests.
Get the account of a specific game from the games list.
The game that the account belongs to.
The game account.
If there is no game account on this hoyolab account.
Because CookieTokenV2 has a short expiration time and cannot be refreshed so far. It is evident that every few days, when logging in, it always requests authentication first. Therefore, this method that uses CookieTokenV2 is not suitable if filled statically.
Retrieves the game record card
The game account.
Get the list of games on this Hoyolab account.
Optional
game: GamesEnumThe optional game for which to retrieve accounts.
The list of games on this Hoyolab account.
Thrown if there are no game accounts on this Hoyolab account.
Because CookieTokenV2 has a short expiration time and cannot be refreshed so far. It is evident that every few days, when logging in, it always requests authentication first. Therefore, this method that uses CookieTokenV2 is not suitable if filled statically.
Represents the Hoyolab API client.