curl "https://api.hitler.app/api/moods/stats?days=30" \
-H "Authorization: Bearer YOUR_TOKEN"
const stats = await api.getMoodStats({ days: 30 });
{
"averageMood": 3.7,
"totalEntries": 22,
"moodTrend": "improving",
"distribution": {
"1": 0,
"2": 2,
"3": 8,
"4": 10,
"5": 2
}
}
Moods
Mood Statistics
Get mood statistics for the current user
GET
/
api
/
moods
/
stats
curl "https://api.hitler.app/api/moods/stats?days=30" \
-H "Authorization: Bearer YOUR_TOKEN"
const stats = await api.getMoodStats({ days: 30 });
{
"averageMood": 3.7,
"totalEntries": 22,
"moodTrend": "improving",
"distribution": {
"1": 0,
"2": 2,
"3": 8,
"4": 10,
"5": 2
}
}
This endpoint requires authentication.
Query Parameters
integer
default:"30"
Number of days to analyze (max 365)
Response
number
Average mood score over the period
integer
Number of mood entries in the period
string
Trend direction:
improving, stable, or decliningobject
Count of entries per mood value
curl "https://api.hitler.app/api/moods/stats?days=30" \
-H "Authorization: Bearer YOUR_TOKEN"
const stats = await api.getMoodStats({ days: 30 });
{
"averageMood": 3.7,
"totalEntries": 22,
"moodTrend": "improving",
"distribution": {
"1": 0,
"2": 2,
"3": 8,
"4": 10,
"5": 2
}
}