original_string: public function invokeGitkitApiWithServiceAccount($method, $data) {
      $httpRequest = new Google_Http_Request(
          $this->gitkitApisUrl . $method,
          'POST',
          null,
          json_encode($data));
      $contentTypeHeader = array();
      $contentTypeHeader['content-type'] = 'application/json; charset=UTF-8';
      $httpRequest->setRequestHeaders($contentTypeHeader);
      $response = $this->oauth2Client->authenticatedRequest($httpRequest)
          ->getResponseBody();
      return $this->checkGitkitError(json_decode($response, true));
    }
code: public function invokeGitkitApiWithServiceAccount($method, $data) {
      $httpRequest = new Google_Http_Request(
          $this->gitkitApisUrl . $method,
          'POST',
          null,
          json_encode($data));
      $contentTypeHeader = array();
      $contentTypeHeader['content-type'] = 'application/json; charset=UTF-8';
      $httpRequest->setRequestHeaders($contentTypeHeader);
      $response = $this->oauth2Client->authenticatedRequest($httpRequest)
          ->getResponseBody();
      return $this->checkGitkitError(json_decode($response, true));
    }
code_tokens: public function invokeGitkitApiWithServiceAccount ( $ method , $ data ) { $ httpRequest = new Google_Http_Request ( $ this -> gitkitApisUrl . $ method , 'POST' , null , json_encode ( $ data ) ) ; $ contentTypeHeader = array ( ) ; $ contentTypeHeader [ 'content-type' ] = 'application/json; charset=UTF-8' ; $ httpRequest -> setRequestHeaders ( $ contentTypeHeader ) ; $ response = $ this -> oauth2Client -> authenticatedRequest ( $ httpRequest ) -> getResponseBody ( ) ; return $ this -> checkGitkitError ( json_decode ( $ response , true ) ) ; }
docstring: Sends the authenticated request to Gitkit API. The request contains an
  OAuth2 access_token generated from service account.
  
  @param string $method the API method name
  @param array $data http post data for the api
  @return array server response
  @throws Gitkit_ClientException if input is invalid
  @throws Gitkit_ServerException if there is server error
docstring_tokens: Sends the authenticated request to Gitkit API . The request contains an OAuth2 access_token generated from service account .