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 * Service definition for Surveys (v2). 20 * 21 * <p> 22 * Creates and conducts surveys, lists the surveys that an authenticated user 23 * owns, and retrieves survey results and information about specified surveys.</p> 24 * 25 * <p> 26 * For more information about this service, see the API 27 * <a href="" target="_blank">Documentation</a> 28 * </p> 29 * 30 * @author Google, Inc. 31 */ 32class Google_Service_Surveys extends Google_Service 33{ 34 /** View and manage your surveys and results. */ 35 const SURVEYS = 36 "https://www.googleapis.com/auth/surveys"; 37 /** View your surveys and survey results. */ 38 const SURVEYS_READONLY = 39 "https://www.googleapis.com/auth/surveys.readonly"; 40 /** View your email address. */ 41 const USERINFO_EMAIL = 42 "https://www.googleapis.com/auth/userinfo.email"; 43 44 public $results; 45 public $surveys; 46 47 /** 48 * Constructs the internal representation of the Surveys service. 49 * 50 * @param Google_Client $client 51 */ 52 public function __construct(Google_Client $client) 53 { 54 parent::__construct($client); 55 $this->rootUrl = 'https://www.googleapis.com/'; 56 $this->servicePath = 'surveys/v2/'; 57 $this->batchPath = 'batch/surveys/v2'; 58 $this->version = 'v2'; 59 $this->serviceName = 'surveys'; 60 61 $this->results = new Google_Service_Surveys_Resource_Results( 62 $this, 63 $this->serviceName, 64 'results', 65 array( 66 'methods' => array( 67 'get' => array( 68 'path' => 'surveys/{surveyUrlId}/results', 69 'httpMethod' => 'GET', 70 'parameters' => array( 71 'surveyUrlId' => array( 72 'location' => 'path', 73 'type' => 'string', 74 'required' => true, 75 ), 76 ), 77 ), 78 ) 79 ) 80 ); 81 $this->surveys = new Google_Service_Surveys_Resource_Surveys( 82 $this, 83 $this->serviceName, 84 'surveys', 85 array( 86 'methods' => array( 87 'delete' => array( 88 'path' => 'surveys/{surveyUrlId}', 89 'httpMethod' => 'DELETE', 90 'parameters' => array( 91 'surveyUrlId' => array( 92 'location' => 'path', 93 'type' => 'string', 94 'required' => true, 95 ), 96 ), 97 ),'get' => array( 98 'path' => 'surveys/{surveyUrlId}', 99 'httpMethod' => 'GET', 100 'parameters' => array( 101 'surveyUrlId' => array( 102 'location' => 'path', 103 'type' => 'string', 104 'required' => true, 105 ), 106 ), 107 ),'insert' => array( 108 'path' => 'surveys', 109 'httpMethod' => 'POST', 110 'parameters' => array(), 111 ),'list' => array( 112 'path' => 'surveys', 113 'httpMethod' => 'GET', 114 'parameters' => array( 115 'maxResults' => array( 116 'location' => 'query', 117 'type' => 'integer', 118 ), 119 'startIndex' => array( 120 'location' => 'query', 121 'type' => 'integer', 122 ), 123 'token' => array( 124 'location' => 'query', 125 'type' => 'string', 126 ), 127 ), 128 ),'start' => array( 129 'path' => 'surveys/{resourceId}/start', 130 'httpMethod' => 'POST', 131 'parameters' => array( 132 'resourceId' => array( 133 'location' => 'path', 134 'type' => 'string', 135 'required' => true, 136 ), 137 ), 138 ),'stop' => array( 139 'path' => 'surveys/{resourceId}/stop', 140 'httpMethod' => 'POST', 141 'parameters' => array( 142 'resourceId' => array( 143 'location' => 'path', 144 'type' => 'string', 145 'required' => true, 146 ), 147 ), 148 ),'update' => array( 149 'path' => 'surveys/{surveyUrlId}', 150 'httpMethod' => 'PUT', 151 'parameters' => array( 152 'surveyUrlId' => array( 153 'location' => 'path', 154 'type' => 'string', 155 'required' => true, 156 ), 157 ), 158 ), 159 ) 160 ) 161 ); 162 } 163} 164