Geek Social — Documentação
API ReferenceCollections

GET /collections/stats

Estatísticas das coleções do usuário

GET/collections/statsAuth: accessToken

Retorna estatísticas agregadas das coleções do usuário autenticado: total de coleções, itens por tipo, breakdown de campos, distribuição de ratings e jogos zerados por ano.

Request

Esta requisição não tem corpo.

Response

200

{
  "totalCollections": 5,
  "itemsByType": [
    { "typeKey": "games", "typeName": "Jogos", "typeIcon": "🎮", "count": 42 }
  ],
  "fieldBreakdownByType": [
    {
      "typeKey": "games",
      "typeName": "Jogos",
      "typeIcon": "🎮",
      "fieldKey": "status",
      "fieldName": "Status",
      "fieldValue": "Zerado",
      "count": 10
    }
  ],
  "itemsByRating": [
    { "rating": 5, "count": 8 },
    { "rating": null, "count": 12 }
  ],
  "gamesByCompletionYear": [
    { "year": 2024, "count": 5 }
  ]
}

Erros

CódigoDescrição
401Não autenticado

Exemplos

curl -X GET 'https://geeksocialapi.homelab-cloud.com/collections/stats' \
  -H 'Authorization: Bearer SEU_ACCESS_TOKEN'
await fetch('https://geeksocialapi.homelab-cloud.com/collections/stats', {
  method: 'GET',
  headers: { Authorization: 'Bearer ' + accessToken },
})

On this page