Skip to content

@my-swu/simulator-client


@my-swu/simulator-client / TournamentRoomsResource

Interface: TournamentRoomsResource ​

Defined in: packages/ts-sdk/src/resources/tournament-rooms.ts:34

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

const tournamentRoomsResource = simulatorClient.tournamentRooms

console.log(tournamentRoomsResource)

Methods ​

applyEventCommand() ​

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

const tournamentRoomsResource = simulatorClient.tournamentRooms

const { applyEventCommand } = tournamentRoomsResource

console.log(applyEventCommand)

applyEventCommand(roomId, request, options?): Promise<TournamentRoomAccessResponse>

Defined in: packages/ts-sdk/src/resources/tournament-rooms.ts:74

Parameters ​

roomId ​

string

request ​

TournamentEventCommandRequest

options? ​

SimulatorRequestOptions

Returns ​

Promise<TournamentRoomAccessResponse>


close() ​

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

const tournamentRoomsResource = simulatorClient.tournamentRooms

const { close } = tournamentRoomsResource

console.log(close)

close(roomId, request, options?): Promise<TournamentRoomResponse>

Defined in: packages/ts-sdk/src/resources/tournament-rooms.ts:105

Parameters ​

roomId ​

string

request ​

CloseTournamentRoomRequest

options? ​

SimulatorRequestOptions

Returns ​

Promise<TournamentRoomResponse>


create() ​

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

const tournamentRoomsResource = simulatorClient.tournamentRooms

const { create } = tournamentRoomsResource

console.log(create)

create(request, options?): Promise<TournamentRoomAccessResponse>

Defined in: packages/ts-sdk/src/resources/tournament-rooms.ts:35

Parameters ​

request ​

CreateTournamentRoomRequest

options? ​

SimulatorRequestOptions

Returns ​

Promise<TournamentRoomAccessResponse>


createSession() ​

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

const tournamentRoomsResource = simulatorClient.tournamentRooms

const { createSession } = tournamentRoomsResource

console.log(createSession)

createSession(access): TournamentRoomSession

Defined in: packages/ts-sdk/src/resources/tournament-rooms.ts:110

Parameters ​

access ​

TournamentRoomAccessResponse | TournamentRoomAccessInput

Returns ​

TournamentRoomSession


createTable() ​

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

const tournamentRoomsResource = simulatorClient.tournamentRooms

const { createTable } = tournamentRoomsResource

console.log(createTable)

createTable(roomId, request, options?): Promise<TournamentRoomAccessResponse>

Defined in: packages/ts-sdk/src/resources/tournament-rooms.ts:84

Parameters ​

roomId ​

string

request ​

CreateTournamentTableRequest

options? ​

SimulatorRequestOptions

Returns ​

Promise<TournamentRoomAccessResponse>


get() ​

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

const tournamentRoomsResource = simulatorClient.tournamentRooms

const { get } = tournamentRoomsResource

console.log(get)

get(roomId, options?): Promise<TournamentRoomSnapshot>

Defined in: packages/ts-sdk/src/resources/tournament-rooms.ts:40

Parameters ​

roomId ​

string

options? ​

SimulatorRequestOptions

Returns ​

Promise<TournamentRoomSnapshot>


join() ​

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

const tournamentRoomsResource = simulatorClient.tournamentRooms

const { join } = tournamentRoomsResource

console.log(join)

join(roomId, request, options?): Promise<TournamentRoomAccessResponse>

Defined in: packages/ts-sdk/src/resources/tournament-rooms.ts:44

Parameters ​

roomId ​

string

request ​

JoinTournamentRoomRequest

options? ​

SimulatorRequestOptions

Returns ​

Promise<TournamentRoomAccessResponse>


joinTable() ​

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

const tournamentRoomsResource = simulatorClient.tournamentRooms

const { joinTable } = tournamentRoomsResource

console.log(joinTable)

joinTable(roomId, tableId, request, options?): Promise<TournamentRoomAccessResponse>

Defined in: packages/ts-sdk/src/resources/tournament-rooms.ts:89

Parameters ​

roomId ​

string

tableId ​

string

request ​

JoinTournamentTableRequest

options? ​

SimulatorRequestOptions

Returns ​

Promise<TournamentRoomAccessResponse>


leave() ​

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

const tournamentRoomsResource = simulatorClient.tournamentRooms

const { leave } = tournamentRoomsResource

console.log(leave)

