src/Plugin.php
protected function getApiRequest($url, Event $event, Queue $queue)
    {
        $self = $this;
        $request = new HttpRequest(array(
            'url' => $url,
            'resolveCallback' => function($data) use ($self, $url, $event, $queue) {
                $self->resolve($url, $data, $event, $queue);
            },
            'rejectCallback' => function($error) use ($self, $url) {
                $self->reject($url, $error);
            }
        ));
        return $request;
    }
protected function getApiRequest($url, Event $event, Queue $queue)
    {
        $self = $this;
        $request = new HttpRequest(array(
            'url' => $url,
            'resolveCallback' => function($data) use ($self, $url, $event, $queue) {
                $self->resolve($url, $data, $event, $queue);
            },
            'rejectCallback' => function($error) use ($self, $url) {
                $self->reject($url, $error);
            }
        ));
        return $request;
    }
Returns an API request to get data for a video.

@param string $url API request URL
@param \Phergie\Irc\Bot\React\EventInterface $event
@param \Phergie\Irc\Bot\React\EventQueueInterface $queue