Get user data from steam api.

@return void
@throws GuzzleException
178736
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]);
    }
1283201
public function GetPlayerSummaries($steamId = null)
    {
        // Set up the api details
        $this->method  = __FUNCTION__;
        $this->version = 'v0002';

        if ($steamId == null) {
            $steamId = $this->steamId;
        }

        $steamId = implode(',', (array)$steamId);

        $chunks = array_chunk(explode(',', $steamId), 100);

        $map = array_map([$this, 'getChunkedPlayerSummaries'], $chunks);

        $players = $this->compressPlayerSummaries($map);

        return $players;
    }
781054
protected function _get()
    {
        $subject = $this->_subject([
            'success' => true,
            'entity' => $this->_entity($this->_request()->getQuery() ?: null, ['validate' => false] + $this->saveOptions())
        ]);

        $this->_trigger('beforeRender', $subject);
    }
639418
function getUserProfile(key, steamID, callback) {
  var steam = new SteamWebAPI({ apiKey: key, format: 'json' });

  steam.getPlayerSummaries({
    steamids: [ steamID ],
    callback: function(err, result) {
      if(err) {
        return callback(err);
      }

      var profile = {
        provider: 'steam',
        _json: result.response.players[0],
        id: result.response.players[0].steamid,
        displayName: result.response.players[0].personaname,
        photos: [{
          value: result.response.players[0].avatar
        }, {
          value: result.response.players[0].avatarmedium
        }, {
          value: result.response.players[0].avatarfull
        }]
      };

      callback(null, profile);
    }
  });
}
1308460
private function collectTime(GuzzleRequestInterface $request)
    {
        $response = $request->getResponse();

        return array(
            'total'      => $response->getInfo('total_time'),
            'connection' => $response->getInfo('connect_time')
        );
    }
770716
public function getData()
    {
        if (! $this->getReturnUrl()) {
            $this->validate('notifyUrl');
        }

        $data = $this->getBaseAuthorizeData();

        // If a token is being used, then include the token data.
        // With a valid token or card reference, the user is just asked
        // for the CVV and not any remaining card details.

        $data = $this->getTokenData($data);

        // ReturnUrl is for legacy usage.

        $data['NotificationURL'] = $this->getNotifyUrl() ?: $this->getReturnUrl();

        // Set the profile only if it is LOW (for iframe use) or NORMAL (for full-page redirects)

        $profile = strtoupper($this->getProfile());

        if ($profile === static::PROFILE_NORMAL || $profile === static::PROFILE_LOW) {
            $data['Profile'] = $this->getProfile();
        }

        $createCard = $this->getCreateToken() ?: $this->getCreateCard();

        if ($createCard !== null) {
            $data['CreateToken'] = $createCard ? static::CREATE_TOKEN_YES : static::CREATE_TOKEN_NO;
        }

        return $data;
    }
655262
protected function getData()
    {
        if (empty($this->data) || !is_array($this->data)) {
            $this->init();
        }

        return $this->data;
    }
1060404
public function account()
    {
        $this->logger->debug("account: start");

        if (empty($this->access_key)) {
            throw new \Exception("access key not set");
        }

        $accountUrl = sprintf("%s/%s", $this->api_url, "account");
        $client = new \GuzzleHttp\Client();

        $result = $client->post($accountUrl, array(
            'multipart' => array(
                array(
                    'name' => 'accesskey',
                    'contents' => $this->access_key
                )
            ),
            'timeout' => $this->timeout
        ));

        $contents = $result->getBody()->getContents();
        $data = json_decode($contents, true);

        // check for non zero staus codes
        if (isset($data['flag']) && $data['flag'] > 0) {
            throw new \Exception($data['errortext']);
        }

        return $data;
    }
1171454
private function getOnlineUsers()
    {
        $date = Carbon::now()->subMinutes(
            config('arcanesoft.auth.track-activity.minutes', 5)
        );

        return $this->getCachedUsers()->filter(function (User $user) use ($date) {
            return ! is_null($user->last_activity) && $user->last_activity->gte($date);
        });
    }
496945
public function getUser()
    {

        // destroy previous content
        $this->destroyUserData();

        if ($this->user === false) {

            // get user

            $url = 'http://ulogin.ru/token.php?token=' . $this->getToken() . '&host=' . (new Request())->getHttpHost();
            $content = file_get_contents($url);
            $this->user = json_decode($content, true);

            // if use has error , destroy user data
            if ($this->destroyUserData() === true) {
                $this->logout();
            }
        }

        return $this->user;
    }
810735
public function getUsers() {
    $tmp = array();
    foreach ($this->htpwd as $key => $line) {
      if(empty($line) || !strpos($line,':')) continue;
      array_push($tmp,explode(":",$line)[0]);
    }
    return $tmp;
  }
1162399
protected function _getData()
    {
        $data = $this->getRepository()->fetch($this->getQuery(), AnDomain::FETCH_ENTITY_LIST);

        return $data;
    }
385026
function GetUserData(callback)
	{
		Log("Fetching user profile data");

		// get the current user's data
		parent.Get("https://vl.api.np.km.playstation.net/vl/api/v1/mobile/users/me/info", {}, function(error, data)
		{
			if (error)
			{
				Log("Error fetching user profile: " + error);
				if (callback) callback("Error fetching user profile: " + error);
				return;
			}

			if (!data.onlineId)
			{
				Log("Missing PSNId from profile result: " + JSON.stringify(data, null, 2));
				if (callback) callback("Missing PSNId from profile result: " + JSON.stringify(data, null, 2));
				return;
			}

			// store user ID
			Log("We're logged in as " + data.onlineId);
			auth_obj.username = data.onlineId;
			// store user's region too
			auth_obj.region = 	data.region;

			// save updated data object
			DoSave(function()
				{
					// return no error
					if (callback) callback(false);
				}
			);
			// supply self to let API know we are a token fetch function
		}, GetUserData);
	}
135838
public function getData()
    {
        $this->validate('merchantId', 'merchantPassword', 'acquirerId', 'transactionId');

        $data = [
            'AcquirerId'  => $this->getAcquirerId(),
            'MerchantId'  => $this->getMerchantId(),
            'Password'    => $this->getMerchantPassword(),
            'OrderNumber' => $this->getTransactionId()
        ];

        return $data;
    }
1097460
def get_user_stats_for_game(self, steamID, appID, format=None):
        
        parameters = {'steamid' : steamID, 'appid' : appID}
        if format is not None:
            parameters['format'] = format
        url = self.create_request_url(self.interface, 'GetUserStatsForGame', 2,
            parameters)
        data = self.retrieve_request(url)
        return self.return_data(data, format=format)
88516
public function send()
    {
        try {
            $response = $this->guzzleClient->request($this->method, $this->uri, $this->options);
        } catch (ClientException $e) {
            $this->handleApiException($e->getResponse()->getBody()->getContents());
        }

        return $this->getBody($response);
    }
17534
protected function getGuzzle()
    {
        $headers = array_merge([
            'Content-Type' => 'application/json',
            'Accept' => 'application/json'
        ], $this->additionalHeaders);

        // Сбрасываем доп. заголовки для последующих запросов
        $this->additionalHeaders = [];

        return new GuzzleClient([
            'headers' => $headers,
            'verify' => false
        ]);
    }