/**
  * @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;
 }
Пример #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;
 }
Пример #3
0
 public function getSteamLink()
 {
     $api = new APIBridge(\Config::get('steam-api.api_key'));
     return $api->parseSteamID($this->steam_id)['profileurl'];
 }