Skip to main content

hoyoapi

Enumerations

Internal Classes

Main Classes

Module Classes

Interfaces

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

src/routes/routes.ts:7


BBS_API

Const BBS_API: "https://bbs-api-os.hoyolab.com"

Defined in

src/routes/routes.ts:6


DEFAULT_REFERER

Const DEFAULT_REFERER: "https://hoyolab.com"

Defined in

src/routes/routes.ts:10


GAME_RECORD_CARD_API

Const GAME_RECORD_CARD_API: string

Defined in

src/routes/routes.ts:14


GENSHIN_DIARY_DETAIL_API

Const GENSHIN_DIARY_DETAIL_API: string

Defined in

src/routes/routes.ts:84


GENSHIN_DIARY_LIST_API

Const GENSHIN_DIARY_LIST_API: string

Defined in

src/routes/routes.ts:83


GENSHIN_RECORD_AVATAR_BASIC_INFO_API

Const GENSHIN_RECORD_AVATAR_BASIC_INFO_API: string

Defined in

src/routes/routes.ts:78


GENSHIN_RECORD_CHARACTER_API

Const GENSHIN_RECORD_CHARACTER_API: string

Defined in

src/routes/routes.ts:77


GENSHIN_RECORD_DAILY_NOTE_API

Const GENSHIN_RECORD_DAILY_NOTE_API: string

Defined in

src/routes/routes.ts:80


GENSHIN_RECORD_INDEX_API

Const GENSHIN_RECORD_INDEX_API: string

Defined in

src/routes/routes.ts:76


GENSHIN_RECORD_SPIRAL_ABYSS_API

Const GENSHIN_RECORD_SPIRAL_ABYSS_API: string

Defined in

src/routes/routes.ts:79


GENSHIN_TCG_BASICINFO

Const GENSHIN_TCG_BASICINFO: string

Defined in

src/routes/routes.ts:87


GENSHIN_TCG_CARDLIST

Const GENSHIN_TCG_CARDLIST: string

Defined in

src/routes/routes.ts:88


GENSHIN_TCG_CHALLANGE_DECK

Const GENSHIN_TCG_CHALLANGE_DECK: string

Defined in

src/routes/routes.ts:92


GENSHIN_TCG_CHALLANGE_RECORD

Const GENSHIN_TCG_CHALLANGE_RECORD: string

Defined in

src/routes/routes.ts:91


GENSHIN_TCG_CHALLANGE_SCHEDULE

Const GENSHIN_TCG_CHALLANGE_SCHEDULE: string

Defined in

src/routes/routes.ts:90


GENSHIN_TCG_MATCHLIST

Const GENSHIN_TCG_MATCHLIST: string

Defined in

src/routes/routes.ts:89


HI_RECORD_ABYSS_API

Const HI_RECORD_ABYSS_API: string

Defined in

src/routes/routes.ts:103


HI_RECORD_ARENA_API

Const HI_RECORD_ARENA_API: string

Defined in

src/routes/routes.ts:105


HI_RECORD_CHARACTER_API

Const HI_RECORD_CHARACTER_API: string

Defined in

src/routes/routes.ts:102


HI_RECORD_ELYSIAN_API

Const HI_RECORD_ELYSIAN_API: string

Defined in

src/routes/routes.ts:104


HI_RECORD_INDEX_API

Const HI_RECORD_INDEX_API: string

Defined in

src/routes/routes.ts:101


HK4E_API

Const HK4E_API: "https://sg-hk4e-api.hoyolab.com"

Defined in

src/routes/routes.ts:8


HSR_RECORD_CHARACTER_API

Const HSR_RECORD_CHARACTER_API: string

Defined in

src/routes/routes.ts:95


HSR_RECORD_FORGOTTEN_HALL_API

Const HSR_RECORD_FORGOTTEN_HALL_API: string

Defined in

src/routes/routes.ts:98


HSR_RECORD_INDEX_API

Const HSR_RECORD_INDEX_API: string

Defined in

src/routes/routes.ts:96


HSR_RECORD_NOTE_API

Const HSR_RECORD_NOTE_API: string

Defined in

src/routes/routes.ts:97


PUBLIC_API

Const PUBLIC_API: "https://sg-public-api.hoyolab.com"

Defined in

src/routes/routes.ts:9


REDEEM_CLAIM_API

Const REDEEM_CLAIM_API: string

Defined in

src/routes/routes.ts:73


USER_GAMES_LIST

Const USER_GAMES_LIST: string

Defined in

src/routes/routes.ts:13

Functions

DAILY_CLAIM_API

DAILY_CLAIM_API(game): string

Parameters

NameType
gameGamesEnum

Returns

string

Defined in

src/routes/routes.ts:66


DAILY_INFO_API

DAILY_INFO_API(game): string

Parameters

NameType
gameGamesEnum

Returns

string

Defined in

src/routes/routes.ts:54


DAILY_REWARD_API

DAILY_REWARD_API(game): string

Parameters

NameType
gameGamesEnum

Returns

string

Defined in

src/routes/routes.ts:60


getGenshinRegion

getGenshinRegion(uid): GenshinRegion

Get Genshin Impact region based on UID.

Throws

HoyoAPIError when the UID is invalid.

Parameters

NameTypeDescription
uidnumberUser ID.

Returns

GenshinRegion

Region for the UID.

Defined in

src/client/gi/gi.helper.ts:11


getHi3Region

getHi3Region(uid): HonkaiRegion

Gets the Honkai region from a given UID.

Function

Throws

  • If the UID is invalid.

Parameters

NameTypeDescription
uidnumberThe UID to get the Honkai region for.

Returns

HonkaiRegion

  • The Honkai region for the given UID.

Defined in

src/client/hi/hi.helper.ts:11


getHsrRegion

getHsrRegion(uid): HsrRegion

Get Server Region by UID

Parameters

NameTypeDescription
uidnumbernumber UID

Returns

HsrRegion

Defined in

src/client/hsr/hsr.helper.ts:10