Closed pcg79 closed 10 years ago
Yeah as we get to the bigger returns from the API, it's going to be pretty unwieldy to get data out of it :+1:
Hashie can be a bit weird with it's implementations sometimes, and the data doesn't seem super consistant (Some is quoted, some isn't etc...)
It might be easier to use something else, it should be easy enough to switch up the middleware in Faraday, take the JSON output and then feed it into Virtus?
You should pull https://github.com/petems/riot_api/pull/11 first.
Froggen has an awful lot of league data. :frog:
This feature, I think, underscores the need to implement classes instead of using Hashie. I found some weirdness when testing the feature in irb:
Where all other API call results I could call a method on the Hashie result, here I have to use Array notation. I have no idea why, I've never used Hashie that much. And b/c I've never used Hashie that much I don't know how hard/easy it'll be to implement classes. I've done a little work with Virtus (https://github.com/solnic/virtus) so hopefully they are similar.