private function getBeforeEvent(BeforeEvent $event)
    {
        $request = $event->getRequest();

        if ('api.embed.ly' === $request->getHost()) {
            $requestQuery = $request->getQuery();

            $requestQuery->setEncodingType(false);
            $requestQuery->set('key', $this->apiKey);

            $request->setQuery($requestQuery);
        }
    }