protected function buildOEmbedRequestUrl($resource, $endPoint, $format = self::FORMAT_DEFAULT)
    {
        $parameters = [
            'url' => $resource,
            'format' => $format,
            'version' => self::VERSION
        ];

        if ($this->getRequestParameters() !== null) {
            $parameters = Arrays::arrayMergeRecursiveOverrule($this->getRequestParameters()->toArray(), $parameters);
        }

        $urlParams = http_build_query($parameters, '', '&');
        $url = $endPoint . ((strpos($endPoint, '?') !== false) ? '&' : '?') . $urlParams;

        return $url;
    }