Skip to content

@my-swu/simulator-client


@my-swu/simulator-client / MatchSpectatorAccess

Type Alias: MatchSpectatorAccess ​

MatchSpectatorAccess = MatchSpectatorAccessResponse

Defined in: packages/ts-sdk/src/resources/match-types.ts:60

Example:

ts
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',
})

// Spectator access is read-only; it never carries a seat token.
const matchSpectatorAccess = await simulatorClient.matches.spectate(
  { matchId: 'match_123' },
  { name: 'Spectator', authenticated: false },
)

console.log(matchSpectatorAccess)

Released under the MIT License.