curl -X GET https://worker.thenewscc.com/quiz/available \
-H "Authorization: Bearer seu_token_jwt"
const response = await fetch('https://worker.thenewscc.com/quiz/available', {
method: 'GET',
headers: {
'Authorization': 'Bearer seu_token_jwt'
}
});
const data = await response.json();
{
"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
}
}
}
{
"success": false,
"message": "Token de autenticação inválido ou ausente"
}
Usuário
Listar Quizzes Disponíveis
Retorna a lista de quizzes disponíveis para o usuário nos últimos 3 dias
GET
/
quiz
/
available
curl -X GET https://worker.thenewscc.com/quiz/available \
-H "Authorization: Bearer seu_token_jwt"
const response = await fetch('https://worker.thenewscc.com/quiz/available', {
method: 'GET',
headers: {
'Authorization': 'Bearer seu_token_jwt'
}
});
const data = await response.json();
{
"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
}
}
}
{
"success": false,
"message": "Token de autenticação inválido ou ausente"
}
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
Token JWT do usuário autenticadoFormato:
Bearer {token}Response
Indica se a operação foi bem-sucedida
Show Dados da resposta
Show Dados da resposta
Lista de quizzes disponíveis
Show Estrutura de cada quiz
Show Estrutura de cada quiz
ID único do quiz
Título do quiz
Descrição do quiz
Data do quiz (formato
YYYY-MM-DD para matinal, YYYY-MM-DD-night para noturna)Edição do quiz:
morning (matinal) ou night (noturna)ID do post do Beehiiv relacionado
Mínimo de acertos para passar (padrão: 6)
Se o usuário já tentou este quiz
curl -X GET https://worker.thenewscc.com/quiz/available \
-H "Authorization: Bearer seu_token_jwt"
const response = await fetch('https://worker.thenewscc.com/quiz/available', {
method: 'GET',
headers: {
'Authorization': 'Bearer seu_token_jwt'
}
});
const data = await response.json();
{
"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
}
}
}
{
"success": false,
"message": "Token de autenticação inválido ou ausente"
}
⌘I
