1n9i9c7om / ClashOfClans-API-PHP

PHP wrapper for SuperCell's official ClashOfClans API.
MIT License
34 stars 14 forks source link

Problem in returning top Clans/Players #7

Closed ghost closed 8 years ago

ghost commented 8 years ago

Please take a look at the "getRankList" function in class.API.php. it returns the top clans all the time! i have debug it myself but you check it out!

beside please remove all json_decodes , many people want the json_encode and the should call json_encode again!

thanks!

1n9i9c7om commented 8 years ago

Pretty dumb mistake from my side in the API.class.php, sorry about that. It has been fixed in the latest commit. Thanks for reporting!

The json_decodes are going to stay for now, as this API is supposed to allow working with the API without having to deal with the actual JSON code. That's why I'm using json_decode to get objects. If you want it to work differently, feel free to create a fork, but keep in mind that it'd require some work in the other files as well.