Cmfcmf\OpenWeatherMap::buildUrl PHP Method

buildUrl() private method

Build the url to fetch weather data from.
private buildUrl ( $query, $units, $lang, $appid, $mode, string $url ) : boolean | string
$query
$units
$lang
$appid
$mode
$url string The url to prepend.
return boolean | string The fetched url, false on failure.
    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;
    }