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.
This PR revisits #3 without a thrashed commit history or zprint-induced whitespace noise diffs.
I have been trying to get this to work for a couple of hours by stepping through a macroexpansion of
defparser
and manually testing a call tofetch-player-season-ranked-stats
, but no luck so far. I could use some nudging toward a solution.The standard unranked stats returned by
fetch-player-season-stats
looks like this.The ranked endpoint returns this:
The shape of both structures is identical, which I have emphasized with some effort at alignment. From digging in
parsers.clj
I have concluded thatplayer-season-ranked-stats-parse
essentially just does a fancy call toget-in
. It uses the vector value of:from
to traverse the nested map and sets the value of each key inseason-stats-parse
, which again uses a:from [:keys]
approach. It appears to not know anything more than the fact that:game-mode-stats
is a key to a map containing relevant stats data.Given the fact that the ranked stats data has exactly the same shape, I would expect a first draft implementing ranked stats would be able to safely copy and paste the approach for unranked stats. However, the
:season-ranked-stats
key result is just an empty vector. I cannot understand why this happens. I'm traversing an identical data structure with an identical approach, but I capture no data.