API Reference
Client

Client API Reference

Client

constructor(options: Partial<ClientOptions>)

Creates a new client.

login(ltuid: string, ltoken: string): Required<Client>

Logins to the client.

addCookies(cookies: { ltuid: string; ltoken: string }[])

Adds cookies to the client.

isLogin(): boolean

Type guard to check if the client is logged in.

Routes

RouteDescription
dailyRewardThe daily reward route. DailyRewards
gameRecordCardThe game record card route. GameRecordCards
sprialAbyssThe spiral abyss route. SpiralAbyss
genshinActivityThe genshin activity route. GenshinActivity
charactersThe characters route. Characters
genshinUserThe genshin user route. GenshinUser
realTimeNotesThe real time notes route. RealTimeNotes
travelDiaryThe travel diary route. TravelDiary
redeemCodeThe redeem code route. RedeemCode
tcgThe tcg route. TCG

Client Options

OptionTypeDescription
languageLanguage?The language to use for the API. Defaults to Language.EnglishUS.
cookieManagerClientCookieManager?The cookie manager to use for the API. Defaults to ClientCookieManager.
debugboolean?Whether to enable debug mode. Defaults to false.
cacheOptionsCacheOptions?The cache options to use for the API. Defaults to {}.

Cache Options

OptionTypeDescription
maxAgenumber?The maximum age of the cache in seconds. Defaults to undefined.
maxSizenumber?The maximum size of the cache in bytes. Defaults to undefined.