hoyoapi
Enumerations
- DiaryEnum
- DiaryMonthEnum
- ForgottenHallScheduleEnum
- GamesEnum
- GenshinRegion
- HonkaiRegion
- HsrRegion
- LanguageEnum
- SpiralAbyssScheduleEnum
Internal Classes
Main Classes
Module Classes
- DailyModule
- GenshinDiaryModule
- GenshinRecordModule
- GenshinTCGModule
- HIRecordModule
- HSRRecordModule
- RedeemModule
Interfaces
- Dict
- HTTPResponse
- HTTPServerResponse
- ICookie
- IDailyAwardItem
- IDailyClaim
- IDailyInfo
- IDailyReward
- IDailyRewards
- IGame
- IGameRecordCard
- IGamesList
- IGenshinCharacterAvatarFull
- IGenshinCharacterBase
- IGenshinCharacterConstellation
- IGenshinCharacterCostume
- IGenshinCharacterReliquaries
- IGenshinCharacterReliquariesAffix
- IGenshinCharacterReliquariesSet
- IGenshinCharacterRole
- IGenshinCharacterSummary
- IGenshinCharacterWeapon
- IGenshinCharacters
- IGenshinDailyNote
- IGenshinDiaryBase
- IGenshinDiaryDetail
- IGenshinDiaryHistory
- IGenshinDiaryInfo
- IGenshinOptions
- IGenshinRecord
- IGenshinRecordAvatar
- IGenshinRecordHome
- IGenshinRecordStat
- IGenshinRecordWorldExploration
- IGenshinSpiralAbyss
- IGenshinSpiralAbyssAvatar
- IGenshinSpiralAbyssBattle
- IGenshinSpiralAbyssFloor
- IGenshinSpiralAbyssLevel
- IGenshinSpiralAbyssRank
- IGenshinTCGAccount
- IGenshinTCGActionCost
- IGenshinTCGBasicInfo
- IGenshinTCGCard
- IGenshinTCGCardSkill
- IGenshinTCGCards
- IGenshinTCGChallangeBasic
- IGenshinTCGDeck
- IGenshinTCGDeckDetail
- IGenshinTCGDeckList
- IGenshinTCGMatch
- IGenshinTCGMatchs
- IGenshinTCGRecord
- IGenshinTCGSchedule
- IGenshinTCGScheduleBasic
- IGenshinTCGStat
- IGenshinTCGTime
- IGesnhinTCGReplay
- IHIAbyss
- IHIArena
- IHIAvatar
- IHIBoss
- IHICharacter
- IHICharacters
- IHIElysian
- IHILineup
- IHIPreference
- IHIRecord
- IHIReport
- IHIRole
- IHIStat
- IHIStigmata
- IHIWeapon
- IHSRCharacterBase
- IHSRCharacterFull
- IHSRCharacterSummary
- IHSREquipment
- IHSRExpedition
- IHSRForgottenHall
- IHSRForgottenHallTime
- IHSRNote
- IHSROrnament
- IHSRRank
- IHSRRecord
- IHSRRelic
- IHSRStats
- IHi3Options
- IHoyolabOptions
- IHsrOptions
- IRedeemCode
Type Aliases
GenshinRegionKeyType
Ƭ GenshinRegionKeyType: keyof typeof GenshinRegion
Defined in
src/client/gi/gi.interface.ts:23
HTTPBody
Ƭ HTTPBody: Dict
<number
| number
[] | string
| string
[] | null
>
Represents the type that can be used for the body of a request.
Defined in
src/request/request.inteface.ts:53
HTTPHeaders
Ƭ HTTPHeaders: Dict
<number
| string
| string
[]>
Represents the type that can be used for the headers of a request.
Defined in
src/request/request.inteface.ts:48
HTTPQueryParams
Ƭ HTTPQueryParams: Dict
<string
| number
| string
[] | null
>
Represents the type that can be used for the parameters of a request.
Defined in
src/request/request.inteface.ts:43
HonkaiRegionKeyType
Ƭ HonkaiRegionKeyType: keyof typeof HonkaiRegion
Defined in
src/client/hi/hi.interface.ts:15
HsrRegionKeyType
Ƭ HsrRegionKeyType: keyof typeof HsrRegion
Defined in
src/client/hsr/hsr.interface.ts:10
LangKeyType
Ƭ LangKeyType: keyof typeof LanguageEnum
Defined in
src/language/language.interface.ts:81
TCG_CARD_TYPE
Ƭ TCG_CARD_TYPE: "CardTypeCharacter"
| "CardTypeModify"
| "CardTypeUnknown"
Defined in
src/client/gi/tcg/tcg.interface.ts:1
TCG_COST_TYPE
Ƭ TCG_COST_TYPE: "CostTypeHydro"
| "CostTypeEnergy"
| "CostTypePyro"
| "CostTypeElectro"
| "CostTypeAnemo"
| "CostTypeCryo"
Defined in
src/client/gi/tcg/tcg.interface.ts:5
Variables
ACCOUNT_API
• Const
ACCOUNT_API: "https://api-account-os.hoyolab.com"
Defined in
BBS_API
• Const
BBS_API: "https://bbs-api-os.hoyolab.com"
Defined in
DEFAULT_REFERER
• Const
DEFAULT_REFERER: "https://hoyolab.com"
Defined in
GAME_RECORD_CARD_API
• Const
GAME_RECORD_CARD_API: string
Defined in
GENSHIN_DIARY_DETAIL_API
• Const
GENSHIN_DIARY_DETAIL_API: string
Defined in
GENSHIN_DIARY_LIST_API
• Const
GENSHIN_DIARY_LIST_API: string
Defined in
GENSHIN_RECORD_AVATAR_BASIC_INFO_API
• Const
GENSHIN_RECORD_AVATAR_BASIC_INFO_API: string
Defined in
GENSHIN_RECORD_CHARACTER_API
• Const
GENSHIN_RECORD_CHARACTER_API: string
Defined in
GENSHIN_RECORD_DAILY_NOTE_API
• Const
GENSHIN_RECORD_DAILY_NOTE_API: string
Defined in
GENSHIN_RECORD_INDEX_API
• Const
GENSHIN_RECORD_INDEX_API: string
Defined in
GENSHIN_RECORD_SPIRAL_ABYSS_API
• Const
GENSHIN_RECORD_SPIRAL_ABYSS_API: string
Defined in
GENSHIN_TCG_BASICINFO
• Const
GENSHIN_TCG_BASICINFO: string
Defined in
GENSHIN_TCG_CARDLIST
• Const
GENSHIN_TCG_CARDLIST: string
Defined in
GENSHIN_TCG_CHALLANGE_DECK
• Const
GENSHIN_TCG_CHALLANGE_DECK: string
Defined in
GENSHIN_TCG_CHALLANGE_RECORD
• Const
GENSHIN_TCG_CHALLANGE_RECORD: string
Defined in
GENSHIN_TCG_CHALLANGE_SCHEDULE
• Const
GENSHIN_TCG_CHALLANGE_SCHEDULE: string
Defined in
GENSHIN_TCG_MATCHLIST
• Const
GENSHIN_TCG_MATCHLIST: string
Defined in
HI_RECORD_ABYSS_API
• Const
HI_RECORD_ABYSS_API: string
Defined in
HI_RECORD_ARENA_API
• Const
HI_RECORD_ARENA_API: string
Defined in
HI_RECORD_CHARACTER_API
• Const
HI_RECORD_CHARACTER_API: string
Defined in
HI_RECORD_ELYSIAN_API
• Const
HI_RECORD_ELYSIAN_API: string
Defined in
HI_RECORD_INDEX_API
• Const
HI_RECORD_INDEX_API: string
Defined in
HK4E_API
• Const
HK4E_API: "https://sg-hk4e-api.hoyolab.com"
Defined in
HSR_RECORD_CHARACTER_API
• Const
HSR_RECORD_CHARACTER_API: string
Defined in
HSR_RECORD_FORGOTTEN_HALL_API
• Const
HSR_RECORD_FORGOTTEN_HALL_API: string
Defined in
HSR_RECORD_INDEX_API
• Const
HSR_RECORD_INDEX_API: string
Defined in
HSR_RECORD_NOTE_API
• Const
HSR_RECORD_NOTE_API: string
Defined in
PUBLIC_API
• Const
PUBLIC_API: "https://sg-public-api.hoyolab.com"
Defined in
REDEEM_CLAIM_API
• Const
REDEEM_CLAIM_API: string
Defined in
USER_GAMES_LIST
• Const
USER_GAMES_LIST: string
Defined in
Functions
DAILY_CLAIM_API
▸ DAILY_CLAIM_API(game
): string
Parameters
Name | Type |
---|---|
game | GamesEnum |
Returns
string
Defined in
DAILY_INFO_API
▸ DAILY_INFO_API(game
): string
Parameters
Name | Type |
---|---|
game | GamesEnum |
Returns
string
Defined in
DAILY_REWARD_API
▸ DAILY_REWARD_API(game
): string
Parameters
Name | Type |
---|---|
game | GamesEnum |
Returns
string
Defined in
getGenshinRegion
▸ getGenshinRegion(uid
): GenshinRegion
Get Genshin Impact region based on UID.
Throws
HoyoAPIError
when the UID is invalid.
Parameters
Name | Type | Description |
---|---|---|
uid | number | User ID. |
Returns
Region for the UID.
Defined in
getHi3Region
▸ getHi3Region(uid
): HonkaiRegion
Gets the Honkai region from a given UID.
Function
Throws
- If the UID is invalid.
Parameters
Name | Type | Description |
---|---|---|
uid | number | The UID to get the Honkai region for. |
Returns
- The Honkai region for the given UID.
Defined in
getHsrRegion
▸ getHsrRegion(uid
): HsrRegion
Get Server Region by UID
Parameters
Name | Type | Description |
---|---|---|
uid | number | number UID |