private function getBaseUri($url)
    {
        if (null === $url) {
            throw new InvalidCredentialsException('invalid creddentials');
        }

        $parts = parse_url($url);

        if (empty($parts['scheme'])) {
            $parts['scheme'] = 'http';
        }

        return sprintf('%s://%s/%s/', $parts['scheme'], $parts['host'], 'rest');
    }
private function getBaseUri($url)
    {
        if (null === $url) {
            throw new InvalidCredentialsException('invalid creddentials');
        }

        $parts = parse_url($url);

        if (empty($parts['scheme'])) {
            $parts['scheme'] = 'http';
        }

        return sprintf('%s://%s/%s/', $parts['scheme'], $parts['host'], 'rest');
    }
@param string $url

@return string