public function resolve($url, \GuzzleHttp\Message\Response $data, Event $event, Queue $queue)
    {
        $logger = $this->getLogger();
        $json = json_decode($data->getBody());
        $logger->info('resolve', array('url' => $url, 'json' => $json));

        if (isset($json->error)) {
            return $logger->warning(
                'Query response contained an error',
                array(
                    'url' => $url,
                    'error' => $json->error,
                )
            );
        }

        $entries = $json->items;
        if (!is_array($entries) || !$entries) {
            return $logger->warning(
                'Query returned no results',
                array('url' => $url)
            );
        }

        $entry = reset($entries);
        $replacements = $this->getReplacements($entry);
        $message = str_replace(
            array_keys($replacements),
            array_values($replacements),
            $this->responseFormat
        );
        $queue->ircPrivmsg($event->getSource(), $message);
    }