Skip to content
moxon home

Tic-Tac-Toe Fetch

The /tic-tac-toe/fetch endpoint retrieves information about a current Tic-Tac-Toe game.

posthttps://api.moxon.dev/v4/tic-tac-toe/fetch
Try itpost/v4/tic-tac-toe/fetch

Parameters

  • usernamestringrequired

    The username of the player

  • gamestringoptional

    The game identifier to fetch

  • privatebooleanoptional

    Set to true to fetch only private games

Code Examples

Response Fields

  • idstring

    Game identifier

  • movesarray

    Array of moves made in the game

  • playersstring[]

    Array of player usernames

  • turnstring|null

    Username of the player whose turn it is

  • statusstring

    Game status (waiting or ready)

  • privateboolean

    Whether the game is private

  • winnerstring|null

    Username of the winner (if game is over)

  • loserstring|null

    Username of the loser (if game is over)

  • tieboolean

    Whether the game ended in a tie

Error Handling

If parameters are missing or invalid, the API will return an error:

  • 400Please provide a username (?username={username})The username parameter is missing