@my-swu/simulator-client / GetMatchResponse
Interface: GetMatchResponse
Defined in: packages/ts-sdk/src/generated/types/get-match-response.ts:254
Example:
ts
import type { GetMatchResponse } from '@my-swu/simulator-client'
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',
})
// Reuse a real snapshot shape when building response fixtures.
const matchSnapshot = await simulatorClient.matches.get('match_123')
const getMatchResponse = { snapshot: matchSnapshot } satisfies GetMatchResponse
console.log(getMatchResponse)Indexable
[
k:string]:unknown
Properties
snapshot
Example:
ts
import type { GetMatchResponse } from '@my-swu/simulator-client'
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',
})
// Reuse a real snapshot shape when building response fixtures.
const matchSnapshot = await simulatorClient.matches.get('match_123')
const getMatchResponse = { snapshot: matchSnapshot } satisfies GetMatchResponse
const { snapshot: fetchedMatchSnapshot } = getMatchResponse
console.log(fetchedMatchSnapshot)snapshot:
GameState
Defined in: packages/ts-sdk/src/generated/types/get-match-response.ts:255
