>  Q&A  >  본문

PHP에서 BatchRunReports 메소드 사용: 가이드

저는 PHP에서 BatchRunReports를 실행하는 방법을 알고 싶습니다. 예제를 시도했지만 복잡하고 치명적인 오류 메시지가 표시됩니다. 문서를 살펴봤지만 내 문제와 관련된 내용을 찾을 수 없습니다. 문서에 있는 도구를 사용하여 원하는 쿼리를 실행할 수 있지만 이를 PHP로 전달할 수는 없습니다.

으아악

치명적인 오류: 포착되지 않은 예외: GoogleAnalyticsDataV1betaRunReportRequest가 필요합니다. F:xampphtdocsother2_templateapi-test-completedgoogle-analyticsvendorgoogleprotobufsrcGoogleProtobufInternalGPBUtil.php:198 스택 추적:

#0 F:xampphtdocsother2_templateapi-test-completedgoogle-analyticsvendorgoogleprotobufsrcGoogleProtobufInternalRepeatedField.php(187): 내부 GPBUtil::check 메시지(배열, 'GoogleAnalytic...' )

#1 F:xampphtdocsother2_templateapi-test-completedgoogle-analyticsvendorgoogle protobufsrcGoogleProtobufInternalGPBUtil.php(210): GoogleProtobufInternalRepeatedField->offsetSet(NULL, Array)

#2 F:xampphtdocsother 2_templateapi-test-completed lyticsvendorgoogleanalytics-datasrcV1betaBatchRunReportsRequest.php ( 126): GoogleProtobufInternalGPBUtil::checkRepeatedField(Array, 11, 'GoogleAnalytic ...')

#3 F:xampphtdocsother2_templateapi-test-completedgoogle-analyticsvendorgoogleanalytics-datasrcV1betaGapicBetaAnalyticsDataGapicClient .php(421): 틱 RunReportsRequest->setRequests(Array)

#4 F:xampphtdocsother2_templateapi-test-completedgoogle-analytics test.php(46): GoogleAnalyticsDataV1betaGapicBetaAnalyticsDataGapicClient->batchRunReports(Array)

#5 {main} throws F:xampphtdocsother2_templateapi-test-completedgoogle-analyticsvendorgoogleprotobu fsrc GoogleProtobufInternalGPBUtil.php 라인 198

P粉914731066P粉914731066238일 전415

모든 응답(1)나는 대답할 것이다

  • P粉792026467

    P粉7920264672024-01-30 10:45:43

    batchRunReports를 실행하려면 "requests" 배열의 RunReportRequest 개체를 사용해야 합니다. BatchRunReports 요청에서처럼 "속성"을 추가하는 것을 잊지 마세요.

    으아악

    회신하다
    0
  • 취소회신하다