Ejemplo n.º 1
0
 /**
  * @param $userId
  * @param $from
  * @param $to
  * @return array
  */
 protected function fetchInventory($userId, $from, $to)
 {
     $inventory = $this->steamSchema->queryPlayerInventory(570, $userId)->where(function ($row) {
         return $row['tradable'];
     })->slice($from, $to)->get();
     usort($inventory, [ItemStorage::getItemClass(570), 'sortByPrice']);
     return $inventory;
 }
Ejemplo n.º 2
0
 public function getItem()
 {
     if (!$this->item) {
         $steam = new APIBridge(\Config::get('steam-api.api_key'));
         $this->item = $steam->queryPlayerInventory($this->app_id, $this->bot_steam_id)->findByClassID($this->class_id);
     }
     return $this->item;
 }
Ejemplo n.º 3
0
 public function getSteamLink()
 {
     $api = new APIBridge(\Config::get('steam-api.api_key'));
     return $api->parseSteamID($this->steam_id)['profileurl'];
 }