Google::Ads::Common::ReportUtils |
Google::Ads::Common::ReportUtils
use Google::Ads::Common::ReportUtils;
Google::Ads::Common::ReportUtils::download_report($report_definition, $client, $path);
Google::Ads::Common::ReportUtils a collection of utility methods for working with reports.
Downloads a new instance of an existing report definition. If the file_path parameter is specified it will be downloaded to the file at that path, otherwise it will be downloaded to memory and be returned as a string.
The client parameter is an instance of a valid the Google::AdWords::Client manpage.
The report_definitiond parameter is either the id of a pre-defined report to
download or a ReportDefinition
object to be defined and download on the fly.
In the case of a plain id then the regular download endpoint will be used to
download a pre-stored definition, otherwise the versioned download url endpoint
(based on the version of the given Client
object) will be used and the given
report definition object serialized and passed to generate the report data.
The file_path is an optional parameter that if given the subroutine will write out the report to the given file path.
The server is an optional parameter that can be set to alter the URL from where the report will be requested.
The return_money_in_micros is an optional parameter that can be set to alter the output of money kind of fields in the report.
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 the Google::Ads::Common::ReportUtils::LWP_DEFAULT_TIMEOUT manpage.
If a file_path is given, the report gets saved to file and the file size is returned, if not the report data itself is returned.
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.
David Torres <api.davidtorres at gmail.com>
$Rev: $ $LastChangedBy: $ $Id: $
Google::Ads::Common::ReportUtils |