google_ReportsServiceResource

The "reports" collection of methods.

Defined (5)

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

/google-api/src/contrib/Google_AdExchangeSellerService.php  
  1. class Google_ReportsServiceResource extends Google_ServiceResource { 
  2.  
  3.  
  4. /** 
  5. * Generate an Ad Exchange report based on the report request sent in the query parameters. Returns 
  6. * the result as JSON; to retrieve output in CSV format specify "alt=csv" as a query parameter. 
  7. * (reports.generate) 
  8. * @param string $startDate Start of the date range to report on in "YYYY-MM-DD" format, inclusive. 
  9. * @param string $endDate End of the date range to report on in "YYYY-MM-DD" format, inclusive. 
  10. * @param array $optParams Optional parameters. 
  11. * @opt_param string dimension Dimensions to base the report on. 
  12. * @opt_param string filter Filters to be run on the report. 
  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 maxResults The maximum number of rows of report data to return. 
  15. * @opt_param string metric Numeric columns to include in the report. 
  16. * @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. 
  17. * @opt_param string startIndex Index of the first row of report data to return. 
  18. * @return Google_Report 
  19. */ 
  20. public function generate($startDate, $endDate, $optParams = array()) { 
  21. $params = array('startDate' => $startDate, 'endDate' => $endDate); 
  22. $params = array_merge($params, $optParams); 
  23. $data = $this->__call('generate', array($params)); 
  24. if ($this->useObjects()) { 
  25. return new Google_Report($data); 
  26. } else { 
  27. return $data; 
/google-api/src/contrib/Google_AdsensehostService.php  
  1. class Google_ReportsServiceResource 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 $startDate Start of the date range to report on in "YYYY-MM-DD" format, inclusive. 
  9. * @param string $endDate End of the date range to report on in "YYYY-MM-DD" format, inclusive. 
  10. * @param array $optParams Optional parameters. 
  11. * @opt_param string dimension Dimensions to base the report on. 
  12. * @opt_param string filter Filters to be run on the report. 
  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 maxResults The maximum number of rows of report data to return. 
  15. * @opt_param string metric Numeric columns to include in the report. 
  16. * @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. 
  17. * @opt_param string startIndex Index of the first row of report data to return. 
  18. * @return Google_Report 
  19. */ 
  20. public function generate($startDate, $endDate, $optParams = array()) { 
  21. $params = array('startDate' => $startDate, 'endDate' => $endDate); 
  22. $params = array_merge($params, $optParams); 
  23. $data = $this->__call('generate', array($params)); 
  24. if ($this->useObjects()) { 
  25. return new Google_Report($data); 
  26. } else { 
  27. return $data; 
/google-api/src/contrib/Google_AdsenseService.php  
  1. class Google_ReportsServiceResource 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 $startDate Start of the date range to report on in "YYYY-MM-DD" format, inclusive. 
  9. * @param string $endDate End of the date range to report on in "YYYY-MM-DD" format, inclusive. 
  10. * @param array $optParams Optional parameters. 
  11. * @opt_param string accountId Accounts upon which to report. 
  12. * @opt_param string currency Optional currency to use when reporting on monetary metrics. Defaults to the account's currency if not set. 
  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 to a local language. Defaults to "en_US" if not specified. 
  16. * @opt_param int maxResults The maximum number of rows of report data to return. 
  17. * @opt_param string metric Numeric columns to include in the report. 
  18. * @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. 
  19. * @opt_param int startIndex Index of the first row of report data to return. 
  20. * @return Google_AdsenseReportsGenerateResponse 
  21. */ 
  22. public function generate($startDate, $endDate, $optParams = array()) { 
  23. $params = array('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; 
/google-api/src/contrib/Google_DfareportingService.php  
  1. class Google_ReportsServiceResource extends Google_ServiceResource { 
  2.  
  3.  
  4. /** 
  5. * Deletes a report by its ID. (reports.delete) 
  6. * @param string $profileId The DFA user profile ID. 
  7. * @param string $reportId The ID of the report. 
  8. * @param array $optParams Optional parameters. 
  9. */ 
  10. public function delete($profileId, $reportId, $optParams = array()) { 
  11. $params = array('profileId' => $profileId, 'reportId' => $reportId); 
  12. $params = array_merge($params, $optParams); 
  13. $data = $this->__call('delete', array($params)); 
  14. return $data; 
  15. /** 
  16. * Retrieves a report by its ID. (reports.get) 
  17. * @param string $profileId The DFA user profile ID. 
  18. * @param string $reportId The ID of the report. 
  19. * @param array $optParams Optional parameters. 
  20. * @return Google_Report 
  21. */ 
  22. public function get($profileId, $reportId, $optParams = array()) { 
  23. $params = array('profileId' => $profileId, 'reportId' => $reportId); 
  24. $params = array_merge($params, $optParams); 
  25. $data = $this->__call('get', array($params)); 
  26. if ($this->useObjects()) { 
  27. return new Google_Report($data); 
  28. } else { 
  29. return $data; 
  30. /** 
  31. * Creates a report. (reports.insert) 
  32. * @param string $profileId The DFA user profile ID. 
  33. * @param Google_Report $postBody 
  34. * @param array $optParams Optional parameters. 
  35. * @return Google_Report 
  36. */ 
  37. public function insert($profileId, Google_Report $postBody, $optParams = array()) { 
  38. $params = array('profileId' => $profileId, 'postBody' => $postBody); 
  39. $params = array_merge($params, $optParams); 
  40. $data = $this->__call('insert', array($params)); 
  41. if ($this->useObjects()) { 
  42. return new Google_Report($data); 
  43. } else { 
  44. return $data; 
  45. /** 
  46. * Retrieves list of reports. (reports.list) 
  47. * @param string $profileId The DFA user profile ID. 
  48. * @param array $optParams Optional parameters. 
  49. * @opt_param int maxResults Maximum number of results to return. 
  50. * @opt_param string pageToken The value of the nextToken from the previous result page. 
  51. * @opt_param string sortField The field by which to sort the list. 
  52. * @opt_param string sortOrder Order of sorted results, default is 'DESCENDING'. 
  53. * @return Google_ReportList 
  54. */ 
  55. public function listReports($profileId, $optParams = array()) { 
  56. $params = array('profileId' => $profileId); 
  57. $params = array_merge($params, $optParams); 
  58. $data = $this->__call('list', array($params)); 
  59. if ($this->useObjects()) { 
  60. return new Google_ReportList($data); 
  61. } else { 
  62. return $data; 
  63. /** 
  64. * Updates a report. This method supports patch semantics. (reports.patch) 
  65. * @param string $profileId The DFA user profile ID. 
  66. * @param string $reportId The ID of the report. 
  67. * @param Google_Report $postBody 
  68. * @param array $optParams Optional parameters. 
  69. * @return Google_Report 
  70. */ 
  71. public function patch($profileId, $reportId, Google_Report $postBody, $optParams = array()) { 
  72. $params = array('profileId' => $profileId, 'reportId' => $reportId, 'postBody' => $postBody); 
  73. $params = array_merge($params, $optParams); 
  74. $data = $this->__call('patch', array($params)); 
  75. if ($this->useObjects()) { 
  76. return new Google_Report($data); 
  77. } else { 
  78. return $data; 
  79. /** 
  80. * Runs a report. (reports.run) 
  81. * @param string $profileId The DFA profile ID. 
  82. * @param string $reportId The ID of the report. 
  83. * @param array $optParams Optional parameters. 
  84. * @opt_param bool synchronous If set and true, tries to run the report synchronously. 
  85. * @return Google_DfareportingFile 
  86. */ 
  87. public function run($profileId, $reportId, $optParams = array()) { 
  88. $params = array('profileId' => $profileId, 'reportId' => $reportId); 
  89. $params = array_merge($params, $optParams); 
  90. $data = $this->__call('run', array($params)); 
  91. if ($this->useObjects()) { 
  92. return new Google_DfareportingFile($data); 
  93. } else { 
  94. return $data; 
  95. /** 
  96. * Updates a report. (reports.update) 
  97. * @param string $profileId The DFA user profile ID. 
  98. * @param string $reportId The ID of the report. 
  99. * @param Google_Report $postBody 
  100. * @param array $optParams Optional parameters. 
  101. * @return Google_Report 
  102. */ 
  103. public function update($profileId, $reportId, Google_Report $postBody, $optParams = array()) { 
  104. $params = array('profileId' => $profileId, 'reportId' => $reportId, 'postBody' => $postBody); 
  105. $params = array_merge($params, $optParams); 
  106. $data = $this->__call('update', array($params)); 
  107. if ($this->useObjects()) { 
  108. return new Google_Report($data); 
  109. } else { 
  110. return $data; 
/google-api/src/contrib/Google_YouTubeAnalyticsService.php  
  1. class Google_ReportsServiceResource extends Google_ServiceResource { 
  2.  
  3.  
  4. /** 
  5. * Retrieve your YouTube Analytics reports. (reports.query) 
  6. * @param string $ids Identifies the YouTube channel or content owner for which you are retrieving YouTube Analytics data. 
  7. - To request data for a YouTube user, set the ids parameter value to channel==CHANNEL_ID, where CHANNEL_ID specifies the unique YouTube channel ID. 
  8. - To request data for a YouTube CMS content owner, set the ids parameter value to contentOwner==OWNER_NAME, where OWNER_NAME is the CMS name of the content owner. 
  9. * @param string $start_date The start date for fetching YouTube Analytics data. The value should be in YYYY-MM-DD format. 
  10. * @param string $end_date The end date for fetching YouTube Analytics data. The value should be in YYYY-MM-DD format. 
  11. * @param string $metrics A comma-separated list of YouTube Analytics metrics, such as views or likes, dislikes. See the Available Reports document for a list of the reports that you can retrieve and the metrics available in each report, and see the Metrics document for definitions of those metrics. 
  12. * @param array $optParams Optional parameters. 
  13. * @opt_param string dimensions A comma-separated list of YouTube Analytics dimensions, such as views or ageGroup, gender. See the Available Reports document for a list of the reports that you can retrieve and the dimensions used for those reports. Also see the Dimensions document for definitions of those dimensions. 
  14. * @opt_param string filters A list of filters that should be applied when retrieving YouTube Analytics data. The Available Reports document identifies the dimensions that can be used to filter each report, and the Dimensions document defines those dimensions. If a request uses multiple filters, join them together with a semicolon (;), and the returned result table will satisfy both filters. For example, a filters parameter value of video==dMH0bHeiRNg;country==IT restricts the result set to include data for the given video in Italy. 
  15. * @opt_param int max-results The maximum number of rows to include in the response. 
  16. * @opt_param string sort A comma-separated list of dimensions or metrics that determine the sort order for YouTube Analytics data. By default the sort order is ascending. The '-' prefix causes descending sort order. 
  17. * @opt_param int start-index An index of the first entity to retrieve. Use this parameter as a pagination mechanism along with the max-results parameter (one-based, inclusive). 
  18. * @return Google_ResultTable 
  19. */ 
  20. public function query($ids, $start_date, $end_date, $metrics, $optParams = array()) { 
  21. $params = array('ids' => $ids, 'start-date' => $start_date, 'end-date' => $end_date, 'metrics' => $metrics); 
  22. $params = array_merge($params, $optParams); 
  23. $data = $this->__call('query', array($params)); 
  24. if ($this->useObjects()) { 
  25. return new Google_ResultTable($data); 
  26. } else { 
  27. return $data;