Example PHP snippets for API access?

Hi there everyone,

I would like to play with the API through the PHP library found here:
(thanks to the pinned topic). I’m not a professional coder and it helps me a lot to see examples of PHP code that I can then modify to suit my needs but I’m having problems finding any usage of this library.

Does anyone know of any example scripts or snippets of PHP code that uses this library so I could see how to handle things like authenticating with blizz, retrieving auction data, etc?

Thanks for your time!

There is a sample API request on the readme of my project. You just need to add the compose package, require the namespace, set up your credentials and call the methods:

BlizzardApi\Configuration::$apiKey = '<YOUR APPLICATION ID>';
BlizzardApi\Configuration::$apiSecret = '<YOUR APPLICATION SECRET>';
BlizzardApi\Configuration::$region = Region::US;

$api_client = new \BlizzardApi\Wow\GameData\PlayableRace();
$data = $api_client->index();


You can also explore the automated tests of the library to see usages for every class: