public function fetchGames() {
        $params = [
                'steamid' => $this->getSteamId64(),
                'include_appinfo' => 1,
                'include_played_free_games' => 1
        ];
        $gamesData = WebApi::getJSONObject('IPlayerService', 'GetOwnedGames', 1, $params);

        foreach ($gamesData->response->games as $gameData) {
            $game = SteamGame::create($gameData);
            $this->games[$game->getAppId()] = $game;
            if (property_exists($gameData, 'playtime_2weeks')) {
                $recent = $gameData->playtime_2weeks;
            } else {
                $recent = 0;
            }
            $total = $gameData->playtime_forever;
            $this->playtimes[$game->getAppId()] = [$recent, $total];
        }

        return $this->games;
    }
public function fetchGames() {
        $params = [
                'steamid' => $this->getSteamId64(),
                'include_appinfo' => 1,
                'include_played_free_games' => 1
        ];
        $gamesData = WebApi::getJSONObject('IPlayerService', 'GetOwnedGames', 1, $params);

        foreach ($gamesData->response->games as $gameData) {
            $game = SteamGame::create($gameData);
            $this->games[$game->getAppId()] = $game;
            if (property_exists($gameData, 'playtime_2weeks')) {
                $recent = $gameData->playtime_2weeks;
            } else {
                $recent = 0;
            }
            $total = $gameData->playtime_forever;
            $this->playtimes[$game->getAppId()] = [$recent, $total];
        }

        return $this->games;
    }
public function fetchGames ( ) { $ params = [ 'steamid' => $ this -> getSteamId64 ( ) , 'include_appinfo' => 1 , 'include_played_free_games' => 1 ] ; $ gamesData = WebApi :: getJSONObject ( 'IPlayerService' , 'GetOwnedGames' , 1 , $ params ) ; foreach ( $ gamesData -> response -> games as $ gameData ) { $ game = SteamGame :: create ( $ gameData ) ; $ this -> games [ $ game -> getAppId ( ) ] = $ game ; if ( property_exists ( $ gameData , 'playtime_2weeks' ) ) { $ recent = $ gameData -> playtime_2weeks ; } else { $ recent = 0 ; } $ total = $ gameData -> playtime_forever ; $ this -> playtimes [ $ game -> getAppId ( ) ] = [ $ recent , $ total ] ; } return $ this -> games ; }
Fetches the games this user owns

@see getGames()
@throws SteamCondenserException if an error occurs while parsing the
data
Fetches the games this user owns