Fix tactics API: migrate to v2 endpoint - #5
Open
felprangel wants to merge 1 commit into
Open
Conversation
chessmadra.com moved the tactics endpoint from /api/v1/tactic (now 404)
to /api/v2/tactic, which also wraps the tactic in a {"tactic": ...}
envelope with camelCase fields instead of a flat snake_case body. Update
the endpoint and response parsing accordingly.
Also switch reqwest to rustls-tls instead of the default native-tls
backend, since native-tls pulls in openssl-sys, which fails to build
against newer OpenSSL/gcc toolchains.
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
chessmadra.commoved the tactics endpoint from/api/v1/tactic(now 404) to/api/v2/tactic, which is why the CLI stopped getting any response.{"tactic": ..., "count": N}envelope with camelCase fields (gameLink,ratingDeviation,numberPlays) instead of the old flat snake_case body — updated parsing to match.reqwestto therustls-tlsbackend instead of the defaultnative-tls, sincenative-tlspulls inopenssl-sys, which fails to build against newer OpenSSL/gcc toolchains (e.g. current Arch Linux).Test plan
cargo buildsucceeds/api/v1/tacticreturns 404 and/api/v2/tacticreturns a valid tactic viacurlagainst the live server