Repository navigation
WVDSH-2269: add leaderboard list, create, and update commands - #74
Open
franzwarning wants to merge 1 commit into
Open
franzwarning wants to merge 1 commit into
franzwarning wants to merge 1 commit into
Conversation
wavedash leaderboard create/update/list wrap the HTTP API's leaderboard endpoints. update addresses a board by --id or --name. A 404 is only reported as "Game not found" when the API says so, so a missing leaderboard or build gets its own message. Part of WVDSH-2269. Co-Authored-By: Claude Opus 5.5 <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.
Linear: WVDSH-2269 — create and update leaderboards from the CLI.
Requires the backend in https://github.com/wvdsh/wavedash/pull/1232 for
listandcreate;updateuses thePATCHendpoint that's already live.Commands
--game-id/WAVEDASH_GAME_ID/wavedash.tomllike the stat and achievement commands.createdefaults match the Developer Portal:desc(higher is better),numeric, visible.--hidden/--hidden <bool>followachievement's--secretflag-on-create, value-on-update pattern; the CLI maps it onto the API'svisible.updaterequires exactly one of--id/--name(a clap group), sends only the flags passed, and refuses an empty update locally. Names are percent-encoded into theby-namepath segment.listfollowsnextCursoruntil every page is fetched.check_api_responseused to turn every JSON 404 into "Game not found… runwavedash init". It now does that only when the API saysGame not found, soleaderboard update --name typoprintsLeaderboard not found(the build-status route's "Build not found in this game" 404 had the same problem).Demo (real dev deployment)
Desktop: commands in the terminal panel at the bottom drive the Developer Portal, which updates live.
▶ desktop.mp4
Mobile:
update --sort-order ascre-ranks the scores on the game page, then--hidden truehides the board.▶ mobile.mp4
Error paths (real output):
Testing
update_urlencoding,update_bodyfield selection, response parsing/round-trip, the--id/--namegroup, andcreatedefaults.cargo test: 87 passed.cargo clippy --all-targets: clean. Touched code is rustfmt-clean (mainalready has unrelated drift inbuild.rs/config.rs, left alone).CONVEX_HTTP_URLpointed at the dev deployment and ran list/create/update (by name and by ID),--json, a duplicate create, an unknown name, a malformed ID, an empty update, and--id+--nametogether.No version bump. That's left for the release.
🤖 Generated with Claude Code