Skip to content

Add Global Ranking to /api/student/:username Response #92

@Yashaswini-K-P

Description

@Yashaswini-K-P

Problem

The planned student profile page would benefit from displaying a user's LeetCode Global Ranking. While the ranking is available from the LeetCode API, it is not currently exposed through the /api/student/:username endpoint.

Expected Behavior

Extend the /api/student/:username endpoint to include the user's global ranking in the API response.

Requirements

  • Extract the ranking from the LeetCode API response.
  • Include it in the /api/student/:username response.
  • Handle cases where ranking data is unavailable.
  • Maintain backward compatibility with existing API consumers.

Example Response

{
"username": "john123",
"ranking": 3264237,
"history": [...]
}

Metadata

Metadata

Labels

BackendTask mainly involving backendlevel:beginnerIndicates the difficultytype:featureNew feature or request

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions