src/YouTube.php
private function callApi($parameters)
    {
        $this->checkFilters($parameters);

        $handle     = curl_init();
        $finalUrl   = $this->apiUri . '?' . http_build_query($parameters) . '&key=' . $this->apiKey;

        curl_setopt_array($handle, [
            CURLOPT_HEADER         => false,
            CURLOPT_POST           => false,
            CURLOPT_RETURNTRANSFER => true,
            CURLOPT_URL            => $finalUrl,
        ]);

        $response = curl_exec($handle);
        curl_close($handle);

        return $response;
    }
private function callApi($parameters)
    {
        $this->checkFilters($parameters);

        $handle     = curl_init();
        $finalUrl   = $this->apiUri . '?' . http_build_query($parameters) . '&key=' . $this->apiKey;

        curl_setopt_array($handle, [
            CURLOPT_HEADER         => false,
            CURLOPT_POST           => false,
            CURLOPT_RETURNTRANSFER => true,
            CURLOPT_URL            => $finalUrl,
        ]);

        $response = curl_exec($handle);
        curl_close($handle);

        return $response;
    }
Perform a cURL call to the YouTube API using the $parameters payload and
of method $method.

@access  private
@param   array   $parameters An array of parameters to pass to the API.
@return  string