Class: GenshinImpact
The Genshin
class provides an interface to interact with Genshin Impact-related features on the Mihoyo website.
It contains references to various modules such as DailyModule
, RedeemModule
, GenshinRecordModule
, and GenshinDiaryModule
which allow you to perform various operations related to these features.
Constructors
constructor
• new GenshinImpact(options
)
Constructs a new Genshin
object.
Parameters
Name | Type | Description |
---|---|---|
options | IGenshinOptions | The options object used to configure the object. |
Defined in
Properties
cookie
• Readonly
cookie: ICookie
The cookie object to be used in requests.
Defined in
daily
• Readonly
daily: DailyModule
The DailyModule
object provides an interface to interact with the daily check-in feature in Genshin Impact.
Defined in
diary
• Readonly
diary: GenshinDiaryModule
The GenshinDiaryModule
object provides an interface to interact with the user diary feature in Genshin Impact.
Defined in
lang
• Private
lang: LanguageEnum
The language to be used in requests.
Defined in
record
• Readonly
record: GenshinRecordModule
The GenshinRecordModule
object provides an interface to interact with the user record feature in Genshin Impact.
Defined in
redeem
• Readonly
redeem: RedeemModule
The RedeemModule
object provides an interface to interact with the code redemption feature in Genshin Impact.
Defined in
region
• Readonly
region: null
| string
The region of the user, if available.
Defined in
request
• Private
request: HTTPRequest
The Request
object used to make requests.
Defined in
tcg
• Readonly
tcg: GenshinTCGModule
The GenshinTCGModule
object provides an interface to interact with the user diary feature in Genshin Impact.
Defined in
uid
• Readonly
uid: null
| number
The UID of the user, if available.
Defined in
Methods
characters
▸ characters(): Promise
<IGenshinCharacters
>
Retrieves the Genshin characters of the user.
Alias
Deprecated
Use through Genshin.record.characters() instead
Returns
Promise
<IGenshinCharacters
>
Defined in
charactersSummary
▸ charactersSummary(characterIds
): Promise
<IGenshinCharacterSummary
>
Returns the summary information of Genshin Impact game characters
Alias
Genshin.record.charactersSummary()
Deprecated
Use through Genshin.record.charactersSummary() instead
Parameters
Name | Type | Description |
---|---|---|
characterIds | number [] | number[] Characters ID |
Returns
Promise
<IGenshinCharacterSummary
>
Defined in
dailyClaim
▸ dailyClaim(): Promise
<IDailyClaim
>
Claim current reward
Alias
Deprecated
Use through Genshin.daily.claim() instead
Returns
Promise
<IDailyClaim
>
Defined in
dailyInfo
▸ dailyInfo(): Promise
<IDailyInfo
>
Retrieves daily information.
Alias
Deprecated
Use through Genshin.daily.info() instead
Returns
Promise
<IDailyInfo
>
Defined in
dailyNote
▸ dailyNote(): Promise
<IGenshinDailyNote
>
Retrieve the daily note information for a Genshin Impact user.
Alias
Deprecated
Use through Genshin.record.dailyNote() instead
Returns
Promise
<IGenshinDailyNote
>
Defined in
dailyReward
▸ dailyReward(day?
): Promise
<IDailyReward
>
Get the daily reward for a specific day or the current day
Alias
Deprecated
Use through Genshin.daily.reward() instead
Parameters
Name | Type | Default value | Description |
---|---|---|---|
day | null | number | null | number | null |
Returns
Promise
<IDailyReward
>
Defined in
dailyRewards
▸ dailyRewards(): Promise
<IDailyRewards
>
Retrieve daily rewards information.
Alias
Deprecated
Use through Genshin.daily.rewards() instead
Returns
Promise
<IDailyRewards
>
Defined in
diaryDetail
▸ diaryDetail(type
, month?
): Promise
<IGenshinDiaryDetail
>
Returns the diary details of a given type and month for a user
Alias
Deprecated
Use through Genshin.diary.detail() instead
Parameters
Name | Type | Default value | Description |
---|---|---|---|
type | DiaryEnum | undefined | DiaryEnum |
month | DiaryMonthEnum | DiaryMonthEnum.CURRENT | DiaryMonthEnum |
Returns
Promise
<IGenshinDiaryDetail
>
Defined in
diaryList
▸ diaryList(month?
): Promise
<IGenshinDiaryInfo
>
Returns the diary information of a given month for a user
Alias
Deprecated
Use through Genshin.diary.list() instead
Parameters
Name | Type | Default value |
---|---|---|
month | DiaryMonthEnum | DiaryMonthEnum.CURRENT |
Returns
Promise
<IGenshinDiaryInfo
>
Defined in
records
▸ records(): Promise
<IGenshinRecord
>
Get user's Genshin Impact record
Alias
Deprecated
Use through Genshin.record.records() instead
Returns
Promise
<IGenshinRecord
>
Defined in
redeemCode
▸ redeemCode(code
): Promise
<IRedeemCode
>
Redeems a code for a specific account.
Alias
Deprecated
Use through Genshin.redeem.claim() instead
Parameters
Name | Type | Description |
---|---|---|
code | string | string |
Returns
Promise
<IRedeemCode
>
Defined in
spiralAbyss
▸ spiralAbyss(scheduleType?
): Promise
<IGenshinSpiralAbyss
>
Retrieves information about the player's performance in the Spiral Abyss.
Alias
Deprecated
Use through Genshin.record.spiralAbyss() instead
Parameters
Name | Type | Default value | Description |
---|---|---|---|
scheduleType | SpiralAbyssScheduleEnum | SpiralAbyssScheduleEnum.CURRENT | SpiralAbyssScheduleEnum |
Returns
Promise
<IGenshinSpiralAbyss
>