public function buildEndpointUrl($customUrlPath, $params = []) { $url = $this->getBaseUrl() . $customUrlPath . "?apikey=" . $this->getApiKey(); if (!empty($params)) { $url .= '&' . http_build_query($params); } return $url; }