Google_Service_AdSense_Reports_Resource

The "reports" collection of methods.

Defined (1)

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

/lib/Google/Service/AdSense.php  
  1. class Google_Service_AdSense_Reports_Resource extends Google_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 $startDate 
  8. * Start of the date range to report on in "YYYY-MM-DD" format, inclusive. 
  9. * @param string $endDate 
  10. * 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 
  13. * The name of a dimension or metric to sort the resulting report on, optionally prefixed with "+" 
  14. * to sort ascending or "-" to sort descending. If no prefix is specified, the column is sorted 
  15. * ascending. 
  16. * @opt_param string locale 
  17. * Optional locale to use for translating report output to a local language. Defaults to "en_US" if 
  18. * not specified. 
  19. * @opt_param string metric 
  20. * Numeric columns to include in the report. 
  21. * @opt_param int maxResults 
  22. * The maximum number of rows of report data to return. 
  23. * @opt_param string filter 
  24. * Filters to be run on the report. 
  25. * @opt_param string currency 
  26. * Optional currency to use when reporting on monetary metrics. Defaults to the account's currency 
  27. * if not set. 
  28. * @opt_param int startIndex 
  29. * Index of the first row of report data to return. 
  30. * @opt_param bool useTimezoneReporting 
  31. * Whether the report should be generated in the AdSense account's local timezone. If false default 
  32. * PST/PDT timezone will be used. 
  33. * @opt_param string dimension 
  34. * Dimensions to base the report on. 
  35. * @opt_param string accountId 
  36. * Accounts upon which to report. 
  37. * @return Google_Service_AdSense_AdsenseReportsGenerateResponse 
  38. */ 
  39. public function generate($startDate, $endDate, $optParams = array()) 
  40. $params = array('startDate' => $startDate, 'endDate' => $endDate); 
  41. $params = array_merge($params, $optParams); 
  42. return $this->call('generate', array($params), "Google_Service_AdSense_AdsenseReportsGenerateResponse");