Пример #1
0
 /**
  * Return the players stats
  *
  * @return \Burthorpe\Runescape\RS3\Stats\Repository
  */
 public function getStats()
 {
     if ($this->stats) {
         return $this->stats;
     }
     return $this->stats = $this->api->stats($this->getDisplayName());
 }
Пример #2
0
 /**
  * Get the users skills stats.
  *
  * @return \Illuminate\Support\Collection
  */
 protected function getStats(SkillContract $skill = null)
 {
     if ($this->stats) {
         $stats = $this->stats;
     } else {
         $stats = $this->api->stats($this->getUsername());
     }
     return !is_null($skill) ? $stats->get($skill->getName()) : $stats;
 }
Пример #3
0
 public function testStatsWithInvalidDisplayName()
 {
     $this->expectException(\Burthorpe\Exception\UnknownPlayerException::class);
     $eoc = new API();
     $eoc->stats('thisdisplaynameisjusttoolong');
 }