Python SDK — Room Actions

Room Actions — client.actions

submit
client.actions.submit(
    player_token: str,
    action_type: str,
    request_data: Any = None,
    target_players: RoomTargetPlayers = RoomTargetPlayers.ALL,
    target_players_ids: list[int] | None = None,
) -> ActionSubmitResponse

Submits a game action to target players (HOST, ALL, OTHERS or SPECIFIC ids).

poll
client.actions.poll(player_token: str, data_cls: type | None = None) -> ActionPollResponse

Polls for completed actions targeted at the current player.

get_pending
client.actions.get_pending(player_token: str, data_cls: type | None = None) -> ActionPendingResponse

Retrieves pending actions to process (host only).

complete
client.actions.complete(
    player_token: str,
    action_id: str,
    status: RoomCompleteActionStatus = RoomCompleteActionStatus.COMPLETED,
    response_data: Any = None,
) -> ActionCompleteResponse

Marks an action as complete with optional response data (host only).