Google::Adwords::InfoService - Interact with the Google Adwords InfoService API calls
This documentation refers to Google::Adwords::InfoService version 0.2
use Google::Adwords::InfoService; my $ginfo = Google::Adwords::InfoService->new(); $ginfo->email('email@domain.com') ->password('password') ->developerToken('developer_token') ->applicationToken('application_token'); # If you use a MCC $ginfo->clientEmail('clientemail@domain.com'); my $quota = $ginfo->getFreeUsageQuotaThisMonth; print "Free quota this month is $quota\n"; my $operations_count = $ginfo->getOperationCount({ startDate => $start_date, endDate => $end_date, }); print "Number of operations: $operations_count\n";
Retrieves this month's total usage quota, including free quota usage, or the developer token being used to make this call.
my $quota = $ginfo->getUsageQuotaThisMonth();
NONE
$quota - A number
Designed specifically for AdWords Commercial Developer Program participants. Retrieves this month's free usage quota for the developer token being used to make this call. For those not enrolled in the AdWords Commercial Developer Program, this value will be identical to that returned for getUsageQuotaThisMonth.
my $quota = $ginfo->getFreeUsageQuotaThisMonth();
Retrieves the cost, in quota units per operation, of the given method on a specific date. Methods default to a cost of 1.
my $cost = $ginfo->getMethodCost({ service => $service_name, method => $method_name, date => $date, });
A hashref with keys:
* service - The name of the service containing the method, for example, "ReportService".
* method - The method whose quota cost is being queried, for example "scheduleReportJob".
* date - The date for which to retrieve the cost of the method. An error occurs if this date is in the future. Format is YYYY-MM-DD
$cost - the cost, in quota units per operation
Retrieves the number of operations recorded for the developer token being used to make this call over the given date range. The time zone is implicitly assumed to be Pacific time (PST or PDT). The given dates are inclusive; to get the operation count for a single day, supply it as both the start and end date.
my $count = $ginfo->getOperationCount({ startDate => $date, endDate => $date, });
* startDate - the beginning of the date range, inclusive. YYYY-MM-DD format.
* ebdDate - the end of the date range, inclusive. YYYY-MM-DD format.
$count - the number of operations recorded in the given date range
Retrieves the number of quota units recorded for the developer token being used to make this call over the given date range. The time zone is implicitly assumed to be Pacific time (PST or PDT). The given dates are inclusive; to get the unit count for a single day, supply it as both the start and end date.
my $count = $ginfo->getUnitCount({ startDate => $date, endDate => $date, });
A hashref, with keys:
* endDate - the end of the date range, inclusive. YYYY-MM-DD format.
$count - the number of quota units recorded over the given date range
Retrieves the number of quota units recorded for the developer token being used to make this call over the given date range for a specific method. The time zone is implicitly assumed to be Pacific time (PST or PDT). The given dates are inclusive; to get the unit count for a single day, supply it as both the start and end date.
my $count = $ginfo->getUnitCountForMethod({ service => $service_name, method => $method_name, startDate => $date, endDate => $date, });
Retrieves the number of quota units recorded for a subset of clients over the given date range. The time zone is implicitly assumed to be Pacific time (PST or PDT). The given dates are inclusive; to get the unit count for a single day, supply it as both the start and end date.
my @usage_records = $ginfo->getUnitCountForClients({ clientEmails => [ $emai1, $email2 ], startDate => $date, endDate => $date, });
* clientEmails => arrayref of client emails
@usage_records => A list of Google::Adwords::ClientUsageRecord objects
Rohan Almeida <rohan@almeida.in>
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.