Skip to content

Switch season rank API to user achievement endpoint - #192

Merged
dimoschi merged 1 commit into
mainfrom
fix/season-achievement-api-endpoint
Sep 21, 2026
Merged

dimoschi merged 1 commit into
mainfrom
fix/season-achievement-api-endpoint

Conversation

@ToxicBiohazard

Copy link
Copy Markdown
Member

Types of changes

What types of changes does your code introduce?
Put an x in the boxes that apply.

  • Bugfix (non-breaking change which fixes an issue).
  • New feature (non-breaking change which adds functionality).
  • Breaking change (fix or feature that would cause existing functionality not to work as expected).
  • Documentation Update (if none of the other choices applies).

Proposed changes

Update get_season_rank to call v4/user/achievement/season/{userId}/{modelId} instead of the old v4/season/end/{seasonId}/{userId} endpoint.

Per @shad0wn0mad (platform), we were asked to switch to this endpoint; they confirmed the response schema is the same, so existing rank/tier parsing is unchanged.

Also adds unit coverage for the new URL and empty-data handling.

Checklist

Put an x in the boxes that apply.

  • I have read and followed the CONTRIBUTING.md
    doc.
  • Lint and unit tests pass locally with my changes.
  • I have added the necessary documentation (if appropriate).

Additional context

  • Old: {API_V4_URL}/season/end/{SEASON_ID}/{htb_uid}
  • New: {API_V4_URL}/user/achievement/season/{htb_uid}/{SEASON_ID}

Made with Cursor

Use /v4/user/achievement/season/{userId}/{modelId} instead of the deprecated /season/end route.

Co-authored-by: Cursor <cursoragent@cursor.com>
@codecov

codecov Bot commented Sep 7, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 66.60%. Comparing base (1abfd4b) to head (7de98db).

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #192      +/-   ##
==========================================
+ Coverage   66.54%   66.60%   +0.06%     
==========================================
  Files          54       54              
  Lines        3177     3177              
==========================================
+ Hits         2114     2116       +2     
+ Misses       1063     1061       -2     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@dimoschi dimoschi left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@dimoschi
dimoschi merged commit 76b2f25 into main Sep 21, 2026
4 checks passed
@dimoschi
dimoschi deleted the fix/season-achievement-api-endpoint branch September 21, 2026 09:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants