Skip to main content
GET
https://worker.thenewscc.com
/
quiz
/
available
curl -X GET https://worker.thenewscc.com/quiz/available \
  -H "Authorization: Bearer seu_token_jwt"
{
  "success": true,
  "data": {
    "quizzes": [
      {
        "id": "quiz_abc123",
        "title": "quiz do dia - 18/01/2026 as 5 notícias mais importantes",
        "description": "teste seus conhecimentos sobre a edição de hoje do the news! acerte 6 de 10 para recuperar seu streak.",
        "quizDate": "2026-01-18",
        "edition": "morning",
        "postId": "post_xyz789",
        "minCorrectAnswers": 6,
        "alreadyAttempted": false,
        "attemptResult": null
      },
      {
        "id": "quiz_ghi789",
        "title": "quiz da night - night #146",
        "description": "teste seus conhecimentos sobre a edição noturna do the news! acerte 6 de 10 para recuperar seu streak.",
        "quizDate": "2026-01-18-night",
        "edition": "night",
        "postId": "post_night123",
        "minCorrectAnswers": 6,
        "alreadyAttempted": false,
        "attemptResult": null
      },
      {
        "id": "quiz_def456",
        "title": "quiz do dia - 17/01/2026 as 5 notícias mais importantes",
        "description": "teste seus conhecimentos sobre a edição de hoje do the news! acerte 6 de 10 para recuperar seu streak.",
        "quizDate": "2026-01-17",
        "edition": "morning",
        "postId": "post_uvw456",
        "minCorrectAnswers": 6,
        "alreadyAttempted": true,
        "attemptResult": {
          "passed": true,
          "correctAnswers": 8,
          "streakRecovered": true
        }
      }
    ],
    "rules": {
      "maxDaysRecovery": 3,
      "minCorrectAnswers": 6,
      "totalQuestions": 10,
      "attemptsPerQuiz": 1
    }
  }
}

Descrição

Lista todos os quizzes disponíveis para recuperação de streak nos últimos 3 dias. Para cada quiz, indica se o usuário já fez uma tentativa e qual foi o resultado. Este endpoint é usado para mostrar ao usuário quais dias ele pode tentar recuperar seu streak através do quiz.

Headers

Authorization
string
required
Token JWT do usuário autenticadoFormato: Bearer {token}

Response

success
boolean
required
Indica se a operação foi bem-sucedida
data
object
required
curl -X GET https://worker.thenewscc.com/quiz/available \
  -H "Authorization: Bearer seu_token_jwt"
{
  "success": true,
  "data": {
    "quizzes": [
      {
        "id": "quiz_abc123",
        "title": "quiz do dia - 18/01/2026 as 5 notícias mais importantes",
        "description": "teste seus conhecimentos sobre a edição de hoje do the news! acerte 6 de 10 para recuperar seu streak.",
        "quizDate": "2026-01-18",
        "edition": "morning",
        "postId": "post_xyz789",
        "minCorrectAnswers": 6,
        "alreadyAttempted": false,
        "attemptResult": null
      },
      {
        "id": "quiz_ghi789",
        "title": "quiz da night - night #146",
        "description": "teste seus conhecimentos sobre a edição noturna do the news! acerte 6 de 10 para recuperar seu streak.",
        "quizDate": "2026-01-18-night",
        "edition": "night",
        "postId": "post_night123",
        "minCorrectAnswers": 6,
        "alreadyAttempted": false,
        "attemptResult": null
      },
      {
        "id": "quiz_def456",
        "title": "quiz do dia - 17/01/2026 as 5 notícias mais importantes",
        "description": "teste seus conhecimentos sobre a edição de hoje do the news! acerte 6 de 10 para recuperar seu streak.",
        "quizDate": "2026-01-17",
        "edition": "morning",
        "postId": "post_uvw456",
        "minCorrectAnswers": 6,
        "alreadyAttempted": true,
        "attemptResult": {
          "passed": true,
          "correctAnswers": 8,
          "streakRecovered": true
        }
      }
    ],
    "rules": {
      "maxDaysRecovery": 3,
      "minCorrectAnswers": 6,
      "totalQuestions": 10,
      "attemptsPerQuiz": 1
    }
  }
}