POST
/
v1
/
trace-learn
/
rewards
/
games
/
spend
TypeScript client
import { TxAgentKitClient } from '@tx-agent-kit/sdk'

const client = new TxAgentKitClient({
  token: process.env.TX_AGENT_KIT_TOKEN
})

const response = await client.traceLearn.recordTraceLearnGameTimeSpend({
  body: {},
})
{
  "studentId": "<string>",
  "rewardState": {
    "streakDays": 123,
    "starsEarned": 123,
    "earnedSeconds": 123,
    "spentSeconds": 123,
    "availableSeconds": 123,
    "dailyCapSeconds": 123
  },
  "games": [
    {
      "name": "<string>",
      "description": "<string>",
      "unlocked": true,
      "isNew": true,
      "unlockTopic": "<string>"
    }
  ],
  "recentUnlocks": [
    {
      "unlockedAt": "<string>",
      "reason": "<string>"
    }
  ],
  "wellbeing": {
    "breakRecommended": true,
    "dailyCapSeconds": 123,
    "nextBreakAtSeconds": 123
  }
}

Body

application/json
gameId
enum<string>
required
Available options:
speed-maths,
memory-grid,
equation-builder,
stroop-splash,
group-spotter,
pattern-match,
shape-fold,
word-chains,
number-ninja,
word-search,
spelling-bee,
code-breaker
secondsSpent
integer
required

a number between 1 and 3600

Required range: 1 <= x <= 3600
idempotencyKey
string<uuid>
required

a Universally Unique Identifier

Pattern: ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$

Response

Success

studentId
string
required

a string at most 128 character(s) long

Required string length: 1 - 128
rewardState
object
required
games
object[]
required
recentUnlocks
object[]
required
wellbeing
object
required