@my-swu/simulator-client / MatchHistoryResource
Interface: MatchHistoryResource
Defined in: packages/ts-sdk/src/resources/match-history.ts:56
Server-owned simulator history APIs.
Example:
import { createSimulatorClient } from '@my-swu/simulator-client'
// Point this at the simulator HTTP origin for /health and /api routes.
const simulatorClient = createSimulatorClient({
baseUrl: 'http://127.0.0.1:4000',
})
const matchHistoryResource = simulatorClient.matchHistory
console.log(matchHistoryResource)Methods
createReplayShare()
Example:
import { createSimulatorClient } from '@my-swu/simulator-client'
// Point this at the simulator HTTP origin for /health and /api routes.
const simulatorClient = createSimulatorClient({
baseUrl: 'http://127.0.0.1:4000',
})
const matchHistoryResource = simulatorClient.matchHistory
const { createReplayShare } = matchHistoryResource
console.log(createReplayShare)createReplayShare(
request,options?):Promise<CreateMatchHistoryReplayShareResponse>
Defined in: packages/ts-sdk/src/resources/match-history.ts:77
Creates or returns a stable opaque replay link for one disclosure scope.
Parameters
request
CreateMatchHistoryReplayShareInput
options?
Returns
Promise<CreateMatchHistoryReplayShareResponse>
deckStats()
Example:
import { createSimulatorClient } from '@my-swu/simulator-client'
// Point this at the simulator HTTP origin for /health and /api routes.
const simulatorClient = createSimulatorClient({
baseUrl: 'http://127.0.0.1:4000',
})
const matchHistoryResource = simulatorClient.matchHistory
const { deckStats } = matchHistoryResource
console.log(deckStats)deckStats(
request,options?):Promise<MatchHistoryDeckStatsResponse>
Defined in: packages/ts-sdk/src/resources/match-history.ts:60
Returns private lifetime simulator results for My SWU deck ids.
Parameters
request
options?
Returns
Promise<MatchHistoryDeckStatsResponse>
list()
Example:
import { createSimulatorClient } from '@my-swu/simulator-client'
// Point this at the simulator HTTP origin for /health and /api routes.
const simulatorClient = createSimulatorClient({
baseUrl: 'http://127.0.0.1:4000',
})
const matchHistoryResource = simulatorClient.matchHistory
const { list } = matchHistoryResource
console.log(list)list(
request,options?):Promise<MatchHistoryListResponse>
Defined in: packages/ts-sdk/src/resources/match-history.ts:67
Lists saved and completed matches visible to the supplied identities.
Parameters
request
options?
Returns
Promise<MatchHistoryListResponse>
loadReplayShare()
Example:
import { createSimulatorClient } from '@my-swu/simulator-client'
// Point this at the simulator HTTP origin for /health and /api routes.
const simulatorClient = createSimulatorClient({
baseUrl: 'http://127.0.0.1:4000',
})
const matchHistoryResource = simulatorClient.matchHistory
const { loadReplayShare } = matchHistoryResource
console.log(loadReplayShare)loadReplayShare(
shareToken,options?):Promise<SharedMatchHistoryReplayResponse>
Defined in: packages/ts-sdk/src/resources/match-history.ts:82
Loads a replay through an opaque link without participant identities.
Parameters
shareToken
string
options?
Returns
Promise<SharedMatchHistoryReplayResponse>
recover()
Example:
import { createSimulatorClient } from '@my-swu/simulator-client'
// Point this at the simulator HTTP origin for /health and /api routes.
const simulatorClient = createSimulatorClient({
baseUrl: 'http://127.0.0.1:4000',
})
const matchHistoryResource = simulatorClient.matchHistory
const { recover } = matchHistoryResource
console.log(recover)recover(
request,options?):Promise<MatchRecoveryResponse>
Defined in: packages/ts-sdk/src/resources/match-history.ts:94
Restores an owned Solo-versus-AI source after its runtime is lost.
Parameters
request
options?
Returns
Promise<MatchRecoveryResponse>
replay()
Example:
import { createSimulatorClient } from '@my-swu/simulator-client'
// Point this at the simulator HTTP origin for /health and /api routes.
const simulatorClient = createSimulatorClient({
baseUrl: 'http://127.0.0.1:4000',
})
const matchHistoryResource = simulatorClient.matchHistory
const { replay } = matchHistoryResource
console.log(replay)replay(
request,options?):Promise<MatchHistoryReplayResponse>
Defined in: packages/ts-sdk/src/resources/match-history.ts:72
Loads public and post-game reveal-all frames for an authorized result.
Parameters
request
options?
Returns
Promise<MatchHistoryReplayResponse>
restore()
Example:
import { createSimulatorClient } from '@my-swu/simulator-client'
// Point this at the simulator HTTP origin for /health and /api routes.
const simulatorClient = createSimulatorClient({
baseUrl: 'http://127.0.0.1:4000',
})
const matchHistoryResource = simulatorClient.matchHistory
const { restore } = matchHistoryResource
console.log(restore)restore(
request,options?):Promise<RestoreHistoryResponse>
Defined in: packages/ts-sdk/src/resources/match-history.ts:89
Restores one authorized row whose eligibility is available.
Parameters
request
options?
Returns
Promise<RestoreHistoryResponse>
submitAiGameFeedback()
Example:
import { createSimulatorClient } from '@my-swu/simulator-client'
// Point this at the simulator HTTP origin for /health and /api routes.
const simulatorClient = createSimulatorClient({
baseUrl: 'http://127.0.0.1:4000',
})
const matchHistoryResource = simulatorClient.matchHistory
const { submitAiGameFeedback } = matchHistoryResource
console.log(submitAiGameFeedback)submitAiGameFeedback(
request,options?):Promise<SubmitAiGameFeedbackResponse>
Defined in: packages/ts-sdk/src/resources/match-history.ts:99
Creates feedback once for one completed Solo-versus-AI game.
Parameters
request
options?
Returns
Promise<SubmitAiGameFeedbackResponse>
