original_string: public function pushEvent($collectionName, $event) {
          $url = self::BASE_API_URL . $collectionName;
          $result = Request::post($url)
              ->sendsAndExpectsType(Mime::JSON)
              ->addHeaders([
                  'X-Project-Id' => $this->projectId,
                  'X-Api-Key' => $this->apiKey
              ])
              ->body(json_encode($event))
              ->send();
          return $this->buildResponse($event, $result);
      }
code: public function pushEvent($collectionName, $event) {
          $url = self::BASE_API_URL . $collectionName;
          $result = Request::post($url)
              ->sendsAndExpectsType(Mime::JSON)
              ->addHeaders([
                  'X-Project-Id' => $this->projectId,
                  'X-Api-Key' => $this->apiKey
              ])
              ->body(json_encode($event))
              ->send();
          return $this->buildResponse($event, $result);
      }
code_tokens: public function pushEvent ( $ collectionName , $ event ) { $ url = self :: BASE_API_URL . $ collectionName ; $ result = Request :: post ( $ url ) -> sendsAndExpectsType ( Mime :: JSON ) -> addHeaders ( [ 'X-Project-Id' => $ this -> projectId , 'X-Api-Key' => $ this -> apiKey ] ) -> body ( json_encode ( $ event ) ) -> send ( ) ; return $ this -> buildResponse ( $ event , $ result ) ; }
docstring: Push an event to the Connect API.
  @param string $collectionName The name of the collection to push to
  @param array $event The event details
  @return Response
docstring_tokens: Push an event to the Connect API .