1<?php 2/* 3 * Copyright 2014 Google Inc. 4 * 5 * Licensed under the Apache License, Version 2.0 (the "License"); you may not 6 * use this file except in compliance with the License. You may obtain a copy of 7 * the License at 8 * 9 * http://www.apache.org/licenses/LICENSE-2.0 10 * 11 * Unless required by applicable law or agreed to in writing, software 12 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 13 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 14 * License for the specific language governing permissions and limitations under 15 * the License. 16 */ 17 18/** 19 * The "reports" collection of methods. 20 * Typical usage is: 21 * <code> 22 * $doubleclicksearchService = new Google_Service_Doubleclicksearch(...); 23 * $reports = $doubleclicksearchService->reports; 24 * </code> 25 */ 26class Google_Service_Doubleclicksearch_Resource_Reports extends Google_Service_Resource 27{ 28 /** 29 * Generates and returns a report immediately. (reports.generate) 30 * 31 * @param Google_Service_Doubleclicksearch_ReportRequest $postBody 32 * @param array $optParams Optional parameters. 33 * @return Google_Service_Doubleclicksearch_Report 34 */ 35 public function generate(Google_Service_Doubleclicksearch_ReportRequest $postBody, $optParams = array()) 36 { 37 $params = array('postBody' => $postBody); 38 $params = array_merge($params, $optParams); 39 return $this->call('generate', array($params), "Google_Service_Doubleclicksearch_Report"); 40 } 41 /** 42 * Polls for the status of a report request. (reports.get) 43 * 44 * @param string $reportId ID of the report request being polled. 45 * @param array $optParams Optional parameters. 46 * @return Google_Service_Doubleclicksearch_Report 47 */ 48 public function get($reportId, $optParams = array()) 49 { 50 $params = array('reportId' => $reportId); 51 $params = array_merge($params, $optParams); 52 return $this->call('get', array($params), "Google_Service_Doubleclicksearch_Report"); 53 } 54 /** 55 * Downloads a report file encoded in UTF-8. (reports.getFile) 56 * 57 * @param string $reportId ID of the report. 58 * @param int $reportFragment The index of the report fragment to download. 59 * @param array $optParams Optional parameters. 60 */ 61 public function getFile($reportId, $reportFragment, $optParams = array()) 62 { 63 $params = array('reportId' => $reportId, 'reportFragment' => $reportFragment); 64 $params = array_merge($params, $optParams); 65 return $this->call('getFile', array($params)); 66 } 67 /** 68 * Inserts a report request into the reporting system. (reports.request) 69 * 70 * @param Google_Service_Doubleclicksearch_ReportRequest $postBody 71 * @param array $optParams Optional parameters. 72 * @return Google_Service_Doubleclicksearch_Report 73 */ 74 public function request(Google_Service_Doubleclicksearch_ReportRequest $postBody, $optParams = array()) 75 { 76 $params = array('postBody' => $postBody); 77 $params = array_merge($params, $optParams); 78 return $this->call('request', array($params), "Google_Service_Doubleclicksearch_Report"); 79 } 80} 81