Saltar al contenido principal
GET
/
points
/
{key}
/
levels
JavaScript
import { TrophyApiClient } from '@trophyso/node';

const trophy = new TrophyApiClient({
  apiKey: 'YOUR_API_KEY'
});

const response = await trophy.points.levels("points-system-key");
[
  {
    "id": "1140fe51-6bce-4b44-b0ad-bddc4e123534",
    "key": "bronze",
    "name": "Bronze",
    "description": "Starting level",
    "badgeUrl": "https://example.com/bronze.png",
    "points": 0
  },
  {
    "id": "2240fe51-6bce-4b44-b0ad-bddc4e123534",
    "key": "silver",
    "name": "Silver",
    "description": "Mid-tier level",
    "badgeUrl": null,
    "points": 50
  },
  {
    "id": "3340fe51-6bce-4b44-b0ad-bddc4e123534",
    "key": "gold",
    "name": "Gold",
    "description": "Top level",
    "badgeUrl": "https://example.com/gold.png",
    "points": 200
  }
]
Límites de Velocidad

Autorizaciones

X-API-KEY
string
header
requerido

Parámetros de ruta

key
string
requerido

Key of the points system.

Respuesta

Successful operation

id
string
requerido

The ID of the level

key
string
requerido

The unique key of the level

name
string
requerido

The name of the level

description
string
requerido

The description of the level

badgeUrl
string | null
requerido

The URL of the badge image for the level

points
integer
requerido

The points threshold required to reach this level