rubensayshi / gw2spidy

GW2Spidy - Guild Wars 2 Tradingpost Graphs
http://www.gw2spidy.com
231 stars 86 forks source link

result and results #170

Open Gallion opened 9 years ago

Gallion commented 9 years ago

It would be nice if you used only one, but not both. Because of this, we can't make universal functions that retrieve and handle JSON item data without doing a check to see whether the key is called "results" or "result". If the number of results is important in how the data is handled, then you should let us take care of that. Like right now, a function that takes care of parsing "Full Item List" and "Item List" can't parse Item Data without doing an additional check, which seems silly to me, since everything except for "result" is the same. It's a matter of forcing us to do the check when we don't need it versus letting people do the check only when they need it.

rubensayshi commented 9 years ago

hmm, I understand and apologize for it being inconsistent!

but unfortunately I can't fix it ... because that would break everyones code that has already adapted to it ... :(

JurgenCruz commented 9 years ago

You can add a new method to be called that solves this issue and mark the old method as deprecated and remove it in a future release.