bshaffer / php-echonest-api

PHP classes for the Echo Nest API
MIT License
98 stars 41 forks source link

minor change to get the "total" items with reviews, videos, news etc... #6

Closed ayhid closed 13 years ago

ayhid commented 13 years ago

returning raw response for some methods , so one could add pagination logic

bshaffer commented 13 years ago

This is a very valid change. I'm worried about it breaking backwards compatibility though. Also, there are other APIs that may need to be changed as well. We need to revise those, and make changes to all APIs at once if we are to use this convention.

I was afraid this day would come...

Thanks for your contribution!

ayhid commented 13 years ago

Hey thanks for the anwser, we might do somthin like this https://gist.github.com/60af5845a9709cc016bd

bshaffer commented 13 years ago

Yeah. I would even argue it would be better to pass a setting to the API, as in $echonest->getArtistApi($raw = true);

bshaffer commented 13 years ago

Implemented the above solution. See the Response section of the readme for an explanation.

I think if i ever make a PHP5.3 version, or if I just feel like it, I might update the API to return the full response every time. What do you think?

ayhid commented 13 years ago

I think that make sense, if you need with that don't hesitate, I'll be happy to contribute