Get User Game Score Response
Schema for the response from game point score GET endpoints, including:
GET /api/v2/game-point/game-client/{roundId}(authenticated)GET /api/v2/game-point/game-client/{userId}/{roundId}(public)
Description
This schema defines the response payload returned when retrieving a user's game score for a specific tournament round. The response contains only the user's score.
Class Validator Schema
import { IsNumber } from "class-validator";
export class GetUserGameScoreResponsePayload {
@IsNumber()
score: number;
}
Authentication
GET .../game-client/{roundId}— requires JWT andx-game-key(see Get User Score).GET .../game-client/{userId}/{roundId}— no authentication (see Get User Score by User ID).
JSON Schema
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "Get User Game Score Response",
"type": "object",
"properties": {
"score": {
"type": "number",
"description": "User's game score for the specified round"
}
},
"required": ["score"]
}
TypeScript Type
interface GetUserGameScoreResponsePayload {
score: number;
}
Example Response
{
"score": 1500
}
Field Descriptions
| Field | Type | Required | Description |
|---|---|---|---|
score | number | Yes | User's game score for the specified round |
Usage Example
// Authenticated: current user
const authed = await fetch("https://api.intraverse.io/api/v2/game-point/game-client/round-123", {
headers: {
Authorization: `Bearer ${userJwtToken}`,
"x-game-key": gameClientKey,
},
});
// Public: explicit userId
const publicRes = await fetch("https://api.intraverse.io/api/v2/game-point/game-client/user-uid-here/round-123");
const result = await authed.json();
console.log(`User's score for this round: ${result.score}`);
Error Responses
{
"message": "Unauthorized",
"status": 401
}
{
"message": "Round not found",
"status": 404
}