jyggen / bnet

Battle.net API Client - A PHP 7.1+ library for working with the Battle.net APIs.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Does not handle invalid API Key gracefully

garretthunter opened this issue · comments

Have been enjoying the elegance of your code. While doing some edge testing I found an issue:
...
$factory = new \Pwnraid\Bnet\ClientFactory('xyz');
$client = $factory->warcraft(new \Pwnraid\Bnet\Region(\Pwnraid\Bnet\Region::US));
$realms = $client->realms()->all();

Results in:
Fatal error: Call to undefined method GuzzleHttp\Psr7\Response::json() in pwnraid\bnet\src\Core\AbstractClient.php on line 201

Fixed in 56adc9c. Thanks for the bug report!