Skip to main content

Class: HonkaiStarRail

Class representing the Honkai Star Rail game.

Constructors​

constructor​

• new HonkaiStarRail(options)

Create a new instance of HonkaiStarRail.

Parameters​

NameTypeDescription
optionsIHsrOptionsThe options for the HonkaiStarRail instance.

Defined in​

src/client/hsr/hsr.ts:74

Properties​

• Readonly cookie: ICookie

The cookie used for authentication.

Defined in​

src/client/hsr/hsr.ts:42


daily​

• Readonly daily: DailyModule

The Daily module for the Honkai Star Rail game.

Defined in​

src/client/hsr/hsr.ts:24


lang​

• Private lang: LanguageEnum

The language of the Honkai Star Rail account.

Defined in​

src/client/hsr/hsr.ts:66


record​

• Readonly record: HSRRecordModule

The HSRRecordModule object provides an interface to interact with the user record feature in Honkai Star Rails.

Defined in​

src/client/hsr/hsr.ts:36


redeem​

• Readonly redeem: RedeemModule

The Redeem module for the Honkai Star Rail game.

Defined in​

src/client/hsr/hsr.ts:30


region​

• Readonly region: null | string

The region of the Honkai Star Rail account.

Defined in​

src/client/hsr/hsr.ts:60


request​

• Private request: HTTPRequest

The request object used to make HTTP requests.

Defined in​

src/client/hsr/hsr.ts:48


uid​

• Readonly uid: null | number

The UID of the Honkai Star Rail account.

Defined in​

src/client/hsr/hsr.ts:54

Methods​

dailyClaim​

▸ dailyClaim(): Promise<IDailyClaim>

Claim current reward

Alias

DailyModule.claim

Deprecated

Use through HonkaiStarRail.daily.claim() instead

Returns​

Promise<IDailyClaim>

Defined in​

src/client/hsr/hsr.ts:157


dailyInfo​

▸ dailyInfo(): Promise<IDailyInfo>

Retrieves daily information.

Alias

DailyModule.info

Deprecated

Use through HonkaiStarRail.daily.info() instead

Returns​

Promise<IDailyInfo>

Defined in​

src/client/hsr/hsr.ts:124


dailyReward​

▸ dailyReward(day?): Promise<IDailyReward>

Fetch reward from daily login based on day

Alias

DailyModule.reward

Deprecated

Use through HonkaiStarRail.daily.reward() instead

Parameters​

NameTypeDefault valueDescription
daynull | numbernullnumber | null

Returns​

Promise<IDailyReward>

Defined in​

src/client/hsr/hsr.ts:146


dailyRewards​

▸ dailyRewards(): Promise<IDailyRewards>

Alias

DailyModule.rewards

Deprecated

Use through HonkaiStarRail.daily.rewards() instead

Returns​

Promise<IDailyRewards>

Defined in​

src/client/hsr/hsr.ts:134


redeemCode​

▸ redeemCode(code): Promise<IRedeemCode>

Redeem Code

Alias

RedeemModule.claim

Deprecated

Use through HonkaiStarRail.redeem.claim() instead

Parameters​

NameTypeDescription
codestringstring

Returns​

Promise<IRedeemCode>

Defined in​

src/client/hsr/hsr.ts:169