Class: HonkaiImpact
Class representing the Honkai Impact 3rd game.
Constructors
constructor
• new HonkaiImpact(options
)
Create a new instance of HonkaiImpact.
Parameters
Name | Type | Description |
---|---|---|
options | IHi3Options | The options object used to configure the object. |
Defined in
Properties
_account
• Private
_account: null
| IGame
= null
HoyYolab account object
Defined in
cookie
• Readonly
cookie: ICookie
The cookie used for authentication.
Defined in
daily
• Readonly
daily: DailyModule
The Daily module for the Honkai Impact 3rd game.
Defined in
lang
• Private
lang: LanguageEnum
The language of the Honkai Impact 3rd account.
Defined in
record
• Readonly
record: HIRecordModule
The HIRecordModule
object provides an interface to interact with the user record feature in Honkai Star Rails.
Defined in
redeem
• Readonly
redeem: RedeemModule
The Redeem module for the Honkai Impact 3rd game.
Defined in
region
• Readonly
region: null
| string
The region of the Honkai Impact 3rd account.
Defined in
request
• Private
request: HTTPRequest
The request object used to make HTTP requests.
Defined in
uid
• Readonly
uid: null
| number
The UID of the Honkai Impact 3rd account.
Defined in
Accessors
account
• get
account(): null
| IGame
Getter for the account property.
Returns
null
| IGame
The current value of the account property.
Defined in
• set
account(game
): void
Setter for the account property. Prevents from changing the value once set
Parameters
Name | Type | Description |
---|---|---|
game | null | IGame | The game object to set as the account. |
Returns
void
Defined in
Methods
dailyClaim
▸ dailyClaim(): Promise
<IDailyClaim
>
Claim current reward
Alias
Deprecated
Use through HonkaiImpact.daily.claim() instead
Returns
Promise
<IDailyClaim
>
Defined in
dailyInfo
▸ dailyInfo(): Promise
<IDailyInfo
>
Retrieves daily information.
Alias
Deprecated
Use through HonkaiImpact.daily.info() instead
Returns
Promise
<IDailyInfo
>
Defined in
dailyReward
▸ dailyReward(day?
): Promise
<IDailyReward
>
Fetch reward from daily login based on day
Alias
Deprecated
Use through HonkaiImpact.daily.reward() instead
Parameters
Name | Type | Default value | Description |
---|---|---|---|
day | null | number | null | number | null |
Returns
Promise
<IDailyReward
>
Defined in
dailyRewards
▸ dailyRewards(): Promise
<IDailyRewards
>
Alias
Deprecated
Use through HonkaiImpact.daily.rewards() instead
Returns
Promise
<IDailyRewards
>
Defined in
redeemCode
▸ redeemCode(code
): Promise
<IRedeemCode
>
Redeem Code
Alias
Deprecated
Use through HonkaiImpact.redeem.claim() instead
Parameters
Name | Type | Description |
---|---|---|
code | string | string |
Returns
Promise
<IRedeemCode
>
Defined in
create
▸ Static
create(options
): Promise
<HonkaiImpact
>
Create a new instance of HonkaiImpact using a Hoyolab account.
If uid
is not provided in the options
, the account with the highest level will be used.
Throws
Error Wnen the CookieTokenV2 is not set.
Remarks
If an object is instantiated from this method but options.cookie.cookieTokenV2 is not set, it will throw an error. This method will access an Endpoint that contains a list of game accounts, which requires the cookieTokenV2 option.
Parameters
Name | Type | Description |
---|---|---|
options | IHi3Options | The options object used to configure the object. |
Returns
Promise
<HonkaiImpact
>
- A promise that resolves with a new HonkaiImpact instance.