Google_AccountsReportsServiceResource

The "reports" collection of methods.

Defined (2)

The class is defined in the following location(s).

/inc/google-api-php-client/src/contrib/Google_AdsenseService.php  
  1. class Google_AccountsReportsServiceResource extends Google_ServiceResource { 
  2.  
  3.  
  4. /** 
  5. * Generate an AdSense report based on the report request sent in the query parameters. Returns the 
  6. * result as JSON; to retrieve output in CSV format specify "alt=csv" as a query parameter. 
  7. * (reports.generate) 
  8. * @param string $accountId Account upon which to report. 
  9. * @param string $startDate Start of the date range to report on in "YYYY-MM-DD" format, inclusive. 
  10. * @param string $endDate End of the date range to report on in "YYYY-MM-DD" format, inclusive. 
  11. * @param array $optParams Optional parameters. 
  12. * @opt_param string sort The name of a dimension or metric to sort the resulting report on, optionally prefixed with "+" to sort ascending or "-" to sort descending. If no prefix is specified, the column is sorted ascending. 
  13. * @opt_param string locale Optional locale to use for translating report output to a local language. Defaults to "en_US" if not specified. 
  14. * @opt_param string metric Numeric columns to include in the report. 
  15. * @opt_param int maxResults The maximum number of rows of report data to return. 
  16. * @opt_param string filter Filters to be run on the report. 
  17. * @opt_param string currency Optional currency to use when reporting on monetary metrics. Defaults to the account's currency if not set. 
  18. * @opt_param int startIndex Index of the first row of report data to return. 
  19. * @opt_param string dimension Dimensions to base the report on. 
  20. * @return Google_AdsenseReportsGenerateResponse 
  21. */ 
  22. public function generate($accountId, $startDate, $endDate, $optParams = array()) { 
  23. $params = array('accountId' => $accountId, 'startDate' => $startDate, 'endDate' => $endDate); 
  24. $params = array_merge($params, $optParams); 
  25. $data = $this->__call('generate', array($params)); 
  26. if ($this->useObjects()) { 
  27. return new Google_AdsenseReportsGenerateResponse($data); 
  28. } else { 
  29. return $data; 
/inc/google-api-php-client/src/contrib/Google_AdsensehostService.php  
  1. class Google_AccountsReportsServiceResource extends Google_ServiceResource { 
  2.  
  3.  
  4. /** 
  5. * Generate an AdSense report based on the report request sent in the query parameters. Returns the 
  6. * result as JSON; to retrieve output in CSV format specify "alt=csv" as a query parameter. 
  7. * (reports.generate) 
  8. * @param string $accountId Hosted account upon which to report. 
  9. * @param string $startDate Start of the date range to report on in "YYYY-MM-DD" format, inclusive. 
  10. * @param string $endDate End of the date range to report on in "YYYY-MM-DD" format, inclusive. 
  11. * @param array $optParams Optional parameters. 
  12. * @opt_param string sort The name of a dimension or metric to sort the resulting report on, optionally prefixed with "+" to sort ascending or "-" to sort descending. If no prefix is specified, the column is sorted ascending. 
  13. * @opt_param string locale Optional locale to use for translating report output to a local language. Defaults to "en_US" if not specified. 
  14. * @opt_param string metric Numeric columns to include in the report. 
  15. * @opt_param string maxResults The maximum number of rows of report data to return. 
  16. * @opt_param string filter Filters to be run on the report. 
  17. * @opt_param string startIndex Index of the first row of report data to return. 
  18. * @opt_param string dimension Dimensions to base the report on. 
  19. * @return Google_Report 
  20. */ 
  21. public function generate($accountId, $startDate, $endDate, $optParams = array()) { 
  22. $params = array('accountId' => $accountId, 'startDate' => $startDate, 'endDate' => $endDate); 
  23. $params = array_merge($params, $optParams); 
  24. $data = $this->__call('generate', array($params)); 
  25. if ($this->useObjects()) { 
  26. return new Google_Report($data); 
  27. } else { 
  28. return $data;