GoogleGAL_Service_AdSense_AccountsReports_Resource

The "reports" collection of methods.

Defined (1)

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

/core/Google/Service/AdSense.php  
  1. class GoogleGAL_Service_AdSense_AccountsReports_Resource extends GoogleGAL_Service_Resource 
  2.  
  3. /** 
  4. * Generate an AdSense report based on the report request sent in the query 
  5. * parameters. Returns the result as JSON; to retrieve output in CSV format 
  6. * specify "alt=csv" as a query parameter. (reports.generate) 
  7. * @param string $accountId Account upon which to report. 
  8. * @param string $startDate Start of the date range to report on in "YYYY-MM-DD" 
  9. * format, inclusive. 
  10. * @param string $endDate End of the date range to report on in "YYYY-MM-DD" 
  11. * format, inclusive. 
  12. * @param array $optParams Optional parameters. 
  13. * @opt_param string sort The name of a dimension or metric to sort the 
  14. * resulting report on, optionally prefixed with "+" to sort ascending or "-" to 
  15. * sort descending. If no prefix is specified, the column is sorted ascending. 
  16. * @opt_param string locale Optional locale to use for translating report output 
  17. * to a local language. Defaults to "en_US" if not specified. 
  18. * @opt_param string metric Numeric columns to include in the report. 
  19. * @opt_param int maxResults The maximum number of rows of report data to 
  20. * return. 
  21. * @opt_param string filter Filters to be run on the report. 
  22. * @opt_param string currency Optional currency to use when reporting on 
  23. * monetary metrics. Defaults to the account's currency if not set. 
  24. * @opt_param int startIndex Index of the first row of report data to return. 
  25. * @opt_param bool useTimezoneReporting Whether the report should be generated 
  26. * in the AdSense account's local timezone. If false default PST/PDT timezone 
  27. * will be used. 
  28. * @opt_param string dimension Dimensions to base the report on. 
  29. * @return GoogleGAL_Service_AdSense_AdsenseReportsGenerateResponse 
  30. */ 
  31. public function generate($accountId, $startDate, $endDate, $optParams = array()) 
  32. $params = array('accountId' => $accountId, 'startDate' => $startDate, 'endDate' => $endDate); 
  33. $params = array_merge($params, $optParams); 
  34. return $this->call('generate', array($params), "GoogleGAL_Service_AdSense_AdsenseReportsGenerateResponse");