Skip to content

Conversation

@Tracreed
Copy link

@Tracreed Tracreed commented Dec 5, 2025

Description

The osu! API documentation specification for the ranked field (Beatmapset Rank Status) includes negative integer values:

  • -2: graveyard
  • -1: wip
  • 0: pending
  • 1: ranked
  • 2: approved
  • 3: qualified
  • 4: loved
    The current implementation defines it as a u32, which used to cause deserialization errors (invalid value: integer -2, expected u32) when fetching beatmaps with "graveyard" or "wip" status.
    This PR fixes the issue by changing the field type to i32. I've ran tests locally for this change that now allowed me to fetch certain maps it didn't successfully fetch before.

📋 Types of Changes

  • Bug fix (non-breaking change which fixes an issue)

Related Issue

None

Checklist

  • My code follows the code style of this project
  • I have updated the documentation accordingly (if applicable)
  • I have added tests to cover my changes
  • All new and existing tests passed

There weren't any existing tests so not sure where I would put them. I can provide my current test if requested. The map ID I tested with was 180708

The osu! API documentation defines 'ranked' status values that include negative integers (e.g. -2 for graveyard, -1 for wip). Changing the type to i32 allows correct parsing of these values.
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