Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Minor improvements to API v2 #2296

Merged
merged 1 commit into from
Dec 25, 2023
Merged

Conversation

Ninjaclasher
Copy link
Member

  • Sort all list endpoints by ID, which reduces the likelihood of objects moving between pages during requests. Objects will only shift if an object is deleted, which usually does not happen.
  • Add a list filter for ID (and other identifier fields), so users can request a list of only the objects they care about (rather than requesting all and then filtering on their side)
  • Use the rating from Profile.rating instead of re-computing it each time. This attribute should already be updated during each contest rate.

- Sort all list endpoints by ID, which reduces the likelihood of objects
  moving between pages during requests. Objects will only shift if an
  object is deleted, which usually does not happen.
- Add a list filter for ID (and other identifier fields), so users can
  request a list of only the objects they care about (rather than
  requesting all and then filtering on their side)
- Use the rating from Profile.rating instead of re-computing it each
  time. This attribute should already be updated during each contest
  rate.
@codecov-commenter
Copy link

Codecov Report

Attention: 1 lines in your changes are missing coverage. Please review.

Comparison is base (292ba1a) 46.83% compared to head (985fe9a) 46.84%.

Files Patch % Lines
judge/views/api/api_v2.py 66.66% 1 Missing ⚠️

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2296      +/-   ##
==========================================
+ Coverage   46.83%   46.84%   +0.01%     
==========================================
  Files         250      250              
  Lines       13275    13275              
==========================================
+ Hits         6217     6219       +2     
+ Misses       7058     7056       -2     

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

@Ninjaclasher
Copy link
Member Author

Docs PR: DMOJ/docs#154

Copy link
Member

@Xyene Xyene left a comment

Choose a reason for hiding this comment

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

LGTM, thanks!

@Xyene Xyene added this pull request to the merge queue Dec 25, 2023
Merged via the queue into DMOJ:master with commit 6baf5c3 Dec 25, 2023
3 checks passed
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.

3 participants