Skip to main content
Using Deno in production at your company? Earn free Deno merch.
Give us feedback
Module

x/s3si/src/GameFetcher.ts>GameFetcher

Export your battles from SplatNet to https://stat.ink
Go to Latest
class GameFetcher
import { GameFetcher } from "https://deno.land/x/s3si@ci/src/GameFetcher.ts";

Fetch game and cache it. It also fetches bankara match challenge info. if splatnet is not given, it will use cache only

Constructors

new
GameFetcher(unnamed 0: { splatnet?: Splatnet3; state: State; cache?: Cache; })

Properties

private
optional
_splatnet: Splatnet3
private
optional
bankaraHistory: HistoryGroupItem<BattleListNode>[]
private
bankaraLock: Mutex
private
cache: Cache
private
optional
coopHistory: CoopHistoryGroups["nodes"]
private
coopLock: Mutex
private
lock: Record<string, Mutex | undefined>
private
rankTracker: RankTracker
private
readonly
splatnet
private
optional
xMatchHistory: HistoryGroupItem<BattleListNode>[]
private
xMatchLock: Mutex

Methods

private
cacheDetail<T>(id: string, getter: () => Promise<T>): Promise<T>
private
fetchBattle(id: string): Promise<VsInfo>
private
fetchCoop(id: string): Promise<CoopInfo>
private
getLock(id: string): Mutex
fetch(type: Game["type"], id: string): Promise<Game>
getBattleMetaById(id: string, vsMode: VsMode): Promise<Omit<VsInfo, "detail">>
getCoopMetaById(id: string): Promise<Omit<CoopInfo, "detail">>
getRankStateById(id: string)
setRankState(state: RankState | undefined)
updateRank(): Promise<RankState | undefined>