Skip to main content

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

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

FieldTypeRequiredDescription
scorenumberYesUser'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
}

Next Steps