Sin descripción

ConsumerSurveys.php 6.5KB

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