leave(roomId, request, options?): Promise<void>

Defined in: packages/ts-sdk/src/resources/tournament-rooms.ts:100

Parameters ​

roomId ​

string

request ​

LeaveTournamentRoomRequest

options? ​

SimulatorRequestOptions

Returns ​

Promise<void>


list() ​

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

const tournamentRoomsResource = simulatorClient.tournamentRooms

const { list } = tournamentRoomsResource

console.log(list)

list(options?): Promise<TournamentRoomListResponse>

Defined in: packages/ts-sdk/src/resources/tournament-rooms.ts:39

Parameters ​

options? ​

SimulatorRequestOptions

Returns ​

Promise<TournamentRoomListResponse>


returnMatch() ​

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

const tournamentRoomsResource = simulatorClient.tournamentRooms

const { returnMatch } = tournamentRoomsResource

console.log(returnMatch)

returnMatch(roomId, request, options?): Promise<TournamentRoomAccessResponse>

Defined in: packages/ts-sdk/src/resources/tournament-rooms.ts:95

Parameters ​

roomId ​

string

request ​

ReturnTournamentMatchRequest

options? ​

SimulatorRequestOptions

Returns ​

Promise<TournamentRoomAccessResponse>


sendChat() ​

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

const tournamentRoomsResource = simulatorClient.tournamentRooms

const { sendChat } = tournamentRoomsResource

console.log(sendChat)

sendChat(roomId, request, options?): Promise<TournamentRoomChatResponse>

Defined in: packages/ts-sdk/src/resources/tournament-rooms.ts:64

Parameters ​

roomId ​

string

request ​

TournamentRoomChatRequest

options? ​

SimulatorRequestOptions

Returns ​

Promise<TournamentRoomChatResponse>


startEvent() ​

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

const tournamentRoomsResource = simulatorClient.tournamentRooms

const { startEvent } = tournamentRoomsResource

console.log(startEvent)

startEvent(roomId, request, options?): Promise<TournamentRoomAccessResponse>

Defined in: packages/ts-sdk/src/resources/tournament-rooms.ts:69

Parameters ​

roomId ​

string

request ​

StartTournamentEventRequest

options? ​

SimulatorRequestOptions

Returns ​

Promise<TournamentRoomAccessResponse>


submitDeck() ​

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

const tournamentRoomsResource = simulatorClient.tournamentRooms

const { submitDeck } = tournamentRoomsResource

console.log(submitDeck)

submitDeck(roomId, request, options?): Promise<TournamentRoomAccessResponse>

Defined in: packages/ts-sdk/src/resources/tournament-rooms.ts:79

Parameters ​

roomId ​

string

request ​

SubmitTournamentDeckRequest

options? ​

SimulatorRequestOptions

Returns ​

Promise<TournamentRoomAccessResponse>


sync() ​

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

const tournamentRoomsResource = simulatorClient.tournamentRooms

const { sync } = tournamentRoomsResource

console.log(sync)

sync(roomId, request, options?): Promise<TournamentRoomAccessResponse>

Defined in: packages/ts-sdk/src/resources/tournament-rooms.ts:49

Parameters ​

roomId ​

string

request ​

TournamentRoomSyncRequest

options? ​

SimulatorRequestOptions

Returns ​

Promise<TournamentRoomAccessResponse>


updatePlayer() ​

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

const tournamentRoomsResource = simulatorClient.tournamentRooms

const { updatePlayer } = tournamentRoomsResource

console.log(updatePlayer)

updatePlayer(roomId, request, options?): Promise<TournamentRoomAccessResponse>

Defined in: packages/ts-sdk/src/resources/tournament-rooms.ts:54

Parameters ​

roomId ​

string

request ​

UpdateTournamentRoomPlayerRequest

options? ​

SimulatorRequestOptions

Returns ​

Promise<TournamentRoomAccessResponse>


updateSettings() ​

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

const tournamentRoomsResource = simulatorClient.tournamentRooms

const { updateSettings } = tournamentRoomsResource

console.log(updateSettings)

updateSettings(roomId, request, options?): Promise<TournamentRoomAccessResponse>

Defined in: packages/ts-sdk/src/resources/tournament-rooms.ts:59

Parameters ​

roomId ​

string

request ​

UpdateTournamentRoomSettingsRequest

options? ​

SimulatorRequestOptions

Returns ​

Promise<TournamentRoomAccessResponse>

Released under the MIT License.