Skip to main content
GET
/
streaks
/
ranking
curl --request GET \
  --url 'https://backend.testeswaffle.org/streaks/[email protected]'
{
  "success": true,
  "data": {
    "ranking": [
      {
        "position": 1,
        "email": "top***@***.com",
        "currentStreak": 365,
        "maxStreak": 365,
        "isCurrentUser": false
      },
      {
        "position": 2,
        "email": "sec***@***.com",
        "currentStreak": 180,
        "maxStreak": 200,
        "isCurrentUser": false
      },
      {
        "position": 3,
        "email": "lei***@exemplo.com",
        "currentStreak": 150,
        "maxStreak": 150,
        "isCurrentUser": true
      }
    ],
    "userPosition": {
      "position": 3,
      "totalReaders": 5432
    }
  }
}
Esta é uma rota legacy mantida para compatibilidade. Para novos desenvolvimentos, use as novas rotas de ranking:

Descrição

Obtém o ranking dos leitores com maiores streaks, com opção de destacar a posição de um usuário específico.

Query Parameters

email
string
Email do usuário para destacar sua posição no ranking

Response

success
boolean
Indica se a operação foi bem-sucedida
data
object
curl --request GET \
  --url 'https://backend.testeswaffle.org/streaks/[email protected]'
{
  "success": true,
  "data": {
    "ranking": [
      {
        "position": 1,
        "email": "top***@***.com",
        "currentStreak": 365,
        "maxStreak": 365,
        "isCurrentUser": false
      },
      {
        "position": 2,
        "email": "sec***@***.com",
        "currentStreak": 180,
        "maxStreak": 200,
        "isCurrentUser": false
      },
      {
        "position": 3,
        "email": "lei***@exemplo.com",
        "currentStreak": 150,
        "maxStreak": 150,
        "isCurrentUser": true
      }
    ],
    "userPosition": {
      "position": 3,
      "totalReaders": 5432
    }
  }
}

Query Parameters

email
string<email>

Email do usuário para destacar sua posição

Response

200 - application/json

Ranking obtido com sucesso

success
boolean
data
object