So, the migration guide for the 200909 API says to replace this call:
campaign_service.GetCampaignStats(campaign_id, '2009-01-01', '2009-01-31')
use this:
selector = {
'ids': [campaign_id],
'statsSelector': {
'dateRange': {
'max': '20090131',
'min': '20090101'
}
}
}
campaign_service.Get(selector)
GetCampaignStats used to return a StatsRecord with these fields:
averagePosition, clicks, conversionRate, conversions, cost, id, and
impressions
All I get from the campaign_service.Get(selector) call (this is using
suds in Python):
selector = ga.factory.create('CampaignSelector')
selector.ids.append(campagain[<some valid id>])
selector.statsSelector.dateRange.min = '20100301'
selector.statsSelector.dateRange.max = '20100331'
print ga.service.get(selector)
is:
(CampaignPage){
totalNumEntries = 0
Page.Type = "CampaignPage"
totalBudget =
(Budget){
period = "DAILY"
amount =
(Money){
ComparableValue.Type = "Money"
microAmount = 0
}
deliveryMethod = "STANDARD"
}
}
I see that the CampaignService has an object named "Stats" which has all
the aforementioned fields, but there is no indication on how to
retrieve that object for a campaign. How do I do a call that will
retrieve a Stats object, and thus the information I need?
The documentation is very unclear here.
By the way, if I try to use ga.service.Get(...), suds reports:
Method not found: 'CampaignService.CampaignServiceInterfacePort.Get'
In fact, in the wsdl file, on line 3352 (CampaignService.wsdl for
200909), the operation is defined as:
<wsdl:operation name="get">
(lower case 'G'). Same for 'mutate.' It would seem the documentation is
incorrect in this case.
Thanks!
j
--
Joshua Kugler
Part-Time System Admin/Programmer
http://www.eeinternet.com
PGP Key: http://pgp.mit.edu/ ID 0x73B13B6A
--
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Have you migrated to v200909 yet?
The v13 sunset is on April 22, 2010.
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 [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/adwords-api?hl=en