ion232 / lichess-api

A Rust API client for lichess.org
https://lichess.org/api
Apache License 2.0
9 stars 7 forks source link

fix: anonymous player deserialisation #54

Closed EpokTarren closed 4 months ago

EpokTarren commented 4 months ago

In games against anonymous players lichess returns {} for the player in GameEventInfo, by adding an Anonymous variant serde can correctly deserialise the json. For challenges from anonymous players lichess doesn't return a player at all.

ion232 commented 4 months ago

Thanks for putting in a PR to fix this - I particularly appreciate your inclusion of unit tests for this edge case.