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:
tic-tac-toe,
word-search,
speed-maths,
pattern-match,
spelling-bee,
code-breaker,
shape-fold,
word-chains,
number-ninja
secondsSpent
integer
required

a number between 1 and 3600

Required range: 1 <= x <= 3600

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