Google_Service_AdSenseHost_AccountsReports_Resource

The "reports" collection of methods.

Defined (1)

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

/vendor/google/apiclient/src/Google/Service/AdSenseHost.php  
  1. class Google_Service_AdSenseHost_AccountsReports_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 $accountId Hosted 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 dimension Dimensions to base the report on. 
  14. * @opt_param string filter Filters to be run on the report. 
  15. * @opt_param string locale Optional locale to use for translating report output 
  16. * to a local language. Defaults to "en_US" if not specified. 
  17. * @opt_param string maxResults The maximum number of rows of report data to 
  18. * return. 
  19. * @opt_param string metric Numeric columns to include in the report. 
  20. * @opt_param string sort The name of a dimension or metric to sort the 
  21. * resulting report on, optionally prefixed with "+" to sort ascending or "-" to 
  22. * sort descending. If no prefix is specified, the column is sorted ascending. 
  23. * @opt_param string startIndex Index of the first row of report data to return. 
  24. * @return Google_Service_AdSenseHost_Report 
  25. */ 
  26. public function generate($accountId, $startDate, $endDate, $optParams = array()) 
  27. $params = array('accountId' => $accountId, 'startDate' => $startDate, 'endDate' => $endDate); 
  28. $params = array_merge($params, $optParams); 
  29. return $this->call('generate', array($params), "Google_Service_AdSenseHost_Report");