Google::Adwords::ReportService - Interact with the Google Adwords ReportService API calls
This documentation refers to Google::Adwords::ReportService version 0.0.1
use Google::Adwords::ReportService; # create the report service object my $report_service = Google::Adwords::ReportService->new(); # need to login to the Adwords service $report_service->email($email_address) ->password($password) ->developerToken($developer_token) ->applicationToken($app_token) ; # delete a report my $report_job_id = 123456; $report_service->deleteReport($report_job_id); # get all the jobs my @jobs = $report_service->getAllJobs(); # get status for report job my $status = $report_service->getReportJobStatus($report_job_id); # get gzip url for download my $gzip_url = $report_service->getGzipReportDownloadUrl($report_job_id); # get url for download my $url = $report_service->getReportDownloadUrl($report_job_id); # schedule a report my $job = Google::Adwords::ReportJob->new ->startDay('2006-08-01') ->endDay('2006-08-01') ->name('Test report via API') ->aggregationType('Daily') ->adWordsType('SearchOnly'); my $jobid = $report_service->scheduleReportJob('AccountReportJob', $job);
Deletes a report job along with the report it produced, if any. Cannot delete a report job in progress.
my $ret = $obj->deleteReport($job_id);
$job_id => The ID of the report job
1 on success
Returns an array consisting of all jobs the user has scheduled.
my @jobs = $obj->getAllJobs();
None.
A list of Google::Adwords::ReportJob objects
Returns a URL from which a compressed report with the given job ID can be downloaded (in Gzip format). After invoking this method, the caller can do a regular HTTP GET on the returned URL to retrieve the report.
my $url = $obj->getGzipReportDownloadUrl($job_id);
$url => A URL from which the compressed report can be downloaded
Returns a URL from which the report with the given job ID can be downloaded. After invoking this method, the caller can do a regular HTTP GET on the returned URL to retrieve the report.
my $url = $obj->getReportDownloadUrl($job_id);
$url => A URL from which the report can be downloaded
Returns the status of the report job with the given reportJobId. One of: { Pending | InProgress | Completed | Failed }
my $status = $obj->getReportJobStatus($job_id);
$status => The report job status
Schedules a report job for execution.
my $job_id = $obj->scheduleReportJob($type, $job);
* CustomReportJob - http://www.google.com/apis/adwords/developer/CustomReportJob.html
* UrlReportJob - http://www.google.com/apis/adwords/developer/UrlReportJob.html
* KeywordReportJob - http://www.google.com/apis/adwords/developer/KeywordReportJob.html
* AdTextReportJob - http://www.google.com/apis/adwords/developer/AdTextReportJob.html
* AdImageReportJob - http://www.google.com/apis/adwords/developer/AdImageReportJob.html
* AdGroupReportJob - http://www.google.com/apis/adwords/developer/AdGroupReportJob.html
* CampaignReportJob - http://www.google.com/apis/adwords/developer/CampaignReportJob.html
* AccountReportJob - http://www.google.com/apis/adwords/developer/AccountReportJob.html
$job_id => The Report Job ID
Google::Adwords::ReportJob
Rohan Almeida <rohan@almeida.in>
Mathieu Jondet <mathieu@eulerian.com>
Copyright (c) 2006 Rohan Almeida <rohan@almeida.in>. All rights reserved.
This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
To install Google::Adwords, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Google::Adwords
CPAN shell
perl -MCPAN -e shell install Google::Adwords
For more information on module installation, please visit the detailed CPAN module installation guide.