src/Api/Game.php
public function players() : array 
    {
        $returnPlayers = [];

        $players = $this->get(sprintf(self::GAME_ENDPOINT . 'titles/%s/players', $this->titleId));

        if ($players->size === 0) return $returnPlayers;

        foreach ($players->data as $player) {
            $returnPlayers[] = new User($this->client, $player->onlineId);
        }

        return $returnPlayers;
    }
public function players() : array 
    {
        $returnPlayers = [];

        $players = $this->get(sprintf(self::GAME_ENDPOINT . 'titles/%s/players', $this->titleId));

        if ($players->size === 0) return $returnPlayers;

        foreach ($players->data as $player) {
            $returnPlayers[] = new User($this->client, $player->onlineId);
        }

        return $returnPlayers;
    }
public function players ( ) : array { $ returnPlayers = [ ] ; $ players = $ this -> get ( sprintf ( self :: GAME_ENDPOINT . 'titles/%s/players' , $ this -> titleId ) ) ; if ( $ players -> size === 0 ) return $ returnPlayers ; foreach ( $ players -> data as $ player ) { $ returnPlayers [ ] = new User ( $ this -> client , $ player -> onlineId ) ; } return $ returnPlayers ; }
Gets the Users who have played this game.

@return array Array of Api\User.
Gets the Users who have played this game .