Creating keyword performace report usind adwords API

2012-03-19 Thread Дамян Станчев
Hi guys,
I had the following code, that I was using to create reports and they 
appeared in my client center. Now when the old API is deprecated I have 
problems doing the same thing. I need to be able to create keyword 
performance reports from a PHP script and they must appear in the client 
center. Any ideas how to do this with the new API?

P.S Until now I managed to create a ReportDefinition, but what is the way 
to use the created ReportDefinition object after that?

OLD CODE:
$reportDefinitionService = $user-GetReportDefinitionService('v201008');
$adGroupId = (float) $_GET['id'];
$adGroupName = $_GET['name'];

# Create ad group predicate.
$adGroupPredicate = new Predicate();
$adGroupPredicate-field = 'AdGroupId';
$adGroupPredicate-operator = 'EQUALS';
$adGroupPredicate-values = array($adGroupId);

# Create selector.
$selector = new Selector();
$selector-fields = array(AdGroupName, KeywordText, Impressions, 
Ctr, AveragePosition);
$selector-predicates = array($adGroupPredicate);

# Create report definition.
$reportDefinition = new ReportDefinition();
$reportDefinition-reportName = 'NEW Keywords performance report 
'.$adGroupName.' for adgroup #' . $adGroupId . ' @' . time();
$reportDefinition-reportType = 'KEYWORDS_PERFORMANCE_REPORT';
$reportDefinition-downloadFormat = 'CSVFOREXCEL';
$reportDefinition-dateRangeType = 'LAST_7_DAYS';
$reportDefinition-selector = $selector;

# Create operations.
$operation = new ReportDefinitionOperation();
$operation-operand = $reportDefinition;
$operation-operator = 'ADD';

# Add report definition and download.
$result = $reportDefinitionService-mutate(array($operation));

-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog and discussion group:
http://adwordsapi.blogspot.com
http://groups.google.com/group/adwords-api
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

You received this message because you are subscribed to the Google
Groups AdWords API Forum group.
To post to this group, send email to adwords-api@googlegroups.com
To unsubscribe from this group, send email to
adwords-api+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/adwords-api?hl=en


SOAP-ERROR: Parsing WSDL problem

2012-03-13 Thread Дамян Станчев
I'm using the adwords PHP API and today I started to receive the following 
error:
*SOAP-ERROR: Parsing WSDL: Couldnt load from 
https://adwords.google.com/api/adwords/cm/v201008/ReportDefinitionService?wsdl
 *

I've opened the link to check what's going on there and I saw the following 
message:
*No service was found. *
*
*
What has happened and is there a way to fix this? Thank you!

-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog and discussion group:
http://adwordsapi.blogspot.com
http://groups.google.com/group/adwords-api
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

You received this message because you are subscribed to the Google
Groups AdWords API Forum group.
To post to this group, send email to adwords-api@googlegroups.com
To unsubscribe from this group, send email to
adwords-api+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/adwords-api?hl=en