Builds url for normal FM requests.
559252
def _buildUrl(self):
		""""""
		return '%(protocol)s://%(host)s:%(port)s%(address)s'%{
			'protocol': self._protocol,
			'host': self._host,
			'port': self._port,
			'address': self._address,
		}
660637
def _build_url(*args, **kwargs) -> str:
    
    resource_url = API_RESOURCES_URLS
    for key in args:
        resource_url = resource_url[key]

    if kwargs:
        resource_url = resource_url.format(**kwargs)

    return urljoin(URL, resource_url)
569235
def url_for_hit(hit, default="#"):
    """"""
    try:
        object_type = hit["object_type"]
        object_id = int(hit["id"])
        return current_app.default_view.url_for(hit, object_type, object_id)
    except KeyError:
        return default
    except Exception:
        logger.error("Error building URL for search result", exc_info=True)
        return default
628863
def _construct_url(self, endpoint):
        """"""
        parsed_url = urlparse(self.host)
        scheme = parsed_url[0]
        host = parsed_url[1]
        # Handle host without a scheme specified (eg. www.example.com)
        if scheme == "":
            scheme = "http"
            host = self.host

        if not endpoint.startswith("/"):
            endpoint = "/" + endpoint
        if self.config["api_version"] is not None:
            endpoint = "/v%d%s" % (self.config["api_version"], endpoint)
        return urlunparse((scheme, host, endpoint, '', '', ''))
1116121
def buildURL(self, action, **query):
        """"""
        base = urlparse.urljoin(self.server.base_url, action)
        return appendArgs(base, query)
830798
def build_url(self):
        """"""

        if not self.api_filters:
            return self.url

        # Reduce complex objects to simpler strings
        for k, v in self.api_filters.items():
            if isinstance(v, datetime):  # datetime > UNIX timestamp
                self.api_filters[k] = int(calendar.timegm(v.timetuple()))
            if isinstance(v, (tuple, list)):  # tuples & lists > x,y,z
                self.api_filters[k] = ",".join([str(_) for _ in v])

        if (
            self.id_filter in self.api_filters and
            len(str(self.api_filters[self.id_filter])) > self.URL_LENGTH_LIMIT
        ):
            self.build_url_chunks()
            return self.split_urls.pop(0)

        filters = '&'.join("%s=%s" % (k, v) for (k, v) in self.api_filters.items())

        return "%s?%s" % (self.url, filters)
521866
private StringBuilder buildURL(String urlParameter, String urlData) {
        StringBuilder tvrageURL = new StringBuilder();
        tvrageURL.append(API_SITE);
        tvrageURL.append(urlParameter);
        tvrageURL.append("?key=");
        tvrageURL.append(apiKey);
        tvrageURL.append("&");

        if (urlParameter.equalsIgnoreCase(API_SEARCH)) {
            tvrageURL.append("show=").append(urlData);
        } else if (urlParameter.equalsIgnoreCase(API_SHOWINFO)) {
            tvrageURL.append("sid=").append(urlData);
        } else if (urlParameter.equalsIgnoreCase(API_EPISODE_LIST)) {
            tvrageURL.append("sid=").append(urlData);
        } else if (urlParameter.equalsIgnoreCase(API_EPISODE_INFO)) {
            tvrageURL.append("sid=").append(urlData);
            // Note this needs the season & episode appending to the url
        } else {
            return new StringBuilder(UNKNOWN);
        }

        LOG.trace("Search URL: {}", tvrageURL);
        return tvrageURL;
    }
1205206
def base_url(self):
        """"""
        if self.location in self.known_locations:
            return self.known_locations[self.location]
        elif '.' in self.location or self.location == 'localhost':
            return 'https://' + self.location
        else:
            return 'https://' + self.location + API_HOST_SUFFIX
808966
def _build_url(self, host, sport, method, id, format, parameters):
        
        path = "/".join(filter(None, (sport, method, id)))
        url = "https://" + host + "/" + path + "." + format
        if parameters:
            paramstring = urllib.parse.urlencode(parameters)
            url = url + "?" + paramstring
        return url
385167
def _build_url(self, shorten=True):
        """"""
        url_order = self._get_url_params(shorten=shorten)

        # For fast ratings, switch weekday and category in url
        if self.category != 'final':
            url_order[1], url_order[2] = url_order[2], url_order[1]
        self.url = URL_FORMAT.format(*url_order)
1123643
def _build_url(self, api_call):
        
        if self.api_version in ('1.13.0', '1.13.0+update.1', '1.13.0+update.2'):
            if '/' not in api_call:
                return "{0}/{1}/index.json".format(self.site_url, api_call)
        return "{0}/{1}.json".format(self.site_url, api_call)
542015
def _build_url(self):
        """"""
        self.connection["upload_url"] = (
            "%s/%s" % (self.connection["jss"].base_url, "dbfileupload"))
        self.connection["delete_url"] = (
            "%s/%s" % (self.connection["jss"].base_url,
                       "casperAdminSave.jxml"))
946189
def _buildFileUrl(self, xml_req):
		""""""
		return '%(protocol)s://%(host)s:%(port)s%(xml_req)s'%{
			'protocol': self._protocol,
			'host': self._host,
			'port': self._port,
			'xml_req': xml_req,
		}
848338
def url(proto, server, port=None, uri=None):
        """"""
        url_parts = [proto, '://', server]
        if port:
            port = int(port)
            if port < 1 or port > 65535:
                raise ValueError('invalid port value')
            if not ((proto == 'http' and port == 80) or
                    (proto == 'https' and port == 443)):
                url_parts.append(':')
                url_parts.append(str(port))

        if uri:
            url_parts.append('/')
            url_parts.append(requests.utils.quote(uri.strip('/')))

        url_parts.append('/')
        return ''.join(url_parts)
724176
private function buildUrl($query, $units, $lang, $appid, $mode, $url)
    {
        $queryUrl = $this->buildQueryUrlParameter($query);

        $url = $url."$queryUrl&units=$units&lang=$lang&mode=$mode&APPID=";
        $url .= empty($appid) ? $this->apiKey : $appid;

        return $url;
    }
452222
def requests_url(self, ptype, **data):
        
        options = {
            'type': ptype,
            'pt': '3.1',
            'channel': self._channel_id,
            'pb': '320',
            'from': 'mainsite',
            'r': '',
            'kbps': '320',
            'app_name': 'radio_website',
            'client': 's:mainsite|y:3.0',
            'version': '100'
        }
        if 'sid' in data:
            options['sid'] = data['sid']
        url = 'https://douban.fm/j/v2/playlist'
        while True:
            try:
                s = requests.get(url, params=options,
                                 cookies=self._cookies, headers=HEADERS)
                req_json = s.json()
                if req_json['r'] == 0:
                    if 'song' not in req_json or not req_json['song']:
                        break
                    return req_json['song'][0]
            except Exception as err:
                raise APIError(err)
                break
        return None
964853
def url_for(self, *args: str, **kwargs: str) -> URL:
        """"""
        return self._resource.url_for(*args, **kwargs)