Skip to main content

Class: HSRRecordModule

HSRRecordModule class provides methods to interact with Honkai Star Rail record module endpoints.

Constructors

constructor

new HSRRecordModule(request, lang, region, uid)

Creates an instance of HSRRecordModule.

Parameters

NameTypeDescription
requestHTTPRequestThe HTTPRequest object used for making API requests.
langLanguageEnumThe language enum value.
regionnull | stringThe region string or null if not provided.
uidnull | numberThe UID number or null if not provided.

Defined in

src/client/hsr/record/record.ts:34

Properties

lang

Private lang: LanguageEnum

The language enum value.

Defined in

src/client/hsr/record/record.ts:36


region

Private region: null | string

The region string or null if not provided.

Defined in

src/client/hsr/record/record.ts:37


request

Private request: HTTPRequest

The HTTPRequest object used for making API requests.

Defined in

src/client/hsr/record/record.ts:35


uid

Private uid: null | number

The UID number or null if not provided.

Defined in

src/client/hsr/record/record.ts:38

Methods

characters

characters(): Promise<IHSRCharacterFull[]>

Retrieves the characters associated with the provided region and UID.

Throws

if the region or UID parameters are missing or failed to be filled.

Throws

if failed to retrieve data, please double-check the provided UID.

Returns

Promise<IHSRCharacterFull[]>

A Promise that resolves to an array of full HSR characters.

Defined in

src/client/hsr/record/record.ts:48


forgottenHall

forgottenHall(scheduleType?): Promise<IHSRForgottenHall>

Retrieves the forgotten hall information associated with the provided region and UID.

Throws

if the region or UID parameters are missing or failed to be filled.

Throws

if the given scheduleType parameter is invalid.

Throws

if failed to retrieve data, please double-check the provided UID.

Parameters

NameTypeDefault valueDescription
scheduleTypeForgottenHallScheduleEnumForgottenHallScheduleEnum.CURRENTThe schedule type for the forgotten hall (optional, defaults to CURRENT).

Returns

Promise<IHSRForgottenHall>

A Promise that resolves to the forgotten hall information object.

Defined in

src/client/hsr/record/record.ts:189


note

note(): Promise<IHSRNote>

Retrieves the note associated with the provided region and UID.

Throws

if the region or UID parameters are missing or failed to be filled.

Throws

if failed to retrieve data, please double-check the provided UID.

Returns

Promise<IHSRNote>

A Promise that resolves to the HSR note object.

Defined in

src/client/hsr/record/record.ts:141


records

records(): Promise<IHSRRecord>

Retrieves the records associated with the provided region and UID.

Throws

if the region or UID parameters are missing or failed to be filled.

Throws

if failed to retrieve data, please double-check the provided UID.

Returns

Promise<IHSRRecord>

A Promise that resolves to the HSR record object.

Defined in

src/client/hsr/record/record.ts:95