google_ReportsServiceResource

The "reports" collection of methods.

Defined (5)

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

/google-api-php-client/src/contrib/Google_AdExchangeSellerService.php  
  1. class google_ReportsServiceResource extends Google_ServiceResource { 
  2.  
  3. /** 
  4. * Generate an Ad Exchange 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 Start of the date range to report on in "YYYY-MM-DD" format, inclusive. 
  8. * @param string $endDate End of the date range to report on in "YYYY-MM-DD" format, inclusive. 
  9. * @param array $optParams Optional parameters. 
  10. * @opt_param string dimension Dimensions to base the report on. 
  11. * @opt_param string filter Filters to be run on the report. 
  12. * @opt_param string locale Optional locale to use for translating report output to a local language. Defaults to "en_US" if not specified. 
  13. * @opt_param string maxResults The maximum number of rows of report data to return. 
  14. * @opt_param string metric Numeric columns to include in the report. 
  15. * @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. 
  16. * @opt_param string startIndex Index of the first row of report data to return. 
  17. * @return google_Report 
  18. */ 
  19. public function generate($startDate, $endDate, $optParams = array()) { 
  20. $params = array('startDate' => $startDate, 'endDate' => $endDate); 
  21. $params = array_merge($params, $optParams); 
  22. $data = $this->__call('generate', array($params)); 
  23. if ($this->useObjects()) { 
  24. return new google_Report($data); 
  25. } else { 
  26. return $data; 
/google-api-php-client/src/contrib/Google_AdsensehostService.php  
  1. class Google_ReportsServiceResource extends Google_ServiceResource { 
  2.  
  3. /** 
  4. * Generate an AdSense report based on the report request sent in the query parameters. Returns the 
  5. * result as JSON; to retrieve output in CSV format specify "alt=csv" as a query parameter. 
  6. * (reports.generate) 
  7. * @param string $startDate Start of the date range to report on in "YYYY-MM-DD" format, inclusive. 
  8. * @param string $endDate End of the date range to report on in "YYYY-MM-DD" format, inclusive. 
  9. * @param array $optParams Optional parameters. 
  10. * @opt_param string dimension Dimensions to base the report on. 
  11. * @opt_param string filter Filters to be run on the report. 
  12. * @opt_param string locale Optional locale to use for translating report output to a local language. Defaults to "en_US" if not specified. 
  13. * @opt_param string maxResults The maximum number of rows of report data to return. 
  14. * @opt_param string metric Numeric columns to include in the report. 
  15. * @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. 
  16. * @opt_param string startIndex Index of the first row of report data to return. 
  17. * @return Google_Report 
  18. */ 
  19. public function generate($startDate, $endDate, $optParams = array()) { 
  20. $params = array('startDate' => $startDate, 'endDate' => $endDate); 
  21. $params = array_merge($params, $optParams); 
  22. $data = $this->__call('generate', array($params)); 
  23. if ($this->useObjects()) { 
  24. return new Google_Report($data); 
  25. } else { 
  26. return $data; 
/google-api-php-client/src/contrib/Google_DfareportingService.php  
  1. class Google_ReportsServiceResource extends Google_ServiceResource { 
  2.  
  3. /** 
  4. * Deletes a report by its ID. (reports.delete) 
  5. * @param string $profileId The DFA user profile ID. 
  6. * @param string $reportId The ID of the report. 
  7. * @param array $optParams Optional parameters. 
  8. */ 
  9. public function delete($profileId, $reportId, $optParams = array()) { 
  10. $params = array('profileId' => $profileId, 'reportId' => $reportId); 
  11. $params = array_merge($params, $optParams); 
  12. $data = $this->__call('delete', array($params)); 
  13. return $data; 
  14. /** 
  15. * Retrieves a report by its ID. (reports.get) 
  16. * @param string $profileId The DFA user profile ID. 
  17. * @param string $reportId The ID of the report. 
  18. * @param array $optParams Optional parameters. 
  19. * @return Google_Report 
  20. */ 
  21. public function get($profileId, $reportId, $optParams = array()) { 
  22. $params = array('profileId' => $profileId, 'reportId' => $reportId); 
  23. $params = array_merge($params, $optParams); 
  24. $data = $this->__call('get', array($params)); 
  25. if ($this->useObjects()) { 
  26. return new Google_Report($data); 
  27. } else { 
  28. return $data; 
  29. /** 
  30. * Creates a report. (reports.insert) 
  31. * @param string $profileId The DFA user profile ID. 
  32. * @param Google_Report $postBody 
  33. * @param array $optParams Optional parameters. 
  34. * @return Google_Report 
  35. */ 
  36. public function insert($profileId, Google_Report $postBody, $optParams = array()) { 
  37. $params = array('profileId' => $profileId, 'postBody' => $postBody); 
  38. $params = array_merge($params, $optParams); 
  39. $data = $this->__call('insert', array($params)); 
  40. if ($this->useObjects()) { 
  41. return new Google_Report($data); 
  42. } else { 
  43. return $data; 
  44. /** 
  45. * Retrieves list of reports. (reports.list) 
  46. * @param string $profileId The DFA user profile ID. 
  47. * @param array $optParams Optional parameters. 
  48. * @opt_param int maxResults Maximum number of results to return. 
  49. * @opt_param string pageToken The value of the nextToken from the previous result page. 
  50. * @opt_param string scope The scope that defines which results are returned, default is 'MINE'. 
  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-php-client/src/contrib/Google_GanService.php  
  1. class Google_ReportsServiceResource extends Google_ServiceResource { 
  2.  
  3. /** 
  4. * Retrieves a report of the specified type. (reports.get) 
  5. * @param string $role The role of the requester. Valid values: 'advertisers' or 'publishers'. 
  6. * @param string $roleId The ID of the requesting advertiser or publisher. 
  7. * @param string $reportType The type of report being requested. Valid values: 'order_delta'. Required. 
  8. * @param array $optParams Optional parameters. 
  9. * @opt_param string advertiserId The IDs of the advertisers to look up, if applicable. 
  10. * @opt_param bool calculateTotals Whether or not to calculate totals rows. Optional. 
  11. * @opt_param string endDate The end date (exclusive), in RFC 3339 format, for the report data to be returned. Defaults to one day after startDate, if that is given, or today. Optional. 
  12. * @opt_param string eventType Filters out all events that are not of the given type. Valid values: 'action', 'transaction', or 'charge'. Optional. 
  13. * @opt_param string linkId Filters to capture one of given link IDs. Optional. 
  14. * @opt_param string maxResults Max number of items to return in this page. Optional. Defaults to return all results. 
  15. * @opt_param string orderId Filters to capture one of the given order IDs. Optional. 
  16. * @opt_param string publisherId The IDs of the publishers to look up, if applicable. 
  17. * @opt_param string startDate The start date (inclusive), in RFC 3339 format, for the report data to be returned. Defaults to one day before endDate, if that is given, or yesterday. Optional. 
  18. * @opt_param string startIndex Offset on which to return results when paging. Optional. 
  19. * @opt_param string status Filters out all events that do not have the given status. Valid values: 'active', 'canceled', or 'invalid'. Optional. 
  20. * @return Google_Report 
  21. */ 
  22. public function get($role, $roleId, $reportType, $optParams = array()) { 
  23. $params = array('role' => $role, 'roleId' => $roleId, 'reportType' => $reportType); 
  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; 
/google-api-php-client/src/contrib/Google_YouTubeAnalyticsService.php  
  1. class Google_ReportsServiceResource extends Google_ServiceResource { 
  2.  
  3. /** 
  4. * Retrieve your YouTube Analytics reports. (reports.query) 
  5. * @param string $ids Identifies the YouTube channel or content owner for which you are retrieving YouTube Analytics data. 
  6. - 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. 
  7. - 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. 
  8. * @param string $start_date The start date for fetching YouTube Analytics data. The value should be in YYYY-MM-DD format. 
  9. * @param string $end_date The end date for fetching YouTube Analytics data. The value should be in YYYY-MM-DD format. 
  10. * @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. 
  11. * @param array $optParams Optional parameters. 
  12. * @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. 
  13. * @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. 
  14. * @opt_param int max-results The maximum number of rows to include in the response. 
  15. * @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. 
  16. * @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). 
  17. * @return Google_ResultTable 
  18. */ 
  19. public function query($ids, $start_date, $end_date, $metrics, $optParams = array()) { 
  20. $params = array('ids' => $ids, 'start-date' => $start_date, 'end-date' => $end_date, 'metrics' => $metrics); 
  21. $params = array_merge($params, $optParams); 
  22. $data = $this->__call('query', array($params)); 
  23. if ($this->useObjects()) { 
  24. return new Google_ResultTable($data); 
  25. } else { 
  26. return $data;