games:
  - type: speed-round
    title: "HTTP Method Sprint"
    rounds:
      - question: "Create a new user account. Which HTTP method and status code?"
        options:
          - "GET 200"
          - "POST 201"
          - "PUT 200"
          - "PATCH 201"
        answer: 1
        timeLimit: 14
      - question: "Delete a resource. Which method and status?"
        options:
          - "DELETE 200"
          - "DELETE 204"
          - "POST 200"
          - "GET 204"
        answer: 1
        timeLimit: 14
      - question: "Fetch a single user by ID (read-only). Which method?"
        options:
          - "POST 200"
          - "GET 200"
          - "PUT 200"
          - "PATCH 200"
        answer: 1
        timeLimit: 12
      - question: "Update an existing resource (partial update). Which method?"
        options:
          - "PUT 200"
          - "PATCH 200"
          - "POST 200"
          - "GET 200"
        answer: 1
        timeLimit: 14
      - question: "Resource not found. Which status code?"
        options:
          - "400 Bad Request"
          - "404 Not Found"
          - "500 Internal Server Error"
          - "204 No Content"
        answer: 1
        timeLimit: 14
      - question: "Replace an existing resource entirely (full update). Which method?"
        options:
          - "PATCH 200"
          - "PUT 200"
          - "POST 200"
          - "GET 200"
        answer: 1
        timeLimit: 14
      - question: "List all items in a collection. Which method and status?"
        options:
          - "GET 200"
          - "POST 201"
          - "GET 201"
          - "PUT 200"
        answer: 0
        timeLimit: 12
      - question: "Invalid request body (e.g. missing required field). Which status?"
        options:
          - "404 Not Found"
          - "400 Bad Request"
          - "422 Unprocessable Entity"
          - "500 Internal Server Error"
        answer: 1
        timeLimit: 15
      - question: "Request succeeded, no response body to return. Which status?"
        options:
          - "200 OK"
          - "204 No Content"
          - "202 Accepted"
          - "201 Created"
        answer: 1
        timeLimit: 14
      - question: "Request accepted for async processing. Which status?"
        options:
          - "200 OK"
          - "201 Created"
          - "202 Accepted"
          - "204 No Content"
        answer: 2
        timeLimit: 14

  - type: classify
    title: "API Pattern Classifier"
    categories:
      - name: "REST"
        color: "#58a6ff"
      - name: "GraphQL"
        color: "#a371f7"
      - name: "RPC"
        color: "#d29922"
    items:
      - text: "GET /users/123, POST /orders, DELETE /products/456 — resources and HTTP verbs."
        category: "REST"
      - text: "Single endpoint, client sends { query: '{ users { id name } }' } — flexible field selection."
        category: "GraphQL"
      - text: "POST /rpc/CreateUser with { name, email } — procedure-oriented, not resource-oriented."
        category: "RPC"
      - text: "GET /api/v1/orders?status=shipped — standard HTTP, URI as resource identifier."
        category: "REST"
      - text: "Client specifies exactly which fields to fetch; no over- or under-fetching."
        category: "GraphQL"
      - text: "gRPC, protobuf, methods like GetUser, CreateOrder — strong typing, often binary."
        category: "RPC"
      - text: "HATEOAS — links in response point to related resources and actions."
        category: "REST"
      - text: "Mutations and queries; schema defines types and resolvers; introspection supported."
        category: "GraphQL"
      - text: "JSON-RPC: { jsonrpc: '2.0', method: 'subtract', params: [5, 3] }."
        category: "RPC"
