Skip to content

Switch season rank API to user achievement endpoint - #192

Open
ToxicBiohazard wants to merge 1 commit into
mainfrom
fix/season-achievement-api-endpoint
Open

Switch season rank API to user achievement endpoint#192
ToxicBiohazard wants to merge 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.

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.

1 participant