[Contests] Add GET /v1/users/{id}/contests endpoint#791
Merged
dylanjeffers merged 1 commit intomainfrom May 7, 2026
Merged
Conversation
The profile Contests tab was fetching the global remix-contests list and filtering client-side by host userId, paginating up to 5 pages to avoid false-empty rendering for hosts whose contests sat past the first page. Add a dedicated per-user endpoint that filters server-side, mirroring the artist tracks/albums pattern. Reuses the response shape from /events/remix-contests (data + related users / tracks / entry_counts) so the web tab can keep the same primer code path. Documented in swagger and registered on both the handle and userId routes. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
GET /v1/users/{id}/contests(and/v1/users/handle/{handle}/contests), filtered server-side by host userId.GET /events/remix-contests(data+related users / tracks / entry_counts) so callers can keep the same primer code path.Endpoint
/users/{id}/contests(also/users/handle/{handle}/contests)limit(1-100, default 25),offset(default 0),status(active|ended|all, defaultall)end_date, then ended by most-recently-ended.api/swagger/swagger-v1.yaml.Test plan
go test ./api/ -run TestGetUserContests -v— 8 subtests pass (ordering, by-id and by-handle resolution, status filters, pagination, related primer, empty state).AudiusProject/apps#claude/artist-contests-endpoint) to verify the profile tab renders end-to-end against this branch.🤖 Generated with Claude Code