Example #1
0
 /**
  * Career constructor.
  *
  * @param string $battleTag
  * @param int $heroId
  * @param bool $forceFetch
  */
 public function __construct($battleTag, $heroId, $forceFetch = false)
 {
     $client = new Client('d3');
     // Get data.
     $path = 'profile/' . $battleTag . '/hero/' . intval($heroId);
     $this->data = $client->fetchData($path, [], '', $client->getSeconds(Cache::getLifetimeShort()), $forceFetch);
 }
Example #2
0
 /**
  * Character constructor.
  *
  * @param string $realm
  * @param string $character
  * @param bool $forceFetch
  */
 public function __construct($realm, $character, $forceFetch = false)
 {
     $client = new Client('wow');
     // Get data.
     $params = ['fields' => $this->fields];
     $path = 'character/' . $realm . '/' . $character;
     $this->data = $client->fetchData($path, $params, '', $client->getSeconds(Cache::getLifetimeShort()), $forceFetch);
 }
Example #3
0
 /**
  * Career constructor.
  *
  * @param string $battleTag
  * @param bool $forceFetch
  */
 public function __construct($battleTag, $forceFetch = false)
 {
     $client = new Client('d3');
     // Get data.
     $this->data = $client->fetchData('profile/' . $battleTag . '/', [], '', $client->getSeconds(Cache::getLifetimeShort()), $forceFetch);
 }