Google::Ads::Common::ReportUtils
use Google::Ads::Common::ReportUtils; my $response = Google::Ads::Common::ReportUtils::get_report_handler($report_definition, $client); my $result = $response->save($outputfile); if (!$result) { printf("An error has occurred of type '%s', triggered by '%s'.\n", $result->get_type(), $result->get_trigger()); }
Google::Ads::Common::ReportUtils a collection of utility methods for working with reports.
Prepares a new instance of Google::Ads::Common::ReportDownloadHandler using the specified parameters. The actual download of report contents will not be invoked by this procedure, but instead will occur when you call one of the procedures on the returned handler to save the report to a file, get its contents as a string, etc.
The report_definition parameter is either:
A ReportDefinition object to be defined and downloaded on the fly OR
ReportDefinition
A hash with an AWQL query and format. i.e.
{ query => 'query', format => 'format' }
The client parameter is an instance of a valid Google::AdWords::Client.
The server is an optional parameter that can be set to alter the URL from where the report will be requested.
The timeout is an optional parameter that can be set to alter the default time that the http client waits to get a response from the server. If not set, the default timeout used is Google::Ads::Common::ReportUtils::LWP_DEFAULT_TIMEOUT.
A new Google::Ads::Common::ReportDownloadHandler. See the methods of Google::Ads::Common::ReportDownloadHandler that support different use cases for processing the response's contents.
Copyright 2011 Google Inc.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
$Rev: $ $LastChangedBy: $ $Id: $
To install Google::Ads::AdWords::Client, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Google::Ads::AdWords::Client
CPAN shell
perl -MCPAN -e shell install Google::Ads::AdWords::Client
For more information on module installation, please visit the detailed CPAN module installation guide.