v201607 ReportDefenition class not found (PHP)

29 views
Skip to first unread message

Yana Sergeeva

unread,
Aug 29, 2016, 11:43:10 AM8/29/16
to AdWords API Forum
Hello
I use googleads/googleads-php-lib in Yii2.
I try to generate any report for test account using code examples in library.
For example DownloadCriteriaReport.php
If i use its code i receive an error: Class 'ReportDefinition' not found
 
 $user->LoadService('ReportDefinitionService', '201607');


 
// Create selector.
  $selector
= new \Selector();
  $selector
->fields = array('CampaignId', 'AdGroupId', 'Id', 'Criteria',
     
'CriteriaType', 'Impressions', 'Clicks', 'Cost');


 
// Optional: use predicate to filter out paused criteria.
  $selector
->predicates[] = new \Predicate('Status', 'NOT_IN', array('PAUSED'));


 
// Create report definition.
  $reportDefinition
= new \ReportDefinition();  <--- here an error
  $reportDefinition
->selector = $selector;

what do i do wrong?

If I try any other example (not from Reporting folder) it works well.

Thank you
Yana

Anthony Madrigal

unread,
Aug 29, 2016, 2:03:21 PM8/29/16
to AdWords API Forum
Hello Yana,

Could you please reply privately to author the full code and error message you are getting?

Thanks,
Anthony
AdWords API Team
Reply all
Reply to author
Forward
0 new messages