iamfmjk / etsy

A friendly Ruby interface to the Etsy API
https://github.com/kytrinyx/etsy
MIT License
170 stars 113 forks source link

Inconsistent Response#result #85

Open vinhboy opened 10 years ago

vinhboy commented 10 years ago

Does anyone find it weird that Response#result

https://github.com/kytrinyx/etsy/blob/master/lib/etsy/response.rb#L52-L60

sometimes return an Array and sometimes a Hash?

I think would be better if it just consistently returns an Array even if count == 1

This is problematic when you are iterating over what you'd expect to be an Array, but then is a Hash.

kytrinyx commented 10 years ago

Yeah, I'd be cool with always making it an array, but it will break backward-compatibility so we'll need to provide a warning on upgrade/install.