original_string: protected function getApiRequest(Event $event, Queue $queue, GoogleProviderInterface $provider)
      {
          $self = $this;
  
          return new HttpRequest([
              'url' => $provider->getApiRequestUrl($event),
              'resolveCallback' => function (Response $response) use ($self, $event, $queue, $provider) {
                  $self->sendIrcResponse($event, $queue, $provider->getSuccessLines($event, $response->getBody()));
              },
              'rejectCallback' => function ($error) use ($self, $event, $queue, $provider) {
                  $self->sendIrcResponse($event, $queue, $provider->getRejectLines($event, $error));
              }
          ]);
      }
code: protected function getApiRequest(Event $event, Queue $queue, GoogleProviderInterface $provider)
      {
          $self = $this;
  
          return new HttpRequest([
              'url' => $provider->getApiRequestUrl($event),
              'resolveCallback' => function (Response $response) use ($self, $event, $queue, $provider) {
                  $self->sendIrcResponse($event, $queue, $provider->getSuccessLines($event, $response->getBody()));
              },
              'rejectCallback' => function ($error) use ($self, $event, $queue, $provider) {
                  $self->sendIrcResponse($event, $queue, $provider->getRejectLines($event, $error));
              }
          ]);
      }
code_tokens: protected function getApiRequest ( Event $ event , Queue $ queue , GoogleProviderInterface $ provider ) { $ self = $ this ; return new HttpRequest ( [ 'url' => $ provider -> getApiRequestUrl ( $ event ) , 'resolveCallback' => function ( Response $ response ) use ( $ self , $ event , $ queue , $ provider ) { $ self -> sendIrcResponse ( $ event , $ queue , $ provider -> getSuccessLines ( $ event , $ response -> getBody ( ) ) ) ; } , 'rejectCallback' => function ( $ error ) use ( $ self , $ event , $ queue , $ provider ) { $ self -> sendIrcResponse ( $ event , $ queue , $ provider -> getRejectLines ( $ event , $ error ) ) ; } ] ) ; }
docstring: Set up the API request and set the callbacks
  
  @param \Phergie\Irc\Plugin\React\Command\CommandEvent $event
  @param \Phergie\Irc\Bot\React\EventQueueInterface $queue
  @param \Chrismou\Phergie\Plugin\Google\Provider\GoogleProviderInterface $provider
  @return \Phergie\Plugin\Http\Request
docstring_tokens: Set up the API request and set the callbacks