Downloading keyword performance report for a particular day

2012-04-04 Thread Sid
I have a python script that pulls keyword performance report everyday. 
Unfortunately it didn't run 3 days ago because of our hardware migration. 
How can I change my report definition parameters to download for say 04/01 
instead of yesterday. I wasn't sure how to use Selector.dateRange. Code 
snippet:

  report_downloader = client.GetReportDownloader(
  'https://adwords.google.com', 'v201109')

  # Create report definition.
  report = {
  'reportName': 'YESTERDAY KEYWORDS_PERFORMANCE_REPORT',
  'dateRangeType': 'YESTERDAY',
  'reportType': 'KEYWORDS_PERFORMANCE_REPORT',
  'downloadFormat': 'CSV',
  'selector': {
  'fields': ['CampaignId', 'AdGroupId', 'Id',
  'Impressions', 'Clicks', 'Cost',
  'AveragePosition', 'ClickType', 'Cost',
'Date','CpcBidSource','CriteriaDestinationUrl',
'ExternalCustomerId','FirstPageCpc',
'KeywordMatchType','KeywordText','MaxCpc','Device',

'MaxCpm','PlacementUrl','QualityScore','Slot','Status','AdGroupName','CampaignName','CustomerDescriptiveName'
]
  },
  # Enable to get rows with zero impressions.
  'includeZeroImpressions': 'false'
  }

  file_path = report_downloader.DownloadReport(report, file_path=path)


-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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


Re: Downloading keyword performance report for a particular day

2012-04-06 Thread Ewan Heming
I don't know much Python so I can't help with the code itself, but you need 
to set the 
dateRangeTypefield
 of your report definition to 'CUSTOM_DATE', then add set the 
dateRangefield
 of your selector to a valid 
DateRange
. 

-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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