Skip to main content
GET
/
streaks
/
export-emails
curl --request GET \
  --url 'https://backend.testeswaffle.org/streaks/export-emails?streak_type=current_streak&streak_value=30&comparison=greater_than' \
  --header 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...' \
  --output usuarios_streak.csv
email,current_streak,max_streak,total_reads,last_read_date,created_at
usuario1@exemplo.com,45,50,120,2024-01-20,2023-10-15
usuario2@exemplo.com,32,32,95,2024-01-20,2023-11-20
usuario3@exemplo.com,31,60,180,2024-01-19,2023-08-10

Documentation Index

Fetch the complete documentation index at: https://docs.thenewscc.com.br/llms.txt

Use this file to discover all available pages before exploring further.

Descrição

Exporta emails de usuários filtrados por critérios de streak em formato CSV. Requer autenticação JWT.

Headers

Authorization
string
required
Token JWT no formato: Bearer

Query Parameters

start_date
string
Data inicial no formato YYYY-MM-DD
end_date
string
Data final no formato YYYY-MM-DD
streak_type
string
Tipo de filtro: current_streak ou max_streak
streak_value
number
Valor do streak para filtrar
comparison
string
Tipo de comparação: greater_than, less_than, equal_to

Response

Retorna um arquivo CSV com os dados dos usuários que atendem aos critérios.

Campos do CSV

  • email: Email do usuário
  • current_streak: Streak atual
  • max_streak: Maior streak alcançado
  • total_reads: Total de leituras
  • last_read_date: Data da última leitura
  • created_at: Data de registro
curl --request GET \
  --url 'https://backend.testeswaffle.org/streaks/export-emails?streak_type=current_streak&streak_value=30&comparison=greater_than' \
  --header 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...' \
  --output usuarios_streak.csv
email,current_streak,max_streak,total_reads,last_read_date,created_at
usuario1@exemplo.com,45,50,120,2024-01-20,2023-10-15
usuario2@exemplo.com,32,32,95,2024-01-20,2023-11-20
usuario3@exemplo.com,31,60,180,2024-01-19,2023-08-10

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Query Parameters

start_date
string<date>

Data inicial (YYYY-MM-DD)

end_date
string<date>

Data final (YYYY-MM-DD)

streak_type
enum<string>

Tipo de filtro de streak

Available options:
current_streak,
max_streak
streak_value
number

Valor do streak para filtrar

comparison
enum<string>

Tipo de comparação

Available options:
greater_than,
less_than,
equal_to

Response

200 - text/csv

Arquivo CSV com os dados

The response is of type string.