build url from args

def _build_url(self, host, sport, method, id, format, parameters):
        """
            build url from args
        """
        path = "/".join(filter(None, (sport, method, id)))
        url = "https://" + host + "/" + path + "." + format
        if parameters:
            paramstring = urllib.parse.urlencode(parameters)
            url = url + "?" + paramstring
        return url