protected function getSessionId($url, $method = 'POST')
    {
        if ($this->makeRequest($url, $method) === false) {
            $this->printErrorMessage('Could not fetch a valid session id.');
            return false;
        }
        $location = $this->getResponseHeader('Location');
        $locationParameters = explode('/', $location);
        $id = end($locationParameters);
        if (strpos($id, '?') !== false) {
            // cars live pricing return apikey within the session for some reason.
            [$id, $others] = explode('?', $id, 2);
        }
        return $id;
    }
protected function getSessionId($url, $method = 'POST')
    {
        if ($this->makeRequest($url, $method) === false) {
            $this->printErrorMessage('Could not fetch a valid session id.');
            return false;
        }
        $location = $this->getResponseHeader('Location');
        $locationParameters = explode('/', $location);
        $id = end($locationParameters);
        if (strpos($id, '?') !== false) {
            // cars live pricing return apikey within the session for some reason.
            [$id, $others] = explode('?', $id, 2);
        }
        return $id;
    }
protected function getSessionId ( $ url , $ method = 'POST' ) { if ( $ this -> makeRequest ( $ url , $ method ) === false ) { $ this -> printErrorMessage ( 'Could not fetch a valid session id.' ) ; return false ; } $ location = $ this -> getResponseHeader ( 'Location' ) ; $ locationParameters = explode ( '/' , $ location ) ; $ id = end ( $ locationParameters ) ; if ( strpos ( $ id , '?' ) !== false ) { // cars live pricing return apikey within the session for some reason. [ $ id , $ others ] = explode ( '?' , $ id , 2 ) ; } return $ id ; }
If you make too many requests, then you will probably have issues on rate limiting.
So, until a non-empty location is received, it will make a request to get a session key.

In other words, until the rate limit is reset, it will make a request to obtain a session key

@param string $url
@param string $method

Message: Rate limit has been exceeded: 100 PerMinute for PricingSession

@return bool|string
@throws \GuzzleHttp\Exception\GuzzleException
If you make too many requests then you will probably have issues on rate limiting . So until a non - empty location is received it will make a request to get a session key .