{
  "info": {
    "_postman_id": "ac924cb0-161c-4c0b-bdb9-c9f69fb3a8c0",
    "name": "VetoplayApi-Website",
    "description": "Postman collection for all endpoints in GameClientController (`/api/game-client`). Uses collection variables to carry `clientUid` and `sessionToken` across requests.",
    "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json",
    "_exporter_id": "52863151",
    "_collection_link": "https://go.postman.co/collection/52863151-ac924cb0-161c-4c0b-bdb9-c9f69fb3a8c0?source=collection_link"
  },
  "item": [
    {
      "name": "game-list",
      "request": {
        "method": "GET",
        "header": [],
        "url": {
          "raw": "{{baseUrl}}/api/game-client/game-list?clientUid={{clientUid}}",
          "host": [
            "{{baseUrl}}"
          ],
          "path": [
            "api",
            "game-client",
            "game-list"
          ],
          "query": [
            {
              "key": "clientUid",
              "value": "{{clientUid}}"
            }
          ]
        },
        "description": "Returns all available games from `game_jockey`."
      },
      "response": []
    },
    {
      "name": "get-game-lunch-url",
      "event": [
        {
          "listen": "test",
          "script": {
            "exec": [
              "if (pm.response.code === 200) {",
              "  const json = pm.response.json();",
              "  if (json.session_token) pm.collectionVariables.set('sessionToken', json.session_token);",
              "  if (json.username) pm.collectionVariables.set('username', json.username);",
              "  if (json.game_code) pm.collectionVariables.set('gameCode', json.game_code);",
              "}"
            ],
            "type": "text/javascript",
            "packages": {},
            "requests": {}
          }
        }
      ],
      "request": {
        "method": "POST",
        "header": [
          {
            "key": "Content-Type",
            "value": "application/json"
          }
        ],
        "body": {
          "mode": "raw",
          "raw": "{\n  \"clientUid\": \"{{clientUid}}\",\n  \"payload\": \"<encrypted payload>\"\n}"
        },
        "url": {
          "raw": "{{baseUrl}}/api/game-client/launch",
          "host": [
            "{{baseUrl}}"
          ],
          "path": [
            "api",
            "game-client",
            "launch"
          ]
        },
        "description": "Launches a game session. Saves `session_token`, `username`, and `game_code` into collection variables."
      },
      "response": []
    }
  ],
  "variable": [
    {
      "key": "baseUrl",
      "value": "https://uatapi.vetoplay.com"
    },
    {
      "key": "clientUid",
      "value": "",
      "description": "Purchased partner key. Do not share publicly."
    },
    {
      "key": "aesKey",
      "value": ""
    },
    {
      "key": "sessionToken",
      "value": ""
    },
    {
      "key": "username",
      "value": "player001"
    },
    {
      "key": "gameCode",
      "value": "jetx"
    },
    {
      "key": "gameId",
      "value": ""
    }
  ]
}
