# Class: HonkaiStarRail
Class representing the Honkai Star Rail game.
# Table of contents
# Constructors
# Properties
# Methods
# Constructors
# constructor
• new HonkaiStarRail(options
)
Create a new instance of HonkaiStarRail.
# Parameters
Name | Type | Description |
---|---|---|
options | IHsrOptions | The options for the HonkaiStarRail instance. |
# Defined in
src/games/hsr/hsr.ts:73 (opens new window)
# Properties
# cookie
• Readonly
cookie: ICookie
The cookie used for authentication.
# Defined in
src/games/hsr/hsr.ts:39 (opens new window)
# daily
• Readonly
daily: DailyModule
The Daily module for the Honkai Star Rail game.
# Defined in
src/games/hsr/hsr.ts:25 (opens new window)
# lang
• lang: LanguageEnum
The language of the Honkai Star Rail account.
# Defined in
src/games/hsr/hsr.ts:64 (opens new window)
# redeem
• Readonly
redeem: RedeemModule
The Redeem module for the Honkai Star Rail game.
# Defined in
src/games/hsr/hsr.ts:32 (opens new window)
# region
• region: null
| string
The region of the Honkai Star Rail account.
# Defined in
src/games/hsr/hsr.ts:58 (opens new window)
# request
• Readonly
request: Request
The request object used to make HTTP requests.
# Defined in
src/games/hsr/hsr.ts:46 (opens new window)
# uid
• uid: null
| number
The UID of the Honkai Star Rail account.
# Defined in
src/games/hsr/hsr.ts:52 (opens new window)
# Methods
# dailyClaim
▸ dailyClaim(): Promise
<IDailyClaim
>
Claim current reward
Alias
Deprecated
Use through HonkaiStarRail.daily.claim() instead
# Returns
Promise
<IDailyClaim
>
# Defined in
src/games/hsr/hsr.ts:165 (opens new window)
# dailyInfo
▸ dailyInfo(): Promise
<IDailyInfo
>
Retrieves daily information.
Alias
Deprecated
Use through HonkaiStarRail.daily.info() instead
# Returns
Promise
<IDailyInfo
>
# Defined in
src/games/hsr/hsr.ts:135 (opens new window)
# dailyReward
▸ dailyReward(day?
): Promise
<IDailyReward
>
Fetch reward from daily login based on day
Alias
Deprecated
Use through HonkaiStarRail.daily.reward() instead
# Parameters
Name | Type | Default value | Description |
---|---|---|---|
day | null | number | null | number | null |
# Returns
Promise
<IDailyReward
>
# Defined in
src/games/hsr/hsr.ts:155 (opens new window)
# dailyRewards
▸ dailyRewards(): Promise
<IDailyRewards
>
Alias
Deprecated
Use through HonkaiStarRail.daily.rewards() instead
# Returns
Promise
<IDailyRewards
>
# Defined in
src/games/hsr/hsr.ts:144 (opens new window)
# redeemCode
▸ redeemCode(code
): Promise
<IRedeemCode
>
Redeem Code
Alias
Deprecated
Use through HonkaiStarRail.redeem.claim() instead
# Parameters
Name | Type | Description |
---|---|---|
code | string | string |
# Returns
Promise
<IRedeemCode
>
# Defined in
src/games/hsr/hsr.ts:176 (opens new window)
# create
▸ Static
create(options
): Promise
<HonkaiStarRail
>
Create a new instance of HonkaiStarRail using a Hoyolab account.
If uid
is not provided in the options
, the account with the highest level will be used.
Static
# Parameters
Name | Type | Description |
---|---|---|
options | IHsrOptions | The options for the HonkaiStarRail instance. |
# Returns
Promise
<HonkaiStarRail
>
- A promise that resolves with a new HonkaiStarRail instance.