Create a EnkaManager
Private
Readonly
cacheCache of EnkaData
UID
Cached EnkaData
Static
Private
Readonly
defaultDefault fetch option
Static
Private
Readonly
enkaURL of enka.network
Static
Private
Readonly
enkaURL of status.enka.network
Alias for emitter.on(eventName, listener)
.
The name of the event.
The callback function. (supports async)
EventEmitter.addListener()
Protected
emitSynchronously calls each of the listeners registered for the event namedeventName
, in the order they were registered, passing the supplied arguments to each.
Returns true
if the event had listeners, false
otherwise.
The name of the event.
Rest
...args: K extends "GET_NEW_ENKA_DATA"Arguments to pass to the listeners.
EventEmitter.emit()
Fetch Status from 1 hour ago to now
Optional
fetchOption: RequestInitFetch option
Status from 1 hour ago to now
Fetch EnkaAccount from enka.network
Enka Account Username
Optional
fetchOption: RequestInitFetch option
EnkaAccount
Data fetched by this method is not stored as a temporary cache.
Fetch GenshinAccounts from enka.network
Enka Account Username
Optional
fetchOption: RequestInitFetch option
GenshinAccounts
Data fetched by this method is not stored as a temporary cache.
Fetch now Status
Optional
fetchOption: RequestInitFetch option
Now status
Fetch PlayerDetail from enka.network
UID
Optional
fetchOption: RequestInitFetch option
PlayerDetail
The data fetched by this method is stored as a temporary cache. The storage period depends on ttl.
Private
fetchUIDAlias for emitter.removeListener()
.
The name of the event.
The callback function. (supports async)
EventEmitter.off()
Adds the listener
function to the end of the listeners array for the event named eventName
.
No checks are made to see if the listener
has already been added.
Multiple calls passing the same combination of eventName
and listener
will result in the listener
being added, and called, multiple times.
The name of the event.
The callback function. (supports async)
EventEmitter.on()
Adds a one-timelistener
function for the event named eventName
. The next time eventName
is triggered, this listener is removed and then invoked.
The name of the event.
The callback function. (supports async)
EventEmitter.once()
Removes all listeners, or those of the specified eventName
.
Optional
event: "GET_NEW_ENKA_DATA" | GET_NEW_ENKA_DATA | KThe name of the event.
EventEmitter.removeAllListeners()
Removes the specified listener
from the listener array for the event namedeventName
.
The name of the event.
The callback function. (supports async)
EventEmitter.removeListener()
Class for fetching EnkaData from enka.network