-
Notifications
You must be signed in to change notification settings - Fork 3
feat: add JSON output format #8
Copy link
Copy link
Open
Labels
enhancementNew feature or requestNew feature or request
Description
Summary
Add --json flag to output stats in JSON format for scripting and integration with other tools.
Interface
steamfetch --json # Pretty-printed JSON
steamfetch --json --compact # Minified JSON (single line)Output Example
{
"username": "unhappychoice",
"account_created": "2010-01-15",
"account_age_years": 16,
"steam_level": 42,
"games": {
"total": 486,
"unplayed": 123,
"unplayed_percent": 25
},
"playtime": {
"total_hours": 2847,
"top_games": [
{ "name": "Borderlands 3", "hours": 478 },
{ "name": "Coin Push RPG", "hours": 377 }
]
},
"recently_played": [
{ "name": "Elden Ring", "hours": 20, "minutes": 0 }
],
"achievements": {
"total": 3241,
"possible": 5892,
"percent": 55,
"perfect_games": 24,
"rarest": {
"name": "Impossible Task",
"game": "Dark Souls III",
"percent": 0.1
}
}
}Implementation
- Add
Serializederive toSteamStatsand related structs - Add
--jsonCLI flag - Use
serde_jsonfor serialization (already a dependency via reqwest)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request