Closed chrisroman closed 10 years ago
+1
At the moment, we just use the output of Httparty. I'm not sure if that means Riot is returning an unordered list, or that it's getting mangled on our end, but either way you are right that it should be ordered.
Yeah, the API returns an unordered list - one of several weird issues with it (mastery pages aren't ordered either, and there's no way I know of to sort that). I think it'd make sense for us to just sort the response, since most people using the gem would want it sorted for displaying recent games.
It just returns the games in some random order (I'm not too sure how it's being given back). However, this code would return the games in order from the most recent to the least recent which would be more convenient.
Edit: Phew finally got the spaceship operator to show up