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

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

const response = await trophy.points.summary("points-system-key", {
  userAttributes: "plan-type:premium,region:us-east"
});
[
  {
    "from": 0,
    "to": 0,
    "users": 5012
  },
  {
    "from": 1,
    "to": 100,
    "users": 1501
  },
  {
    "from": 101,
    "to": 200,
    "users": 1007
  },
  {
    "from": 201,
    "to": 300,
    "users": 584
  },
  {
    "from": 301,
    "to": 400,
    "users": 201
  },
  {
    "from": 401,
    "to": 500,
    "users": 102
  },
  {
    "from": 501,
    "to": 600,
    "users": 25
  },
  {
    "from": 601,
    "to": 700,
    "users": 0
  },
  {
    "from": 701,
    "to": 800,
    "users": 0
  },
  {
    "from": 801,
    "to": 900,
    "users": 0
  },
  {
    "from": 901,
    "to": 1000,
    "users": 0
  }
]
Límites de velocidad

Autorizaciones

X-API-KEY
string
header
requerido

Parámetros de ruta

key
string
requerido

Key of the points system.

Parámetros de consulta

userAttributes
string

Optional colon-delimited user attribute filters in the format attribute:value,attribute:value. Only users matching ALL specified attributes will be included in the points breakdown.

Respuesta

Successful operation

from
integer
requerido

The start of the points range. Inclusive.

to
integer
requerido

The end of the points range. Inclusive.

users
integer
requerido

The number of users in this points range.