# Class: RecordModule

RecordModule class provides methods to interact with Genshin Impact's record module endpoints.

# Table of contents

# Constructors

# Properties

# Methods

# Constructors

# constructor

new RecordModule(request, lang, region, uid)

Creates an instance of RecordModule.

# Parameters

Name Type Description
request Request An instance of Request class.
lang LanguageEnum The language code to be used in requests.
region null | string The server region code in which the user's account resides.
uid null | number The user ID of the Genshin Impact account.

# Defined in

src/modules/records/records.ts:31 (opens new window)

# Properties

# lang

Private lang: LanguageEnum

The language code to be used in requests.

# Defined in

src/modules/records/records.ts:33 (opens new window)


# region

Private region: null | string

The server region code in which the user's account resides.

# Defined in

src/modules/records/records.ts:34 (opens new window)


# request

Private request: Request

An instance of Request class.

# Defined in

src/modules/records/records.ts:32 (opens new window)


# uid

Private uid: null | number

The user ID of the Genshin Impact account.

# Defined in

src/modules/records/records.ts:35 (opens new window)

# Methods

# characters

characters(): Promise<IGenshinCharacters>

Retrieves the Genshin characters of the user.

Async

Throws

If UID parameter is missing or failed to be filled.

Remarks

This method sends a request to the Genshin Impact API to get the daily note information for a user. The user's region and UID must be set before calling this method, otherwise an error will be thrown.

# Returns

Promise<IGenshinCharacters>

A Promise that contains the Genshin characters object.

# Defined in

src/modules/records/records.ts:78 (opens new window)


# charactersSummary

charactersSummary(characterIds): Promise<IGenshinCharacterSummary>

Returns the summary information of Genshin Impact game characters.

Throws

Throws an error if the UID parameter is missing or failed to be filled.

Remarks

This method sends a request to the Genshin Impact API to get the daily note information for a user. The user's region and UID must be set before calling this method, otherwise an error will be thrown.

# Parameters

Name Type Description
characterIds number[] An array of character IDs to retrieve the summary information for.

# Returns

Promise<IGenshinCharacterSummary>

A Promise that resolves to an object containing the summary information of the characters.

# Defined in

src/modules/records/records.ts:105 (opens new window)


# dailyNote

dailyNote(): Promise<IGenshinDailyNote>

Retrieve the daily note information for a Genshin Impact user.

Throws

HoyolabError if the UID parameter is missing or failed to be filled.

Remarks

This method sends a request to the Genshin Impact API to get the daily note information for a user. The user's region and UID must be set before calling this method, otherwise an error will be thrown.

# Returns

Promise<IGenshinDailyNote>

Promise The daily note information.

# Defined in

src/modules/records/records.ts:168 (opens new window)


# records

records(): Promise<IGenshinRecord>

Get user's Genshin Impact record

Async

Function

Throws

If UID parameter is missing or failed to be filled

Remarks

This method sends a request to the Genshin Impact API to get the daily note information for a user. The user's region and UID must be set before calling this method, otherwise an error will be thrown.

# Returns

Promise<IGenshinRecord>

  • User's Genshin Impact record

# Defined in

src/modules/records/records.ts:49 (opens new window)


# spiralAbyss

spiralAbyss(scheduleType?): Promise<IGenshinSpiralAbyss>

Retrieves information about the player's performance in the Spiral Abyss.

Throws

HoyolabError if UID parameter is missing or failed to be filled, or if the given scheduleType parameter is invalid.

Remarks

This method sends a request to the Genshin Impact API to get the daily note information for a user. The user's region and UID must be set before calling this method, otherwise an error will be thrown.

# Parameters

Name Type Default value Description
scheduleType AbyssScheduleEnum AbyssScheduleEnum.CURRENT The schedule type of the Abyss, either CURRENT or PREVIOUS.

# Returns

Promise<IGenshinSpiralAbyss>

A Promise that resolves with an object containing the player's Spiral Abyss data.

# Defined in

src/modules/records/records.ts:136 (opens new window)