feat: Expose level progress percentage in profile API response #144

Merged
typosaurus merged 3 commits from typosaurus/112-expose-level-progress-percentage-in-profile-api-response into master 2026-07-27 01:40:06 +02:00
Showing only changes of commit ff49c8342a - Show all commits

View File

@ -41,9 +41,12 @@ four ways to sign requests.
method="GET",
path="/profile/{username}",
title="View a profile",
summary="Render a user profile, including an online-presence indicator (JSON exposes profile_online and profile_user.last_seen). Returns an HTML page.",
summary="Render a user profile, including an online-presence indicator (JSON exposes profile_online, profile_user.last_seen, xp_next_level, and xp_progress_pct). Returns an HTML page.",
auth="public",
interactive=True,
notes=[
"Level progress: `xp_next_level = level * 100` (total XP needed), `xp_progress_pct = xp % 100` (percentage towards next level). Both are also embedded in `profile_user`.",
],
params=[
field(
"username",
@ -793,3 +796,4 @@ four ways to sign requests.
),
],
}