src/Api/User.php
public function games($limit = 100) : array
    {
        $returnGames = [];

        $games = $this->get(sprintf(Game::GAME_ENDPOINT . 'users/%s/titles', $this->onlineIdParameter()), [
            'type'  => 'played',
            'app'   => 'richProfile', // ??
            'sort'  => '-lastPlayedDate',
            'limit' => $limit,
            'iw'    => 240, // Size of game image width
            'ih'    => 240  // Size of game image height
        ]);

        if ($games->size === 0) return $returnGames;

        foreach ($games->titles as $game) {
            $returnGames[] = new Game($this->client, $game->titleId, $this);
        }

        return $returnGames;
    }
public function games($limit = 100) : array
    {
        $returnGames = [];

        $games = $this->get(sprintf(Game::GAME_ENDPOINT . 'users/%s/titles', $this->onlineIdParameter()), [
            'type'  => 'played',
            'app'   => 'richProfile', // ??
            'sort'  => '-lastPlayedDate',
            'limit' => $limit,
            'iw'    => 240, // Size of game image width
            'ih'    => 240  // Size of game image height
        ]);

        if ($games->size === 0) return $returnGames;

        foreach ($games->titles as $game) {
            $returnGames[] = new Game($this->client, $game->titleId, $this);
        }

        return $returnGames;
    }
public function games ( $ limit = 100 ) : array { $ returnGames = [ ] ; $ games = $ this -> get ( sprintf ( Game :: GAME_ENDPOINT . 'users/%s/titles' , $ this -> onlineIdParameter ( ) ) , [ 'type' => 'played' , 'app' => 'richProfile' , // ?? 'sort' => '-lastPlayedDate' , 'limit' => $ limit , 'iw' => 240 , // Size of game image width 'ih' => 240 // Size of game image height ] ) ; if ( $ games -> size === 0 ) return $ returnGames ; foreach ( $ games -> titles as $ game ) { $ returnGames [ ] = new Game ( $ this -> client , $ game -> titleId , $ this ) ; } return $ returnGames ; }
Gets the User's Games played.

@return array Array of Api\Game.
Gets the User s Games played .