paquettg / leaguewrap

League of Legend API wrapper
MIT License
67 stars 28 forks source link

Unable to retrieve proper champion data. #66

Closed zperkinson closed 9 years ago

zperkinson commented 9 years ago
$champs = $api->champion()->free();
        $champions = array();
        foreach($champs as $champ) {
            $champions[] = $api->champion()->championById($champ->id);
        }

The above is my code. I'm trying to retrieve the information about the free champions, including their names, etc. But I can't seem to figure it out and this throws an error for some reason.

paquettg commented 9 years ago

What error is being trown?

zperkinson commented 9 years ago

It would list all champions inside of each object. I've changed my code and made it work, but this issue just may be on me.