PHP code example of kasperfm / neoblizzy

1. Go to this page and download the library: Download kasperfm/neoblizzy library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

kasperfm / neoblizzy example snippets


   BATTLENET_API_KEY=abc123
   BATTLENET_API_SECRET=secret321
   BATTLENET_LOCALE=en_GB
   

   BATTLENET_ENABLE_CACHE=true
   BATTLENET_CACHE_TIMEOUT=120
   

   $wowChar = \NeoBlizzy::make()->setRegion('eu')->wowApi()->getCharacterData('Zomixiana', 'Tarren Mill');
   

   dd($wowChar);
   
   // The result of the dd($wowChar) function.
   KasperFM\NeoBlizzy\Services\WoW\CharacterHelper {
     #name: "Zomixiana"
     #realm: "Tarren Mill"
     #gender: "Female"
     #level: 56
     #exp: 78491
     #achievementPoints: 4375
     #faction: "Horde"
     #race: "Undead"
     #class: "Mage"
     #currentSpec: "Frost"
     #avatarUrl: "https://render.worldofwarcraft.com/eu/character/tarren-mill/122/174314618-avatar.jpg"
     #characterDisplayUrl: "https://render.worldofwarcraft.com/eu/character/tarren-mill/122/174314618-main.jpg" }


   dd($wowChar->getName());
   // The result of the getName() function on the $wowChar object.
   "Zomixiana"