public function parseInfo(): void
    {
        if (is_null($this->steamId)) {
            return;
        }

        if (empty(Config::get('steam-auth.api_key'))) {
            throw new RuntimeException('The Steam API key has not been specified.');
        }

        $response = $this->guzzleClient->request(
            'GET',
            sprintf(self::STEAM_INFO_URL, Config::get('steam-auth.api_key'), $this->steamId)
        );
        $json = json_decode($response->getBody(), true);

        $this->steamInfo = new SteamInfo($json['response']['players'][0]);
    }
public function parseInfo(): void
    {
        if (is_null($this->steamId)) {
            return;
        }

        if (empty(Config::get('steam-auth.api_key'))) {
            throw new RuntimeException('The Steam API key has not been specified.');
        }

        $response = $this->guzzleClient->request(
            'GET',
            sprintf(self::STEAM_INFO_URL, Config::get('steam-auth.api_key'), $this->steamId)
        );
        $json = json_decode($response->getBody(), true);

        $this->steamInfo = new SteamInfo($json['response']['players'][0]);
    }
public function parseInfo ( ) : void { if ( is_null ( $ this -> steamId ) ) { return ; } if ( empty ( Config :: get ( 'steam-auth.api_key' ) ) ) { throw new RuntimeException ( 'The Steam API key has not been specified.' ) ; } $ response = $ this -> guzzleClient -> request ( 'GET' , sprintf ( self :: STEAM_INFO_URL , Config :: get ( 'steam-auth.api_key' ) , $ this -> steamId ) ) ; $ json = json_decode ( $ response -> getBody ( ) , true ) ; $ this -> steamInfo = new SteamInfo ( $ json [ 'response' ] [ 'players' ] [ 0 ] ) ; }
Get user data from steam api.

@return void
@throws GuzzleException
Get user data from steam api .