@classmethod
    def build_api_url(cls, path, query_params=None,
                      api_base_url=None, api_version=None):
        url = cls.API_URL_TEMPLATE.format(
            api_base_url=(api_base_url or cls.API_BASE_URL),
            api_version=(api_version or cls.API_VERSION),
            path=path)

        query_params = query_params or {}
        if query_params:
            url += '?' + urlencode(query_params)

        return url
Construct an API url given a few components, some optional.
dataset/ETHPy150Open GoogleCloudPlatform/gcloud-python/gcloud/connection.py/JSONConnection.build_api_url