Closed janakerman closed 7 years ago
High level tests on EntityServiceImpl are incoming, but I think we can merge this now.
Don't like the giant constructors on LichessResultPage
, turns out you can't use .with {} on private properties, and since we're not using Groovy 2.5 it doesn't have all the nice @Builder annotations. I'm sure there's 101 builder/factory patterns to clean this up but not worth the time at the moment imo!
Also not sure about all the casting in LichessApiImpl - opinions there would be good. Going to merge anyway as I still think it's an improvement on what was already there.
Next work going forwards is testing all of the above properly and splitting out the 'get games' functionality from the 'scrape data from lichess' functionality as these will differ when we get the DB connected.
At the moment the latest games are just stored in a hashmap in the EntityService. We'll want to persist this at some point in the future when we start persisting our data.