google-api-client 0.8.7 → 0.9.pre1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (397) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +20 -0
  3. data/.rspec +2 -0
  4. data/.rubocop.yml +7 -0
  5. data/.rubocop_todo.yml +63 -0
  6. data/.travis.yml +21 -0
  7. data/.yardopts +12 -0
  8. data/CHANGELOG.md +6 -3
  9. data/CONTRIBUTING.md +31 -0
  10. data/Gemfile +28 -2
  11. data/MIGRATING.md +171 -0
  12. data/README.md +158 -150
  13. data/Rakefile +1 -40
  14. data/api_names.yaml +872 -0
  15. data/api_names_out.yaml +20843 -0
  16. data/bin/generate-api +93 -0
  17. data/generated/google/apis/adexchangebuyer_v1_3.rb +35 -0
  18. data/generated/google/apis/adexchangebuyer_v1_3/classes.rb +1124 -0
  19. data/generated/google/apis/adexchangebuyer_v1_3/representations.rb +375 -0
  20. data/generated/google/apis/adexchangebuyer_v1_3/service.rb +893 -0
  21. data/generated/google/apis/adexchangeseller_v2_0.rb +38 -0
  22. data/generated/google/apis/adexchangeseller_v2_0/classes.rb +792 -0
  23. data/generated/google/apis/adexchangeseller_v2_0/representations.rb +309 -0
  24. data/generated/google/apis/adexchangeseller_v2_0/service.rb +682 -0
  25. data/generated/google/apis/admin_directory_v1.rb +89 -0
  26. data/generated/google/apis/admin_directory_v1/classes.rb +2389 -0
  27. data/generated/google/apis/admin_directory_v1/representations.rb +780 -0
  28. data/generated/google/apis/admin_directory_v1/service.rb +2805 -0
  29. data/generated/google/apis/admin_reports_v1.rb +38 -0
  30. data/generated/google/apis/admin_reports_v1/classes.rb +582 -0
  31. data/generated/google/apis/admin_reports_v1/representations.rb +231 -0
  32. data/generated/google/apis/admin_reports_v1/service.rb +341 -0
  33. data/generated/google/apis/adsense_v1_4.rb +38 -0
  34. data/generated/google/apis/adsense_v1_4/classes.rb +1279 -0
  35. data/generated/google/apis/adsense_v1_4/representations.rb +493 -0
  36. data/generated/google/apis/adsense_v1_4/service.rb +1752 -0
  37. data/generated/google/apis/adsensehost_v4_1.rb +35 -0
  38. data/generated/google/apis/adsensehost_v4_1/classes.rb +834 -0
  39. data/generated/google/apis/adsensehost_v4_1/representations.rb +327 -0
  40. data/generated/google/apis/adsensehost_v4_1/service.rb +1190 -0
  41. data/generated/google/apis/analytics_v3.rb +49 -0
  42. data/generated/google/apis/analytics_v3/classes.rb +5113 -0
  43. data/generated/google/apis/analytics_v3/representations.rb +1661 -0
  44. data/generated/google/apis/analytics_v3/service.rb +3600 -0
  45. data/generated/google/apis/androidenterprise_v1.rb +34 -0
  46. data/generated/google/apis/androidenterprise_v1/classes.rb +1162 -0
  47. data/generated/google/apis/androidenterprise_v1/representations.rb +431 -0
  48. data/generated/google/apis/androidenterprise_v1/service.rb +1979 -0
  49. data/generated/google/apis/androidpublisher_v2.rb +34 -0
  50. data/generated/google/apis/androidpublisher_v2/classes.rb +1374 -0
  51. data/generated/google/apis/androidpublisher_v2/representations.rb +630 -0
  52. data/generated/google/apis/androidpublisher_v2/service.rb +2390 -0
  53. data/generated/google/apis/appsactivity_v1.rb +46 -0
  54. data/generated/google/apis/appsactivity_v1/classes.rb +392 -0
  55. data/generated/google/apis/appsactivity_v1/representations.rb +184 -0
  56. data/generated/google/apis/appsactivity_v1/service.rb +129 -0
  57. data/generated/google/apis/appstate_v1.rb +34 -0
  58. data/generated/google/apis/appstate_v1/classes.rb +154 -0
  59. data/generated/google/apis/appstate_v1/representations.rb +79 -0
  60. data/generated/google/apis/appstate_v1/service.rb +265 -0
  61. data/generated/google/apis/autoscaler_v1beta2.rb +38 -0
  62. data/generated/google/apis/autoscaler_v1beta2/classes.rb +747 -0
  63. data/generated/google/apis/autoscaler_v1beta2/representations.rb +281 -0
  64. data/generated/google/apis/autoscaler_v1beta2/service.rb +488 -0
  65. data/generated/google/apis/bigquery_v2.rb +49 -0
  66. data/generated/google/apis/bigquery_v2/classes.rb +2255 -0
  67. data/generated/google/apis/bigquery_v2/representations.rb +754 -0
  68. data/generated/google/apis/bigquery_v2/service.rb +1003 -0
  69. data/generated/google/apis/blogger_v3.rb +37 -0
  70. data/generated/google/apis/blogger_v3/classes.rb +1354 -0
  71. data/generated/google/apis/blogger_v3/representations.rb +562 -0
  72. data/generated/google/apis/blogger_v3/service.rb +1620 -0
  73. data/generated/google/apis/books_v1.rb +34 -0
  74. data/generated/google/apis/books_v1/classes.rb +3515 -0
  75. data/generated/google/apis/books_v1/representations.rb +1361 -0
  76. data/generated/google/apis/books_v1/service.rb +2170 -0
  77. data/generated/google/apis/calendar_v3.rb +37 -0
  78. data/generated/google/apis/calendar_v3/classes.rb +1702 -0
  79. data/generated/google/apis/calendar_v3/representations.rb +566 -0
  80. data/generated/google/apis/calendar_v3/service.rb +1943 -0
  81. data/generated/google/apis/civicinfo_v2.rb +31 -0
  82. data/generated/google/apis/civicinfo_v2/classes.rb +1057 -0
  83. data/generated/google/apis/civicinfo_v2/representations.rb +374 -0
  84. data/generated/google/apis/civicinfo_v2/service.rb +284 -0
  85. data/generated/google/apis/cloudmonitoring_v2beta2.rb +34 -0
  86. data/generated/google/apis/cloudmonitoring_v2beta2/classes.rb +679 -0
  87. data/generated/google/apis/cloudmonitoring_v2beta2/representations.rb +311 -0
  88. data/generated/google/apis/cloudmonitoring_v2beta2/service.rb +458 -0
  89. data/generated/google/apis/cloudresourcemanager_v1beta1.rb +38 -0
  90. data/generated/google/apis/cloudresourcemanager_v1beta1/classes.rb +139 -0
  91. data/generated/google/apis/cloudresourcemanager_v1beta1/representations.rb +65 -0
  92. data/generated/google/apis/cloudresourcemanager_v1beta1/service.rb +301 -0
  93. data/generated/google/apis/compute_v1.rb +49 -0
  94. data/generated/google/apis/compute_v1/classes.rb +6391 -0
  95. data/generated/google/apis/compute_v1/representations.rb +2209 -0
  96. data/generated/google/apis/compute_v1/service.rb +6352 -0
  97. data/generated/google/apis/container_v1beta1.rb +35 -0
  98. data/generated/google/apis/container_v1beta1/classes.rb +466 -0
  99. data/generated/google/apis/container_v1beta1/representations.rb +177 -0
  100. data/generated/google/apis/container_v1beta1/service.rb +394 -0
  101. data/generated/google/apis/content_v2.rb +35 -0
  102. data/generated/google/apis/content_v2/classes.rb +3780 -0
  103. data/generated/google/apis/content_v2/representations.rb +1456 -0
  104. data/generated/google/apis/content_v2/service.rb +1706 -0
  105. data/generated/google/apis/coordinate_v1.rb +37 -0
  106. data/generated/google/apis/coordinate_v1/classes.rb +669 -0
  107. data/generated/google/apis/coordinate_v1/representations.rb +285 -0
  108. data/generated/google/apis/coordinate_v1/service.rb +687 -0
  109. data/{lib/google/api_client/auth/compute_service_account.rb → generated/google/apis/customsearch_v1.rb} +13 -10
  110. data/generated/google/apis/customsearch_v1/classes.rb +771 -0
  111. data/generated/google/apis/customsearch_v1/representations.rb +276 -0
  112. data/generated/google/apis/customsearch_v1/service.rb +208 -0
  113. data/generated/google/apis/datastore_v1beta2.rb +40 -0
  114. data/generated/google/apis/datastore_v1beta2/classes.rb +1186 -0
  115. data/generated/google/apis/datastore_v1beta2/representations.rb +526 -0
  116. data/generated/google/apis/datastore_v1beta2/service.rb +300 -0
  117. data/generated/google/apis/deploymentmanager_v2beta2.rb +41 -0
  118. data/generated/google/apis/deploymentmanager_v2beta2/classes.rb +820 -0
  119. data/generated/google/apis/deploymentmanager_v2beta2/representations.rb +303 -0
  120. data/generated/google/apis/deploymentmanager_v2beta2/service.rb +647 -0
  121. data/generated/google/apis/dfareporting_v2_1.rb +37 -0
  122. data/generated/google/apis/dfareporting_v2_1/classes.rb +10755 -0
  123. data/generated/google/apis/dfareporting_v2_1/representations.rb +3438 -0
  124. data/generated/google/apis/dfareporting_v2_1/service.rb +8775 -0
  125. data/generated/google/apis/discovery_v1.rb +32 -0
  126. data/generated/google/apis/discovery_v1/classes.rb +947 -0
  127. data/generated/google/apis/discovery_v1/representations.rb +355 -0
  128. data/generated/google/apis/discovery_v1/service.rb +144 -0
  129. data/generated/google/apis/dns_v1.rb +41 -0
  130. data/generated/google/apis/dns_v1/classes.rb +406 -0
  131. data/generated/google/apis/dns_v1/representations.rb +151 -0
  132. data/generated/google/apis/dns_v1/service.rb +460 -0
  133. data/{spec/google/api_client/request_spec.rb → generated/google/apis/doubleclickbidmanager_v1.rb} +15 -13
  134. data/generated/google/apis/doubleclickbidmanager_v1/classes.rb +709 -0
  135. data/generated/google/apis/doubleclickbidmanager_v1/representations.rb +297 -0
  136. data/generated/google/apis/doubleclickbidmanager_v1/service.rb +349 -0
  137. data/generated/google/apis/doubleclicksearch_v2.rb +35 -0
  138. data/generated/google/apis/doubleclicksearch_v2/classes.rb +947 -0
  139. data/generated/google/apis/doubleclicksearch_v2/representations.rb +315 -0
  140. data/generated/google/apis/doubleclicksearch_v2/service.rb +490 -0
  141. data/generated/google/apis/drive_v2.rb +55 -0
  142. data/generated/google/apis/drive_v2/classes.rb +2519 -0
  143. data/generated/google/apis/drive_v2/representations.rb +781 -0
  144. data/generated/google/apis/drive_v2/service.rb +2685 -0
  145. data/generated/google/apis/fitness_v1.rb +49 -0
  146. data/generated/google/apis/fitness_v1/classes.rb +809 -0
  147. data/generated/google/apis/fitness_v1/representations.rb +295 -0
  148. data/generated/google/apis/fitness_v1/service.rb +684 -0
  149. data/generated/google/apis/fusiontables_v2.rb +37 -0
  150. data/generated/google/apis/fusiontables_v2/classes.rb +1048 -0
  151. data/generated/google/apis/fusiontables_v2/representations.rb +409 -0
  152. data/generated/google/apis/fusiontables_v2/service.rb +1496 -0
  153. data/generated/google/apis/games_configuration_v1configuration.rb +34 -0
  154. data/generated/google/apis/games_configuration_v1configuration/classes.rb +506 -0
  155. data/generated/google/apis/games_configuration_v1configuration/representations.rb +206 -0
  156. data/generated/google/apis/games_configuration_v1configuration/service.rb +578 -0
  157. data/generated/google/apis/games_v1.rb +40 -0
  158. data/generated/google/apis/games_v1/classes.rb +4578 -0
  159. data/generated/google/apis/games_v1/representations.rb +1570 -0
  160. data/generated/google/apis/games_v1/service.rb +2306 -0
  161. data/generated/google/apis/gan_v1beta1.rb +31 -0
  162. data/generated/google/apis/gan_v1beta1/classes.rb +1428 -0
  163. data/generated/google/apis/gan_v1beta1/representations.rb +428 -0
  164. data/generated/google/apis/gan_v1beta1/service.rb +692 -0
  165. data/generated/google/apis/genomics_v1beta2.rb +46 -0
  166. data/generated/google/apis/genomics_v1beta2/classes.rb +3288 -0
  167. data/generated/google/apis/genomics_v1beta2/representations.rb +1194 -0
  168. data/generated/google/apis/genomics_v1beta2/service.rb +2356 -0
  169. data/generated/google/apis/gmail_v1.rb +49 -0
  170. data/generated/google/apis/gmail_v1/classes.rb +794 -0
  171. data/generated/google/apis/gmail_v1/representations.rb +339 -0
  172. data/generated/google/apis/gmail_v1/service.rb +1502 -0
  173. data/generated/google/apis/groupsmigration_v1.rb +34 -0
  174. data/generated/google/apis/groupsmigration_v1/classes.rb +51 -0
  175. data/generated/google/apis/groupsmigration_v1/representations.rb +38 -0
  176. data/generated/google/apis/groupsmigration_v1/service.rb +111 -0
  177. data/generated/google/apis/groupssettings_v1.rb +34 -0
  178. data/generated/google/apis/groupssettings_v1/classes.rb +221 -0
  179. data/generated/google/apis/groupssettings_v1/representations.rb +64 -0
  180. data/generated/google/apis/groupssettings_v1/service.rb +179 -0
  181. data/generated/google/apis/identitytoolkit_v3.rb +31 -0
  182. data/generated/google/apis/identitytoolkit_v3/classes.rb +1229 -0
  183. data/generated/google/apis/identitytoolkit_v3/representations.rb +422 -0
  184. data/generated/google/apis/identitytoolkit_v3/service.rb +491 -0
  185. data/generated/google/apis/licensing_v1.rb +34 -0
  186. data/generated/google/apis/licensing_v1/classes.rb +132 -0
  187. data/generated/google/apis/licensing_v1/representations.rb +68 -0
  188. data/generated/google/apis/licensing_v1/service.rb +376 -0
  189. data/generated/google/apis/logging_v1beta3.rb +35 -0
  190. data/generated/google/apis/logging_v1beta3/classes.rb +505 -0
  191. data/generated/google/apis/logging_v1beta3/representations.rb +222 -0
  192. data/generated/google/apis/logging_v1beta3/service.rb +670 -0
  193. data/generated/google/apis/manager_v1beta2.rb +50 -0
  194. data/generated/google/apis/manager_v1beta2/classes.rb +1287 -0
  195. data/generated/google/apis/manager_v1beta2/representations.rb +536 -0
  196. data/generated/google/apis/manager_v1beta2/service.rb +380 -0
  197. data/generated/google/apis/mapsengine_v1.rb +38 -0
  198. data/generated/google/apis/mapsengine_v1/classes.rb +2873 -0
  199. data/generated/google/apis/mapsengine_v1/representations.rb +1235 -0
  200. data/generated/google/apis/mapsengine_v1/service.rb +3465 -0
  201. data/generated/google/apis/mirror_v1.rb +37 -0
  202. data/generated/google/apis/mirror_v1/classes.rb +1072 -0
  203. data/generated/google/apis/mirror_v1/representations.rb +350 -0
  204. data/generated/google/apis/mirror_v1/service.rb +1001 -0
  205. data/generated/google/apis/oauth2_v2.rb +43 -0
  206. data/generated/google/apis/oauth2_v2/classes.rb +245 -0
  207. data/generated/google/apis/oauth2_v2/representations.rb +94 -0
  208. data/generated/google/apis/oauth2_v2/service.rb +203 -0
  209. data/generated/google/apis/pagespeedonline_v2.rb +32 -0
  210. data/generated/google/apis/pagespeedonline_v2/classes.rb +614 -0
  211. data/generated/google/apis/pagespeedonline_v2/representations.rb +244 -0
  212. data/generated/google/apis/pagespeedonline_v2/service.rb +120 -0
  213. data/generated/google/apis/plus_domains_v1.rb +61 -0
  214. data/generated/google/apis/plus_domains_v1/classes.rb +2402 -0
  215. data/generated/google/apis/plus_domains_v1/representations.rb +873 -0
  216. data/generated/google/apis/plus_domains_v1/service.rb +924 -0
  217. data/generated/google/apis/plus_v1.rb +43 -0
  218. data/generated/google/apis/plus_v1/classes.rb +2384 -0
  219. data/generated/google/apis/plus_v1/representations.rb +812 -0
  220. data/generated/google/apis/plus_v1/service.rb +616 -0
  221. data/generated/google/apis/prediction_v1_6.rb +44 -0
  222. data/generated/google/apis/prediction_v1_6/classes.rb +751 -0
  223. data/generated/google/apis/prediction_v1_6/representations.rb +327 -0
  224. data/generated/google/apis/prediction_v1_6/service.rb +388 -0
  225. data/generated/google/apis/pubsub_v1beta2.rb +37 -0
  226. data/generated/google/apis/pubsub_v1beta2/classes.rb +824 -0
  227. data/generated/google/apis/pubsub_v1beta2/representations.rb +366 -0
  228. data/generated/google/apis/pubsub_v1beta2/service.rb +778 -0
  229. data/generated/google/apis/qpx_express_v1.rb +31 -0
  230. data/generated/google/apis/qpx_express_v1/classes.rb +1268 -0
  231. data/generated/google/apis/qpx_express_v1/representations.rb +424 -0
  232. data/generated/google/apis/qpx_express_v1/service.rb +101 -0
  233. data/generated/google/apis/replicapool_v1beta2.rb +41 -0
  234. data/generated/google/apis/replicapool_v1beta2/classes.rb +621 -0
  235. data/generated/google/apis/replicapool_v1beta2/representations.rb +235 -0
  236. data/generated/google/apis/replicapool_v1beta2/service.rb +620 -0
  237. data/generated/google/apis/replicapoolupdater_v1beta1.rb +41 -0
  238. data/generated/google/apis/replicapoolupdater_v1beta1/classes.rb +682 -0
  239. data/generated/google/apis/replicapoolupdater_v1beta1/representations.rb +247 -0
  240. data/generated/google/apis/replicapoolupdater_v1beta1/service.rb +472 -0
  241. data/generated/google/apis/reseller_v1.rb +37 -0
  242. data/generated/google/apis/reseller_v1/classes.rb +502 -0
  243. data/generated/google/apis/reseller_v1/representations.rb +199 -0
  244. data/generated/google/apis/reseller_v1/service.rb +637 -0
  245. data/generated/google/apis/resourceviews_v1beta2.rb +47 -0
  246. data/generated/google/apis/resourceviews_v1beta2/classes.rb +660 -0
  247. data/generated/google/apis/resourceviews_v1beta2/representations.rb +269 -0
  248. data/generated/google/apis/resourceviews_v1beta2/service.rb +574 -0
  249. data/generated/google/apis/site_verification_v1.rb +37 -0
  250. data/generated/google/apis/site_verification_v1/classes.rb +185 -0
  251. data/generated/google/apis/site_verification_v1/representations.rb +101 -0
  252. data/generated/google/apis/site_verification_v1/service.rb +322 -0
  253. data/generated/google/apis/sqladmin_v1beta4.rb +37 -0
  254. data/generated/google/apis/sqladmin_v1beta4/classes.rb +1817 -0
  255. data/generated/google/apis/sqladmin_v1beta4/representations.rb +688 -0
  256. data/generated/google/apis/sqladmin_v1beta4/service.rb +1534 -0
  257. data/generated/google/apis/storage_v1.rb +43 -0
  258. data/generated/google/apis/storage_v1/classes.rb +1177 -0
  259. data/generated/google/apis/storage_v1/representations.rb +427 -0
  260. data/generated/google/apis/storage_v1/service.rb +1920 -0
  261. data/generated/google/apis/tagmanager_v1.rb +52 -0
  262. data/generated/google/apis/tagmanager_v1/classes.rb +1226 -0
  263. data/generated/google/apis/tagmanager_v1/representations.rb +461 -0
  264. data/generated/google/apis/tagmanager_v1/service.rb +1978 -0
  265. data/generated/google/apis/taskqueue_v1beta2.rb +37 -0
  266. data/generated/google/apis/taskqueue_v1beta2/classes.rb +254 -0
  267. data/generated/google/apis/taskqueue_v1beta2/representations.rb +114 -0
  268. data/generated/google/apis/taskqueue_v1beta2/service.rb +416 -0
  269. data/generated/google/apis/tasks_v1.rb +37 -0
  270. data/generated/google/apis/tasks_v1/classes.rb +296 -0
  271. data/generated/google/apis/tasks_v1/representations.rb +115 -0
  272. data/generated/google/apis/tasks_v1/service.rb +657 -0
  273. data/generated/google/apis/translate_v2.rb +31 -0
  274. data/generated/google/apis/translate_v2/classes.rb +168 -0
  275. data/generated/google/apis/translate_v2/representations.rb +109 -0
  276. data/generated/google/apis/translate_v2/service.rb +185 -0
  277. data/generated/google/apis/urlshortener_v1.rb +34 -0
  278. data/generated/google/apis/urlshortener_v1/classes.rb +246 -0
  279. data/generated/google/apis/urlshortener_v1/representations.rb +111 -0
  280. data/generated/google/apis/urlshortener_v1/service.rb +179 -0
  281. data/generated/google/apis/webmasters_v3.rb +37 -0
  282. data/generated/google/apis/webmasters_v3/classes.rb +563 -0
  283. data/generated/google/apis/webmasters_v3/representations.rb +250 -0
  284. data/generated/google/apis/webmasters_v3/service.rb +587 -0
  285. data/generated/google/apis/youtube_analytics_v1.rb +46 -0
  286. data/generated/google/apis/youtube_analytics_v1/classes.rb +540 -0
  287. data/generated/google/apis/youtube_analytics_v1/representations.rb +242 -0
  288. data/generated/google/apis/youtube_analytics_v1/service.rb +567 -0
  289. data/generated/google/apis/youtube_v3.rb +49 -0
  290. data/generated/google/apis/youtube_v3/classes.rb +7225 -0
  291. data/generated/google/apis/youtube_v3/representations.rb +2529 -0
  292. data/generated/google/apis/youtube_v3/service.rb +4051 -0
  293. data/google-api-client.gemspec +27 -39
  294. data/lib/google/api_client/auth/storage.rb +3 -2
  295. data/lib/google/api_client/auth/storages/file_store.rb +1 -3
  296. data/lib/google/api_client/auth/storages/redis_store.rb +6 -2
  297. data/lib/google/apis.rb +48 -0
  298. data/lib/google/apis/core/api_command.rb +128 -0
  299. data/lib/google/apis/core/base_service.rb +314 -0
  300. data/lib/google/apis/core/batch.rb +222 -0
  301. data/lib/google/apis/core/download.rb +94 -0
  302. data/lib/google/apis/core/hashable.rb +44 -0
  303. data/lib/google/apis/core/http_command.rb +275 -0
  304. data/lib/google/apis/core/json_representation.rb +122 -0
  305. data/lib/google/{api_client/version.rb → apis/core/logging.rb} +12 -8
  306. data/lib/google/apis/core/multipart.rb +173 -0
  307. data/lib/google/apis/core/upload.rb +275 -0
  308. data/lib/google/{api_client → apis}/errors.rb +32 -28
  309. data/lib/google/apis/generator.rb +70 -0
  310. data/lib/google/apis/generator/annotator.rb +271 -0
  311. data/lib/google/apis/generator/helpers.rb +74 -0
  312. data/lib/google/apis/generator/model.rb +130 -0
  313. data/lib/google/apis/generator/template.rb +124 -0
  314. data/lib/google/apis/generator/templates/_class.tmpl +40 -0
  315. data/lib/google/apis/generator/templates/_method.tmpl +90 -0
  316. data/lib/google/apis/generator/templates/_representation.tmpl +51 -0
  317. data/lib/google/apis/generator/templates/_representation_stub.tmpl +15 -0
  318. data/lib/google/apis/generator/templates/_representation_type.tmpl +10 -0
  319. data/lib/google/{api_client/reference.rb → apis/generator/templates/classes.rb.tmpl} +11 -9
  320. data/lib/google/apis/generator/templates/module.rb.tmpl +40 -0
  321. data/lib/google/apis/generator/templates/representations.rb.tmpl +32 -0
  322. data/lib/google/apis/generator/templates/service.rb.tmpl +60 -0
  323. data/lib/google/apis/options.rb +79 -0
  324. data/lib/google/apis/version.rb +39 -0
  325. data/rakelib/metrics.rake +22 -0
  326. data/rakelib/rubocop.rake +10 -0
  327. data/rakelib/spec.rake +11 -0
  328. data/rakelib/yard.rake +11 -0
  329. data/samples/calendar/calendar.rb +43 -0
  330. data/samples/drive/drive.rb +40 -0
  331. data/samples/pubsub/pubsub.rb +52 -0
  332. data/{lib/google/api_client/discovery.rb → samples/translate/translate.rb} +14 -5
  333. data/script/generate +79 -0
  334. data/script/package +8 -0
  335. data/script/release +15 -0
  336. data/spec/fixtures/files/api_names.yaml +3 -0
  337. data/spec/fixtures/files/auth_stored_credentials.json +8 -0
  338. data/spec/fixtures/files/client_secrets.json +1 -0
  339. data/spec/fixtures/files/test.blah +1 -0
  340. data/spec/fixtures/files/test.txt +1 -0
  341. data/spec/fixtures/files/test_api.json +440 -0
  342. data/spec/google/api_client/auth/storage_spec.rb +1 -3
  343. data/spec/google/api_client/auth/storages/file_store_spec.rb +1 -2
  344. data/spec/google/api_client/auth/storages/redis_store_spec.rb +1 -3
  345. data/spec/google/apis/core/api_command_spec.rb +170 -0
  346. data/spec/google/apis/core/batch_spec.rb +128 -0
  347. data/spec/google/apis/core/download_spec.rb +90 -0
  348. data/spec/google/apis/core/hashable_spec.rb +60 -0
  349. data/spec/google/apis/core/http_command_spec.rb +238 -0
  350. data/spec/google/apis/core/json_representation_spec.rb +192 -0
  351. data/spec/google/apis/core/service_spec.rb +247 -0
  352. data/spec/google/apis/core/upload_spec.rb +238 -0
  353. data/{lib/google/api_client/service_account.rb → spec/google/apis/generated_spec.rb} +14 -8
  354. data/spec/google/apis/generator/generator_spec.rb +272 -0
  355. data/spec/google/apis/logging_spec.rb +45 -0
  356. data/spec/google/apis/options_spec.rb +40 -0
  357. data/spec/integration_tests/drive_spec.rb +35 -0
  358. data/spec/integration_tests/pubsub_spec.rb +48 -0
  359. data/spec/integration_tests/url_shortener_spec.rb +31 -0
  360. data/spec/spec_helper.rb +102 -46
  361. metadata +433 -178
  362. data/lib/compat/multi_json.rb +0 -19
  363. data/lib/google/api_client.rb +0 -750
  364. data/lib/google/api_client/auth/file_storage.rb +0 -59
  365. data/lib/google/api_client/auth/jwt_asserter.rb +0 -126
  366. data/lib/google/api_client/auth/key_utils.rb +0 -93
  367. data/lib/google/api_client/auth/pkcs12.rb +0 -41
  368. data/lib/google/api_client/batch.rb +0 -326
  369. data/lib/google/api_client/charset.rb +0 -33
  370. data/lib/google/api_client/discovery/api.rb +0 -310
  371. data/lib/google/api_client/discovery/media.rb +0 -77
  372. data/lib/google/api_client/discovery/method.rb +0 -363
  373. data/lib/google/api_client/discovery/resource.rb +0 -156
  374. data/lib/google/api_client/discovery/schema.rb +0 -117
  375. data/lib/google/api_client/environment.rb +0 -42
  376. data/lib/google/api_client/gzip.rb +0 -28
  377. data/lib/google/api_client/logging.rb +0 -32
  378. data/lib/google/api_client/media.rb +0 -259
  379. data/lib/google/api_client/railtie.rb +0 -18
  380. data/lib/google/api_client/request.rb +0 -350
  381. data/lib/google/api_client/result.rb +0 -255
  382. data/lib/google/api_client/service.rb +0 -233
  383. data/lib/google/api_client/service/batch.rb +0 -110
  384. data/lib/google/api_client/service/request.rb +0 -144
  385. data/lib/google/api_client/service/resource.rb +0 -40
  386. data/lib/google/api_client/service/result.rb +0 -162
  387. data/lib/google/api_client/service/simple_file_store.rb +0 -151
  388. data/lib/google/api_client/service/stub_generator.rb +0 -61
  389. data/spec/google/api_client/batch_spec.rb +0 -248
  390. data/spec/google/api_client/discovery_spec.rb +0 -708
  391. data/spec/google/api_client/gzip_spec.rb +0 -98
  392. data/spec/google/api_client/media_spec.rb +0 -178
  393. data/spec/google/api_client/result_spec.rb +0 -207
  394. data/spec/google/api_client/service_account_spec.rb +0 -169
  395. data/spec/google/api_client/service_spec.rb +0 -618
  396. data/spec/google/api_client/simple_file_store_spec.rb +0 -133
  397. data/spec/google/api_client_spec.rb +0 -352
@@ -0,0 +1,2306 @@
1
+ # Copyright 2015 Google Inc.
2
+ #
3
+ # Licensed under the Apache License, Version 2.0 (the "License");
4
+ # you may not use this file except in compliance with the License.
5
+ # You may obtain a copy of the License at
6
+ #
7
+ # http://www.apache.org/licenses/LICENSE-2.0
8
+ #
9
+ # Unless required by applicable law or agreed to in writing, software
10
+ # distributed under the License is distributed on an "AS IS" BASIS,
11
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ # See the License for the specific language governing permissions and
13
+ # limitations under the License.
14
+
15
+ require 'google/apis/core/base_service'
16
+ require 'google/apis/core/json_representation'
17
+ require 'google/apis/core/hashable'
18
+ require 'google/apis/errors'
19
+
20
+ module Google
21
+ module Apis
22
+ module GamesV1
23
+ # Google Play Game Services API
24
+ #
25
+ # The API for Google Play Game Services.
26
+ #
27
+ # @example
28
+ # require 'google/apis/games_v1'
29
+ #
30
+ # Games = Google::Apis::GamesV1 # Alias the module
31
+ # service = Games::GamesService.new
32
+ #
33
+ # @see https://developers.google.com/games/services/
34
+ class GamesService < Google::Apis::Core::BaseService
35
+ # @return [String]
36
+ # API key. Your API key identifies your project and provides you with API access,
37
+ # quota, and reports. Required unless you provide an OAuth 2.0 token.
38
+ attr_accessor :key
39
+
40
+ # @return [String]
41
+ # Available to use for quota purposes for server-side applications. Can be any
42
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
43
+ # Overrides userIp if both are provided.
44
+ attr_accessor :quota_user
45
+
46
+ # @return [String]
47
+ # IP address of the site where the request originates. Use this if you want to
48
+ # enforce per-user limits.
49
+ attr_accessor :user_ip
50
+
51
+ def initialize
52
+ super('https://www.googleapis.com/', 'games/v1/')
53
+ end
54
+
55
+ # Lists all the achievement definitions for your application.
56
+ # @param [String] language
57
+ # The preferred language to use for strings returned by this method.
58
+ # @param [Fixnum] max_results
59
+ # The maximum number of achievement resources to return in the response, used
60
+ # for paging. For any response, the actual number of achievement resources
61
+ # returned may be less than the specified maxResults.
62
+ # @param [String] page_token
63
+ # The token returned by the previous request.
64
+ # @param [String] fields
65
+ # Selector specifying which fields to include in a partial response.
66
+ # @param [String] quota_user
67
+ # Available to use for quota purposes for server-side applications. Can be any
68
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
69
+ # Overrides userIp if both are provided.
70
+ # @param [String] user_ip
71
+ # IP address of the site where the request originates. Use this if you want to
72
+ # enforce per-user limits.
73
+ # @param [Google::Apis::RequestOptions] options
74
+ # Request-specific options
75
+ #
76
+ # @yield [result, err] Result & error if block supplied
77
+ # @yieldparam result [Google::Apis::GamesV1::ListAchievementDefinitionsResponse] parsed result object
78
+ # @yieldparam err [StandardError] error object if request failed
79
+ #
80
+ # @return [Google::Apis::GamesV1::ListAchievementDefinitionsResponse]
81
+ #
82
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
83
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
84
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
85
+ def list_achievement_definitions(language: nil, max_results: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
86
+ path = 'achievements'
87
+ command = make_simple_command(:get, path, options)
88
+ command.response_representation = Google::Apis::GamesV1::ListAchievementDefinitionsResponse::Representation
89
+ command.response_class = Google::Apis::GamesV1::ListAchievementDefinitionsResponse
90
+ command.query['language'] = language unless language.nil?
91
+ command.query['maxResults'] = max_results unless max_results.nil?
92
+ command.query['pageToken'] = page_token unless page_token.nil?
93
+ command.query['fields'] = fields unless fields.nil?
94
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
95
+ command.query['userIp'] = user_ip unless user_ip.nil?
96
+ execute_or_queue_command(command, &block)
97
+ end
98
+
99
+ # Increments the steps of the achievement with the given ID for the currently
100
+ # authenticated player.
101
+ # @param [String] achievement_id
102
+ # The ID of the achievement used by this method.
103
+ # @param [String] request_id
104
+ # A randomly generated numeric ID for each request specified by the caller. This
105
+ # number is used at the server to ensure that the request is handled correctly
106
+ # across retries.
107
+ # @param [Fixnum] steps_to_increment
108
+ # The number of steps to increment.
109
+ # @param [String] fields
110
+ # Selector specifying which fields to include in a partial response.
111
+ # @param [String] quota_user
112
+ # Available to use for quota purposes for server-side applications. Can be any
113
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
114
+ # Overrides userIp if both are provided.
115
+ # @param [String] user_ip
116
+ # IP address of the site where the request originates. Use this if you want to
117
+ # enforce per-user limits.
118
+ # @param [Google::Apis::RequestOptions] options
119
+ # Request-specific options
120
+ #
121
+ # @yield [result, err] Result & error if block supplied
122
+ # @yieldparam result [Google::Apis::GamesV1::AchievementIncrementResponse] parsed result object
123
+ # @yieldparam err [StandardError] error object if request failed
124
+ #
125
+ # @return [Google::Apis::GamesV1::AchievementIncrementResponse]
126
+ #
127
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
128
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
129
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
130
+ def increment_achievement(achievement_id, request_id: nil, steps_to_increment: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
131
+ path = 'achievements/{achievementId}/increment'
132
+ command = make_simple_command(:post, path, options)
133
+ command.response_representation = Google::Apis::GamesV1::AchievementIncrementResponse::Representation
134
+ command.response_class = Google::Apis::GamesV1::AchievementIncrementResponse
135
+ command.params['achievementId'] = achievement_id unless achievement_id.nil?
136
+ command.query['requestId'] = request_id unless request_id.nil?
137
+ command.query['stepsToIncrement'] = steps_to_increment unless steps_to_increment.nil?
138
+ command.query['fields'] = fields unless fields.nil?
139
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
140
+ command.query['userIp'] = user_ip unless user_ip.nil?
141
+ execute_or_queue_command(command, &block)
142
+ end
143
+
144
+ # Lists the progress for all your application's achievements for the currently
145
+ # authenticated player.
146
+ # @param [String] player_id
147
+ # A player ID. A value of me may be used in place of the authenticated player's
148
+ # ID.
149
+ # @param [String] language
150
+ # The preferred language to use for strings returned by this method.
151
+ # @param [Fixnum] max_results
152
+ # The maximum number of achievement resources to return in the response, used
153
+ # for paging. For any response, the actual number of achievement resources
154
+ # returned may be less than the specified maxResults.
155
+ # @param [String] page_token
156
+ # The token returned by the previous request.
157
+ # @param [String] state
158
+ # Tells the server to return only achievements with the specified state. If this
159
+ # parameter isn't specified, all achievements are returned.
160
+ # @param [String] fields
161
+ # Selector specifying which fields to include in a partial response.
162
+ # @param [String] quota_user
163
+ # Available to use for quota purposes for server-side applications. Can be any
164
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
165
+ # Overrides userIp if both are provided.
166
+ # @param [String] user_ip
167
+ # IP address of the site where the request originates. Use this if you want to
168
+ # enforce per-user limits.
169
+ # @param [Google::Apis::RequestOptions] options
170
+ # Request-specific options
171
+ #
172
+ # @yield [result, err] Result & error if block supplied
173
+ # @yieldparam result [Google::Apis::GamesV1::ListPlayerAchievementResponse] parsed result object
174
+ # @yieldparam err [StandardError] error object if request failed
175
+ #
176
+ # @return [Google::Apis::GamesV1::ListPlayerAchievementResponse]
177
+ #
178
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
179
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
180
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
181
+ def list_achievements(player_id, language: nil, max_results: nil, page_token: nil, state: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
182
+ path = 'players/{playerId}/achievements'
183
+ command = make_simple_command(:get, path, options)
184
+ command.response_representation = Google::Apis::GamesV1::ListPlayerAchievementResponse::Representation
185
+ command.response_class = Google::Apis::GamesV1::ListPlayerAchievementResponse
186
+ command.params['playerId'] = player_id unless player_id.nil?
187
+ command.query['language'] = language unless language.nil?
188
+ command.query['maxResults'] = max_results unless max_results.nil?
189
+ command.query['pageToken'] = page_token unless page_token.nil?
190
+ command.query['state'] = state unless state.nil?
191
+ command.query['fields'] = fields unless fields.nil?
192
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
193
+ command.query['userIp'] = user_ip unless user_ip.nil?
194
+ execute_or_queue_command(command, &block)
195
+ end
196
+
197
+ # Sets the state of the achievement with the given ID to REVEALED for the
198
+ # currently authenticated player.
199
+ # @param [String] achievement_id
200
+ # The ID of the achievement used by this method.
201
+ # @param [String] fields
202
+ # Selector specifying which fields to include in a partial response.
203
+ # @param [String] quota_user
204
+ # Available to use for quota purposes for server-side applications. Can be any
205
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
206
+ # Overrides userIp if both are provided.
207
+ # @param [String] user_ip
208
+ # IP address of the site where the request originates. Use this if you want to
209
+ # enforce per-user limits.
210
+ # @param [Google::Apis::RequestOptions] options
211
+ # Request-specific options
212
+ #
213
+ # @yield [result, err] Result & error if block supplied
214
+ # @yieldparam result [Google::Apis::GamesV1::AchievementRevealResponse] parsed result object
215
+ # @yieldparam err [StandardError] error object if request failed
216
+ #
217
+ # @return [Google::Apis::GamesV1::AchievementRevealResponse]
218
+ #
219
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
220
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
221
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
222
+ def reveal_achievement(achievement_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
223
+ path = 'achievements/{achievementId}/reveal'
224
+ command = make_simple_command(:post, path, options)
225
+ command.response_representation = Google::Apis::GamesV1::AchievementRevealResponse::Representation
226
+ command.response_class = Google::Apis::GamesV1::AchievementRevealResponse
227
+ command.params['achievementId'] = achievement_id unless achievement_id.nil?
228
+ command.query['fields'] = fields unless fields.nil?
229
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
230
+ command.query['userIp'] = user_ip unless user_ip.nil?
231
+ execute_or_queue_command(command, &block)
232
+ end
233
+
234
+ # Sets the steps for the currently authenticated player towards unlocking an
235
+ # achievement. If the steps parameter is less than the current number of steps
236
+ # that the player already gained for the achievement, the achievement is not
237
+ # modified.
238
+ # @param [String] achievement_id
239
+ # The ID of the achievement used by this method.
240
+ # @param [Fixnum] steps
241
+ # The minimum value to set the steps to.
242
+ # @param [String] fields
243
+ # Selector specifying which fields to include in a partial response.
244
+ # @param [String] quota_user
245
+ # Available to use for quota purposes for server-side applications. Can be any
246
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
247
+ # Overrides userIp if both are provided.
248
+ # @param [String] user_ip
249
+ # IP address of the site where the request originates. Use this if you want to
250
+ # enforce per-user limits.
251
+ # @param [Google::Apis::RequestOptions] options
252
+ # Request-specific options
253
+ #
254
+ # @yield [result, err] Result & error if block supplied
255
+ # @yieldparam result [Google::Apis::GamesV1::AchievementSetStepsAtLeastResponse] parsed result object
256
+ # @yieldparam err [StandardError] error object if request failed
257
+ #
258
+ # @return [Google::Apis::GamesV1::AchievementSetStepsAtLeastResponse]
259
+ #
260
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
261
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
262
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
263
+ def set_steps_at_least_achievement(achievement_id, steps: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
264
+ path = 'achievements/{achievementId}/setStepsAtLeast'
265
+ command = make_simple_command(:post, path, options)
266
+ command.response_representation = Google::Apis::GamesV1::AchievementSetStepsAtLeastResponse::Representation
267
+ command.response_class = Google::Apis::GamesV1::AchievementSetStepsAtLeastResponse
268
+ command.params['achievementId'] = achievement_id unless achievement_id.nil?
269
+ command.query['steps'] = steps unless steps.nil?
270
+ command.query['fields'] = fields unless fields.nil?
271
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
272
+ command.query['userIp'] = user_ip unless user_ip.nil?
273
+ execute_or_queue_command(command, &block)
274
+ end
275
+
276
+ # Unlocks this achievement for the currently authenticated player.
277
+ # @param [String] achievement_id
278
+ # The ID of the achievement used by this method.
279
+ # @param [String] fields
280
+ # Selector specifying which fields to include in a partial response.
281
+ # @param [String] quota_user
282
+ # Available to use for quota purposes for server-side applications. Can be any
283
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
284
+ # Overrides userIp if both are provided.
285
+ # @param [String] user_ip
286
+ # IP address of the site where the request originates. Use this if you want to
287
+ # enforce per-user limits.
288
+ # @param [Google::Apis::RequestOptions] options
289
+ # Request-specific options
290
+ #
291
+ # @yield [result, err] Result & error if block supplied
292
+ # @yieldparam result [Google::Apis::GamesV1::AchievementUnlockResponse] parsed result object
293
+ # @yieldparam err [StandardError] error object if request failed
294
+ #
295
+ # @return [Google::Apis::GamesV1::AchievementUnlockResponse]
296
+ #
297
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
298
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
299
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
300
+ def unlock_achievement(achievement_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
301
+ path = 'achievements/{achievementId}/unlock'
302
+ command = make_simple_command(:post, path, options)
303
+ command.response_representation = Google::Apis::GamesV1::AchievementUnlockResponse::Representation
304
+ command.response_class = Google::Apis::GamesV1::AchievementUnlockResponse
305
+ command.params['achievementId'] = achievement_id unless achievement_id.nil?
306
+ command.query['fields'] = fields unless fields.nil?
307
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
308
+ command.query['userIp'] = user_ip unless user_ip.nil?
309
+ execute_or_queue_command(command, &block)
310
+ end
311
+
312
+ # Updates multiple achievements for the currently authenticated player.
313
+ # @param [Google::Apis::GamesV1::AchievementUpdateMultipleRequest] achievement_update_multiple_request_object
314
+ # @param [String] fields
315
+ # Selector specifying which fields to include in a partial response.
316
+ # @param [String] quota_user
317
+ # Available to use for quota purposes for server-side applications. Can be any
318
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
319
+ # Overrides userIp if both are provided.
320
+ # @param [String] user_ip
321
+ # IP address of the site where the request originates. Use this if you want to
322
+ # enforce per-user limits.
323
+ # @param [Google::Apis::RequestOptions] options
324
+ # Request-specific options
325
+ #
326
+ # @yield [result, err] Result & error if block supplied
327
+ # @yieldparam result [Google::Apis::GamesV1::AchievementUpdateMultipleResponse] parsed result object
328
+ # @yieldparam err [StandardError] error object if request failed
329
+ #
330
+ # @return [Google::Apis::GamesV1::AchievementUpdateMultipleResponse]
331
+ #
332
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
333
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
334
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
335
+ def update_multiple_achievements(achievement_update_multiple_request_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
336
+ path = 'achievements/updateMultiple'
337
+ command = make_simple_command(:post, path, options)
338
+ command.request_representation = Google::Apis::GamesV1::AchievementUpdateMultipleRequest::Representation
339
+ command.request_object = achievement_update_multiple_request_object
340
+ command.response_representation = Google::Apis::GamesV1::AchievementUpdateMultipleResponse::Representation
341
+ command.response_class = Google::Apis::GamesV1::AchievementUpdateMultipleResponse
342
+ command.query['fields'] = fields unless fields.nil?
343
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
344
+ command.query['userIp'] = user_ip unless user_ip.nil?
345
+ execute_or_queue_command(command, &block)
346
+ end
347
+
348
+ # Retrieves the metadata of the application with the given ID. If the requested
349
+ # application is not available for the specified platformType, the returned
350
+ # response will not include any instance data.
351
+ # @param [String] application_id
352
+ # The application ID from the Google Play developer console.
353
+ # @param [String] language
354
+ # The preferred language to use for strings returned by this method.
355
+ # @param [String] platform_type
356
+ # Restrict application details returned to the specific platform.
357
+ # @param [String] fields
358
+ # Selector specifying which fields to include in a partial response.
359
+ # @param [String] quota_user
360
+ # Available to use for quota purposes for server-side applications. Can be any
361
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
362
+ # Overrides userIp if both are provided.
363
+ # @param [String] user_ip
364
+ # IP address of the site where the request originates. Use this if you want to
365
+ # enforce per-user limits.
366
+ # @param [Google::Apis::RequestOptions] options
367
+ # Request-specific options
368
+ #
369
+ # @yield [result, err] Result & error if block supplied
370
+ # @yieldparam result [Google::Apis::GamesV1::Application] parsed result object
371
+ # @yieldparam err [StandardError] error object if request failed
372
+ #
373
+ # @return [Google::Apis::GamesV1::Application]
374
+ #
375
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
376
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
377
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
378
+ def get_application(application_id, language: nil, platform_type: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
379
+ path = 'applications/{applicationId}'
380
+ command = make_simple_command(:get, path, options)
381
+ command.response_representation = Google::Apis::GamesV1::Application::Representation
382
+ command.response_class = Google::Apis::GamesV1::Application
383
+ command.params['applicationId'] = application_id unless application_id.nil?
384
+ command.query['language'] = language unless language.nil?
385
+ command.query['platformType'] = platform_type unless platform_type.nil?
386
+ command.query['fields'] = fields unless fields.nil?
387
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
388
+ command.query['userIp'] = user_ip unless user_ip.nil?
389
+ execute_or_queue_command(command, &block)
390
+ end
391
+
392
+ # Indicate that the the currently authenticated user is playing your application.
393
+ # @param [String] fields
394
+ # Selector specifying which fields to include in a partial response.
395
+ # @param [String] quota_user
396
+ # Available to use for quota purposes for server-side applications. Can be any
397
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
398
+ # Overrides userIp if both are provided.
399
+ # @param [String] user_ip
400
+ # IP address of the site where the request originates. Use this if you want to
401
+ # enforce per-user limits.
402
+ # @param [Google::Apis::RequestOptions] options
403
+ # Request-specific options
404
+ #
405
+ # @yield [result, err] Result & error if block supplied
406
+ # @yieldparam result [NilClass] No result returned for this method
407
+ # @yieldparam err [StandardError] error object if request failed
408
+ #
409
+ # @return [void]
410
+ #
411
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
412
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
413
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
414
+ def played_application(fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
415
+ path = 'applications/played'
416
+ command = make_simple_command(:post, path, options)
417
+ command.query['fields'] = fields unless fields.nil?
418
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
419
+ command.query['userIp'] = user_ip unless user_ip.nil?
420
+ execute_or_queue_command(command, &block)
421
+ end
422
+
423
+ # Returns a list showing the current progress on events in this application for
424
+ # the currently authenticated user.
425
+ # @param [String] language
426
+ # The preferred language to use for strings returned by this method.
427
+ # @param [Fixnum] max_results
428
+ # The maximum number of events to return in the response, used for paging. For
429
+ # any response, the actual number of events to return may be less than the
430
+ # specified maxResults.
431
+ # @param [String] page_token
432
+ # The token returned by the previous request.
433
+ # @param [String] fields
434
+ # Selector specifying which fields to include in a partial response.
435
+ # @param [String] quota_user
436
+ # Available to use for quota purposes for server-side applications. Can be any
437
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
438
+ # Overrides userIp if both are provided.
439
+ # @param [String] user_ip
440
+ # IP address of the site where the request originates. Use this if you want to
441
+ # enforce per-user limits.
442
+ # @param [Google::Apis::RequestOptions] options
443
+ # Request-specific options
444
+ #
445
+ # @yield [result, err] Result & error if block supplied
446
+ # @yieldparam result [Google::Apis::GamesV1::ListPlayerEventResponse] parsed result object
447
+ # @yieldparam err [StandardError] error object if request failed
448
+ #
449
+ # @return [Google::Apis::GamesV1::ListPlayerEventResponse]
450
+ #
451
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
452
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
453
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
454
+ def list_by_player_event(language: nil, max_results: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
455
+ path = 'events'
456
+ command = make_simple_command(:get, path, options)
457
+ command.response_representation = Google::Apis::GamesV1::ListPlayerEventResponse::Representation
458
+ command.response_class = Google::Apis::GamesV1::ListPlayerEventResponse
459
+ command.query['language'] = language unless language.nil?
460
+ command.query['maxResults'] = max_results unless max_results.nil?
461
+ command.query['pageToken'] = page_token unless page_token.nil?
462
+ command.query['fields'] = fields unless fields.nil?
463
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
464
+ command.query['userIp'] = user_ip unless user_ip.nil?
465
+ execute_or_queue_command(command, &block)
466
+ end
467
+
468
+ # Returns a list of the event definitions in this application.
469
+ # @param [String] language
470
+ # The preferred language to use for strings returned by this method.
471
+ # @param [Fixnum] max_results
472
+ # The maximum number of event definitions to return in the response, used for
473
+ # paging. For any response, the actual number of event definitions to return may
474
+ # be less than the specified maxResults.
475
+ # @param [String] page_token
476
+ # The token returned by the previous request.
477
+ # @param [String] fields
478
+ # Selector specifying which fields to include in a partial response.
479
+ # @param [String] quota_user
480
+ # Available to use for quota purposes for server-side applications. Can be any
481
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
482
+ # Overrides userIp if both are provided.
483
+ # @param [String] user_ip
484
+ # IP address of the site where the request originates. Use this if you want to
485
+ # enforce per-user limits.
486
+ # @param [Google::Apis::RequestOptions] options
487
+ # Request-specific options
488
+ #
489
+ # @yield [result, err] Result & error if block supplied
490
+ # @yieldparam result [Google::Apis::GamesV1::ListEventDefinitionResponse] parsed result object
491
+ # @yieldparam err [StandardError] error object if request failed
492
+ #
493
+ # @return [Google::Apis::GamesV1::ListEventDefinitionResponse]
494
+ #
495
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
496
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
497
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
498
+ def list_event_definitions(language: nil, max_results: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
499
+ path = 'eventDefinitions'
500
+ command = make_simple_command(:get, path, options)
501
+ command.response_representation = Google::Apis::GamesV1::ListEventDefinitionResponse::Representation
502
+ command.response_class = Google::Apis::GamesV1::ListEventDefinitionResponse
503
+ command.query['language'] = language unless language.nil?
504
+ command.query['maxResults'] = max_results unless max_results.nil?
505
+ command.query['pageToken'] = page_token unless page_token.nil?
506
+ command.query['fields'] = fields unless fields.nil?
507
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
508
+ command.query['userIp'] = user_ip unless user_ip.nil?
509
+ execute_or_queue_command(command, &block)
510
+ end
511
+
512
+ # Records a batch of changes to the number of times events have occurred for the
513
+ # currently authenticated user of this application.
514
+ # @param [Google::Apis::GamesV1::EventRecordRequest] event_record_request_object
515
+ # @param [String] language
516
+ # The preferred language to use for strings returned by this method.
517
+ # @param [String] fields
518
+ # Selector specifying which fields to include in a partial response.
519
+ # @param [String] quota_user
520
+ # Available to use for quota purposes for server-side applications. Can be any
521
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
522
+ # Overrides userIp if both are provided.
523
+ # @param [String] user_ip
524
+ # IP address of the site where the request originates. Use this if you want to
525
+ # enforce per-user limits.
526
+ # @param [Google::Apis::RequestOptions] options
527
+ # Request-specific options
528
+ #
529
+ # @yield [result, err] Result & error if block supplied
530
+ # @yieldparam result [Google::Apis::GamesV1::UpdateEventResponse] parsed result object
531
+ # @yieldparam err [StandardError] error object if request failed
532
+ #
533
+ # @return [Google::Apis::GamesV1::UpdateEventResponse]
534
+ #
535
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
536
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
537
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
538
+ def record_event(event_record_request_object = nil, language: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
539
+ path = 'events'
540
+ command = make_simple_command(:post, path, options)
541
+ command.request_representation = Google::Apis::GamesV1::EventRecordRequest::Representation
542
+ command.request_object = event_record_request_object
543
+ command.response_representation = Google::Apis::GamesV1::UpdateEventResponse::Representation
544
+ command.response_class = Google::Apis::GamesV1::UpdateEventResponse
545
+ command.query['language'] = language unless language.nil?
546
+ command.query['fields'] = fields unless fields.nil?
547
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
548
+ command.query['userIp'] = user_ip unless user_ip.nil?
549
+ execute_or_queue_command(command, &block)
550
+ end
551
+
552
+ # Retrieves the metadata of the leaderboard with the given ID.
553
+ # @param [String] leaderboard_id
554
+ # The ID of the leaderboard.
555
+ # @param [String] language
556
+ # The preferred language to use for strings returned by this method.
557
+ # @param [String] fields
558
+ # Selector specifying which fields to include in a partial response.
559
+ # @param [String] quota_user
560
+ # Available to use for quota purposes for server-side applications. Can be any
561
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
562
+ # Overrides userIp if both are provided.
563
+ # @param [String] user_ip
564
+ # IP address of the site where the request originates. Use this if you want to
565
+ # enforce per-user limits.
566
+ # @param [Google::Apis::RequestOptions] options
567
+ # Request-specific options
568
+ #
569
+ # @yield [result, err] Result & error if block supplied
570
+ # @yieldparam result [Google::Apis::GamesV1::Leaderboard] parsed result object
571
+ # @yieldparam err [StandardError] error object if request failed
572
+ #
573
+ # @return [Google::Apis::GamesV1::Leaderboard]
574
+ #
575
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
576
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
577
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
578
+ def get_leaderboard(leaderboard_id, language: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
579
+ path = 'leaderboards/{leaderboardId}'
580
+ command = make_simple_command(:get, path, options)
581
+ command.response_representation = Google::Apis::GamesV1::Leaderboard::Representation
582
+ command.response_class = Google::Apis::GamesV1::Leaderboard
583
+ command.params['leaderboardId'] = leaderboard_id unless leaderboard_id.nil?
584
+ command.query['language'] = language unless language.nil?
585
+ command.query['fields'] = fields unless fields.nil?
586
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
587
+ command.query['userIp'] = user_ip unless user_ip.nil?
588
+ execute_or_queue_command(command, &block)
589
+ end
590
+
591
+ # Lists all the leaderboard metadata for your application.
592
+ # @param [String] language
593
+ # The preferred language to use for strings returned by this method.
594
+ # @param [Fixnum] max_results
595
+ # The maximum number of leaderboards to return in the response. For any response,
596
+ # the actual number of leaderboards returned may be less than the specified
597
+ # maxResults.
598
+ # @param [String] page_token
599
+ # The token returned by the previous request.
600
+ # @param [String] fields
601
+ # Selector specifying which fields to include in a partial response.
602
+ # @param [String] quota_user
603
+ # Available to use for quota purposes for server-side applications. Can be any
604
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
605
+ # Overrides userIp if both are provided.
606
+ # @param [String] user_ip
607
+ # IP address of the site where the request originates. Use this if you want to
608
+ # enforce per-user limits.
609
+ # @param [Google::Apis::RequestOptions] options
610
+ # Request-specific options
611
+ #
612
+ # @yield [result, err] Result & error if block supplied
613
+ # @yieldparam result [Google::Apis::GamesV1::ListLeaderboardResponse] parsed result object
614
+ # @yieldparam err [StandardError] error object if request failed
615
+ #
616
+ # @return [Google::Apis::GamesV1::ListLeaderboardResponse]
617
+ #
618
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
619
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
620
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
621
+ def list_leaderboards(language: nil, max_results: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
622
+ path = 'leaderboards'
623
+ command = make_simple_command(:get, path, options)
624
+ command.response_representation = Google::Apis::GamesV1::ListLeaderboardResponse::Representation
625
+ command.response_class = Google::Apis::GamesV1::ListLeaderboardResponse
626
+ command.query['language'] = language unless language.nil?
627
+ command.query['maxResults'] = max_results unless max_results.nil?
628
+ command.query['pageToken'] = page_token unless page_token.nil?
629
+ command.query['fields'] = fields unless fields.nil?
630
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
631
+ command.query['userIp'] = user_ip unless user_ip.nil?
632
+ execute_or_queue_command(command, &block)
633
+ end
634
+
635
+ # Return the metagame configuration data for the calling application.
636
+ # @param [String] fields
637
+ # Selector specifying which fields to include in a partial response.
638
+ # @param [String] quota_user
639
+ # Available to use for quota purposes for server-side applications. Can be any
640
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
641
+ # Overrides userIp if both are provided.
642
+ # @param [String] user_ip
643
+ # IP address of the site where the request originates. Use this if you want to
644
+ # enforce per-user limits.
645
+ # @param [Google::Apis::RequestOptions] options
646
+ # Request-specific options
647
+ #
648
+ # @yield [result, err] Result & error if block supplied
649
+ # @yieldparam result [Google::Apis::GamesV1::MetagameConfig] parsed result object
650
+ # @yieldparam err [StandardError] error object if request failed
651
+ #
652
+ # @return [Google::Apis::GamesV1::MetagameConfig]
653
+ #
654
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
655
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
656
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
657
+ def get_metagame_config(fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
658
+ path = 'metagameConfig'
659
+ command = make_simple_command(:get, path, options)
660
+ command.response_representation = Google::Apis::GamesV1::MetagameConfig::Representation
661
+ command.response_class = Google::Apis::GamesV1::MetagameConfig
662
+ command.query['fields'] = fields unless fields.nil?
663
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
664
+ command.query['userIp'] = user_ip unless user_ip.nil?
665
+ execute_or_queue_command(command, &block)
666
+ end
667
+
668
+ # List play data aggregated per category for the player corresponding to
669
+ # playerId.
670
+ # @param [String] player_id
671
+ # A player ID. A value of me may be used in place of the authenticated player's
672
+ # ID.
673
+ # @param [String] collection
674
+ # The collection of categories for which data will be returned.
675
+ # @param [String] language
676
+ # The preferred language to use for strings returned by this method.
677
+ # @param [Fixnum] max_results
678
+ # The maximum number of category resources to return in the response, used for
679
+ # paging. For any response, the actual number of category resources returned may
680
+ # be less than the specified maxResults.
681
+ # @param [String] page_token
682
+ # The token returned by the previous request.
683
+ # @param [String] fields
684
+ # Selector specifying which fields to include in a partial response.
685
+ # @param [String] quota_user
686
+ # Available to use for quota purposes for server-side applications. Can be any
687
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
688
+ # Overrides userIp if both are provided.
689
+ # @param [String] user_ip
690
+ # IP address of the site where the request originates. Use this if you want to
691
+ # enforce per-user limits.
692
+ # @param [Google::Apis::RequestOptions] options
693
+ # Request-specific options
694
+ #
695
+ # @yield [result, err] Result & error if block supplied
696
+ # @yieldparam result [Google::Apis::GamesV1::ListCategoryResponse] parsed result object
697
+ # @yieldparam err [StandardError] error object if request failed
698
+ #
699
+ # @return [Google::Apis::GamesV1::ListCategoryResponse]
700
+ #
701
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
702
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
703
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
704
+ def list_categories_by_player_metagame(player_id, collection, language: nil, max_results: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
705
+ path = 'players/{playerId}/categories/{collection}'
706
+ command = make_simple_command(:get, path, options)
707
+ command.response_representation = Google::Apis::GamesV1::ListCategoryResponse::Representation
708
+ command.response_class = Google::Apis::GamesV1::ListCategoryResponse
709
+ command.params['playerId'] = player_id unless player_id.nil?
710
+ command.params['collection'] = collection unless collection.nil?
711
+ command.query['language'] = language unless language.nil?
712
+ command.query['maxResults'] = max_results unless max_results.nil?
713
+ command.query['pageToken'] = page_token unless page_token.nil?
714
+ command.query['fields'] = fields unless fields.nil?
715
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
716
+ command.query['userIp'] = user_ip unless user_ip.nil?
717
+ execute_or_queue_command(command, &block)
718
+ end
719
+
720
+ # Retrieves the Player resource with the given ID. To retrieve the player for
721
+ # the currently authenticated user, set playerId to me.
722
+ # @param [String] player_id
723
+ # A player ID. A value of me may be used in place of the authenticated player's
724
+ # ID.
725
+ # @param [String] language
726
+ # The preferred language to use for strings returned by this method.
727
+ # @param [String] fields
728
+ # Selector specifying which fields to include in a partial response.
729
+ # @param [String] quota_user
730
+ # Available to use for quota purposes for server-side applications. Can be any
731
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
732
+ # Overrides userIp if both are provided.
733
+ # @param [String] user_ip
734
+ # IP address of the site where the request originates. Use this if you want to
735
+ # enforce per-user limits.
736
+ # @param [Google::Apis::RequestOptions] options
737
+ # Request-specific options
738
+ #
739
+ # @yield [result, err] Result & error if block supplied
740
+ # @yieldparam result [Google::Apis::GamesV1::Player] parsed result object
741
+ # @yieldparam err [StandardError] error object if request failed
742
+ #
743
+ # @return [Google::Apis::GamesV1::Player]
744
+ #
745
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
746
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
747
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
748
+ def get_player(player_id, language: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
749
+ path = 'players/{playerId}'
750
+ command = make_simple_command(:get, path, options)
751
+ command.response_representation = Google::Apis::GamesV1::Player::Representation
752
+ command.response_class = Google::Apis::GamesV1::Player
753
+ command.params['playerId'] = player_id unless player_id.nil?
754
+ command.query['language'] = language unless language.nil?
755
+ command.query['fields'] = fields unless fields.nil?
756
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
757
+ command.query['userIp'] = user_ip unless user_ip.nil?
758
+ execute_or_queue_command(command, &block)
759
+ end
760
+
761
+ # Get the collection of players for the currently authenticated user.
762
+ # @param [String] collection
763
+ # Collection of players being retrieved
764
+ # @param [String] language
765
+ # The preferred language to use for strings returned by this method.
766
+ # @param [Fixnum] max_results
767
+ # The maximum number of player resources to return in the response, used for
768
+ # paging. For any response, the actual number of player resources returned may
769
+ # be less than the specified maxResults.
770
+ # @param [String] page_token
771
+ # The token returned by the previous request.
772
+ # @param [String] fields
773
+ # Selector specifying which fields to include in a partial response.
774
+ # @param [String] quota_user
775
+ # Available to use for quota purposes for server-side applications. Can be any
776
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
777
+ # Overrides userIp if both are provided.
778
+ # @param [String] user_ip
779
+ # IP address of the site where the request originates. Use this if you want to
780
+ # enforce per-user limits.
781
+ # @param [Google::Apis::RequestOptions] options
782
+ # Request-specific options
783
+ #
784
+ # @yield [result, err] Result & error if block supplied
785
+ # @yieldparam result [Google::Apis::GamesV1::ListPlayerResponse] parsed result object
786
+ # @yieldparam err [StandardError] error object if request failed
787
+ #
788
+ # @return [Google::Apis::GamesV1::ListPlayerResponse]
789
+ #
790
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
791
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
792
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
793
+ def list_players(collection, language: nil, max_results: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
794
+ path = 'players/me/players/{collection}'
795
+ command = make_simple_command(:get, path, options)
796
+ command.response_representation = Google::Apis::GamesV1::ListPlayerResponse::Representation
797
+ command.response_class = Google::Apis::GamesV1::ListPlayerResponse
798
+ command.params['collection'] = collection unless collection.nil?
799
+ command.query['language'] = language unless language.nil?
800
+ command.query['maxResults'] = max_results unless max_results.nil?
801
+ command.query['pageToken'] = page_token unless page_token.nil?
802
+ command.query['fields'] = fields unless fields.nil?
803
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
804
+ command.query['userIp'] = user_ip unless user_ip.nil?
805
+ execute_or_queue_command(command, &block)
806
+ end
807
+
808
+ # Removes a push token for the current user and application. Removing a non-
809
+ # existent push token will report success.
810
+ # @param [Google::Apis::GamesV1::PushTokenId] push_token_id_object
811
+ # @param [String] fields
812
+ # Selector specifying which fields to include in a partial response.
813
+ # @param [String] quota_user
814
+ # Available to use for quota purposes for server-side applications. Can be any
815
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
816
+ # Overrides userIp if both are provided.
817
+ # @param [String] user_ip
818
+ # IP address of the site where the request originates. Use this if you want to
819
+ # enforce per-user limits.
820
+ # @param [Google::Apis::RequestOptions] options
821
+ # Request-specific options
822
+ #
823
+ # @yield [result, err] Result & error if block supplied
824
+ # @yieldparam result [NilClass] No result returned for this method
825
+ # @yieldparam err [StandardError] error object if request failed
826
+ #
827
+ # @return [void]
828
+ #
829
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
830
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
831
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
832
+ def remove_pushtoken(push_token_id_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
833
+ path = 'pushtokens/remove'
834
+ command = make_simple_command(:post, path, options)
835
+ command.request_representation = Google::Apis::GamesV1::PushTokenId::Representation
836
+ command.request_object = push_token_id_object
837
+ command.query['fields'] = fields unless fields.nil?
838
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
839
+ command.query['userIp'] = user_ip unless user_ip.nil?
840
+ execute_or_queue_command(command, &block)
841
+ end
842
+
843
+ # Registers a push token for the current user and application.
844
+ # @param [Google::Apis::GamesV1::PushToken] push_token_object
845
+ # @param [String] fields
846
+ # Selector specifying which fields to include in a partial response.
847
+ # @param [String] quota_user
848
+ # Available to use for quota purposes for server-side applications. Can be any
849
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
850
+ # Overrides userIp if both are provided.
851
+ # @param [String] user_ip
852
+ # IP address of the site where the request originates. Use this if you want to
853
+ # enforce per-user limits.
854
+ # @param [Google::Apis::RequestOptions] options
855
+ # Request-specific options
856
+ #
857
+ # @yield [result, err] Result & error if block supplied
858
+ # @yieldparam result [NilClass] No result returned for this method
859
+ # @yieldparam err [StandardError] error object if request failed
860
+ #
861
+ # @return [void]
862
+ #
863
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
864
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
865
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
866
+ def update_pushtoken(push_token_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
867
+ path = 'pushtokens'
868
+ command = make_simple_command(:put, path, options)
869
+ command.request_representation = Google::Apis::GamesV1::PushToken::Representation
870
+ command.request_object = push_token_object
871
+ command.query['fields'] = fields unless fields.nil?
872
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
873
+ command.query['userIp'] = user_ip unless user_ip.nil?
874
+ execute_or_queue_command(command, &block)
875
+ end
876
+
877
+ # Report that a reward for the milestone corresponding to milestoneId for the
878
+ # quest corresponding to questId has been claimed by the currently authorized
879
+ # user.
880
+ # @param [String] quest_id
881
+ # The ID of the quest.
882
+ # @param [String] milestone_id
883
+ # The ID of the milestone.
884
+ # @param [String] request_id
885
+ # A numeric ID to ensure that the request is handled correctly across retries.
886
+ # Your client application must generate this ID randomly.
887
+ # @param [String] fields
888
+ # Selector specifying which fields to include in a partial response.
889
+ # @param [String] quota_user
890
+ # Available to use for quota purposes for server-side applications. Can be any
891
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
892
+ # Overrides userIp if both are provided.
893
+ # @param [String] user_ip
894
+ # IP address of the site where the request originates. Use this if you want to
895
+ # enforce per-user limits.
896
+ # @param [Google::Apis::RequestOptions] options
897
+ # Request-specific options
898
+ #
899
+ # @yield [result, err] Result & error if block supplied
900
+ # @yieldparam result [NilClass] No result returned for this method
901
+ # @yieldparam err [StandardError] error object if request failed
902
+ #
903
+ # @return [void]
904
+ #
905
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
906
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
907
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
908
+ def claim_quest_milestone(quest_id, milestone_id, request_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
909
+ path = 'quests/{questId}/milestones/{milestoneId}/claim'
910
+ command = make_simple_command(:put, path, options)
911
+ command.params['questId'] = quest_id unless quest_id.nil?
912
+ command.params['milestoneId'] = milestone_id unless milestone_id.nil?
913
+ command.query['requestId'] = request_id unless request_id.nil?
914
+ command.query['fields'] = fields unless fields.nil?
915
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
916
+ command.query['userIp'] = user_ip unless user_ip.nil?
917
+ execute_or_queue_command(command, &block)
918
+ end
919
+
920
+ # Indicates that the currently authorized user will participate in the quest.
921
+ # @param [String] quest_id
922
+ # The ID of the quest.
923
+ # @param [String] language
924
+ # The preferred language to use for strings returned by this method.
925
+ # @param [String] fields
926
+ # Selector specifying which fields to include in a partial response.
927
+ # @param [String] quota_user
928
+ # Available to use for quota purposes for server-side applications. Can be any
929
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
930
+ # Overrides userIp if both are provided.
931
+ # @param [String] user_ip
932
+ # IP address of the site where the request originates. Use this if you want to
933
+ # enforce per-user limits.
934
+ # @param [Google::Apis::RequestOptions] options
935
+ # Request-specific options
936
+ #
937
+ # @yield [result, err] Result & error if block supplied
938
+ # @yieldparam result [Google::Apis::GamesV1::Quest] parsed result object
939
+ # @yieldparam err [StandardError] error object if request failed
940
+ #
941
+ # @return [Google::Apis::GamesV1::Quest]
942
+ #
943
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
944
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
945
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
946
+ def accept_quest(quest_id, language: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
947
+ path = 'quests/{questId}/accept'
948
+ command = make_simple_command(:post, path, options)
949
+ command.response_representation = Google::Apis::GamesV1::Quest::Representation
950
+ command.response_class = Google::Apis::GamesV1::Quest
951
+ command.params['questId'] = quest_id unless quest_id.nil?
952
+ command.query['language'] = language unless language.nil?
953
+ command.query['fields'] = fields unless fields.nil?
954
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
955
+ command.query['userIp'] = user_ip unless user_ip.nil?
956
+ execute_or_queue_command(command, &block)
957
+ end
958
+
959
+ # Get a list of quests for your application and the currently authenticated
960
+ # player.
961
+ # @param [String] player_id
962
+ # A player ID. A value of me may be used in place of the authenticated player's
963
+ # ID.
964
+ # @param [String] language
965
+ # The preferred language to use for strings returned by this method.
966
+ # @param [Fixnum] max_results
967
+ # The maximum number of quest resources to return in the response, used for
968
+ # paging. For any response, the actual number of quest resources returned may be
969
+ # less than the specified maxResults. Acceptable values are 1 to 50, inclusive. (
970
+ # Default: 50).
971
+ # @param [String] page_token
972
+ # The token returned by the previous request.
973
+ # @param [String] fields
974
+ # Selector specifying which fields to include in a partial response.
975
+ # @param [String] quota_user
976
+ # Available to use for quota purposes for server-side applications. Can be any
977
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
978
+ # Overrides userIp if both are provided.
979
+ # @param [String] user_ip
980
+ # IP address of the site where the request originates. Use this if you want to
981
+ # enforce per-user limits.
982
+ # @param [Google::Apis::RequestOptions] options
983
+ # Request-specific options
984
+ #
985
+ # @yield [result, err] Result & error if block supplied
986
+ # @yieldparam result [Google::Apis::GamesV1::ListQuestResponse] parsed result object
987
+ # @yieldparam err [StandardError] error object if request failed
988
+ #
989
+ # @return [Google::Apis::GamesV1::ListQuestResponse]
990
+ #
991
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
992
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
993
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
994
+ def list_quests(player_id, language: nil, max_results: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
995
+ path = 'players/{playerId}/quests'
996
+ command = make_simple_command(:get, path, options)
997
+ command.response_representation = Google::Apis::GamesV1::ListQuestResponse::Representation
998
+ command.response_class = Google::Apis::GamesV1::ListQuestResponse
999
+ command.params['playerId'] = player_id unless player_id.nil?
1000
+ command.query['language'] = language unless language.nil?
1001
+ command.query['maxResults'] = max_results unless max_results.nil?
1002
+ command.query['pageToken'] = page_token unless page_token.nil?
1003
+ command.query['fields'] = fields unless fields.nil?
1004
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1005
+ command.query['userIp'] = user_ip unless user_ip.nil?
1006
+ execute_or_queue_command(command, &block)
1007
+ end
1008
+
1009
+ # Checks whether the games client is out of date.
1010
+ # @param [String] client_revision
1011
+ # The revision of the client SDK used by your application. Format:
1012
+ # [PLATFORM_TYPE]:[VERSION_NUMBER]. Possible values of PLATFORM_TYPE are:
1013
+ #
1014
+ # - "ANDROID" - Client is running the Android SDK.
1015
+ # - "IOS" - Client is running the iOS SDK.
1016
+ # - "WEB_APP" - Client is running as a Web App.
1017
+ # @param [String] fields
1018
+ # Selector specifying which fields to include in a partial response.
1019
+ # @param [String] quota_user
1020
+ # Available to use for quota purposes for server-side applications. Can be any
1021
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1022
+ # Overrides userIp if both are provided.
1023
+ # @param [String] user_ip
1024
+ # IP address of the site where the request originates. Use this if you want to
1025
+ # enforce per-user limits.
1026
+ # @param [Google::Apis::RequestOptions] options
1027
+ # Request-specific options
1028
+ #
1029
+ # @yield [result, err] Result & error if block supplied
1030
+ # @yieldparam result [Google::Apis::GamesV1::CheckRevisionResponse] parsed result object
1031
+ # @yieldparam err [StandardError] error object if request failed
1032
+ #
1033
+ # @return [Google::Apis::GamesV1::CheckRevisionResponse]
1034
+ #
1035
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1036
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1037
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1038
+ def check_revision(client_revision: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
1039
+ path = 'revisions/check'
1040
+ command = make_simple_command(:get, path, options)
1041
+ command.response_representation = Google::Apis::GamesV1::CheckRevisionResponse::Representation
1042
+ command.response_class = Google::Apis::GamesV1::CheckRevisionResponse
1043
+ command.query['clientRevision'] = client_revision unless client_revision.nil?
1044
+ command.query['fields'] = fields unless fields.nil?
1045
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1046
+ command.query['userIp'] = user_ip unless user_ip.nil?
1047
+ execute_or_queue_command(command, &block)
1048
+ end
1049
+
1050
+ # Create a room. For internal use by the Games SDK only. Calling this method
1051
+ # directly is unsupported.
1052
+ # @param [Google::Apis::GamesV1::CreateRoomRequest] create_room_request_object
1053
+ # @param [String] language
1054
+ # The preferred language to use for strings returned by this method.
1055
+ # @param [String] fields
1056
+ # Selector specifying which fields to include in a partial response.
1057
+ # @param [String] quota_user
1058
+ # Available to use for quota purposes for server-side applications. Can be any
1059
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1060
+ # Overrides userIp if both are provided.
1061
+ # @param [String] user_ip
1062
+ # IP address of the site where the request originates. Use this if you want to
1063
+ # enforce per-user limits.
1064
+ # @param [Google::Apis::RequestOptions] options
1065
+ # Request-specific options
1066
+ #
1067
+ # @yield [result, err] Result & error if block supplied
1068
+ # @yieldparam result [Google::Apis::GamesV1::Room] parsed result object
1069
+ # @yieldparam err [StandardError] error object if request failed
1070
+ #
1071
+ # @return [Google::Apis::GamesV1::Room]
1072
+ #
1073
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1074
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1075
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1076
+ def create_room(create_room_request_object = nil, language: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
1077
+ path = 'rooms/create'
1078
+ command = make_simple_command(:post, path, options)
1079
+ command.request_representation = Google::Apis::GamesV1::CreateRoomRequest::Representation
1080
+ command.request_object = create_room_request_object
1081
+ command.response_representation = Google::Apis::GamesV1::Room::Representation
1082
+ command.response_class = Google::Apis::GamesV1::Room
1083
+ command.query['language'] = language unless language.nil?
1084
+ command.query['fields'] = fields unless fields.nil?
1085
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1086
+ command.query['userIp'] = user_ip unless user_ip.nil?
1087
+ execute_or_queue_command(command, &block)
1088
+ end
1089
+
1090
+ # Decline an invitation to join a room. For internal use by the Games SDK only.
1091
+ # Calling this method directly is unsupported.
1092
+ # @param [String] room_id
1093
+ # The ID of the room.
1094
+ # @param [String] language
1095
+ # The preferred language to use for strings returned by this method.
1096
+ # @param [String] fields
1097
+ # Selector specifying which fields to include in a partial response.
1098
+ # @param [String] quota_user
1099
+ # Available to use for quota purposes for server-side applications. Can be any
1100
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1101
+ # Overrides userIp if both are provided.
1102
+ # @param [String] user_ip
1103
+ # IP address of the site where the request originates. Use this if you want to
1104
+ # enforce per-user limits.
1105
+ # @param [Google::Apis::RequestOptions] options
1106
+ # Request-specific options
1107
+ #
1108
+ # @yield [result, err] Result & error if block supplied
1109
+ # @yieldparam result [Google::Apis::GamesV1::Room] parsed result object
1110
+ # @yieldparam err [StandardError] error object if request failed
1111
+ #
1112
+ # @return [Google::Apis::GamesV1::Room]
1113
+ #
1114
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1115
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1116
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1117
+ def decline_room(room_id, language: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
1118
+ path = 'rooms/{roomId}/decline'
1119
+ command = make_simple_command(:post, path, options)
1120
+ command.response_representation = Google::Apis::GamesV1::Room::Representation
1121
+ command.response_class = Google::Apis::GamesV1::Room
1122
+ command.params['roomId'] = room_id unless room_id.nil?
1123
+ command.query['language'] = language unless language.nil?
1124
+ command.query['fields'] = fields unless fields.nil?
1125
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1126
+ command.query['userIp'] = user_ip unless user_ip.nil?
1127
+ execute_or_queue_command(command, &block)
1128
+ end
1129
+
1130
+ # Dismiss an invitation to join a room. For internal use by the Games SDK only.
1131
+ # Calling this method directly is unsupported.
1132
+ # @param [String] room_id
1133
+ # The ID of the room.
1134
+ # @param [String] fields
1135
+ # Selector specifying which fields to include in a partial response.
1136
+ # @param [String] quota_user
1137
+ # Available to use for quota purposes for server-side applications. Can be any
1138
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1139
+ # Overrides userIp if both are provided.
1140
+ # @param [String] user_ip
1141
+ # IP address of the site where the request originates. Use this if you want to
1142
+ # enforce per-user limits.
1143
+ # @param [Google::Apis::RequestOptions] options
1144
+ # Request-specific options
1145
+ #
1146
+ # @yield [result, err] Result & error if block supplied
1147
+ # @yieldparam result [NilClass] No result returned for this method
1148
+ # @yieldparam err [StandardError] error object if request failed
1149
+ #
1150
+ # @return [void]
1151
+ #
1152
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1153
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1154
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1155
+ def dismiss_room(room_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
1156
+ path = 'rooms/{roomId}/dismiss'
1157
+ command = make_simple_command(:post, path, options)
1158
+ command.params['roomId'] = room_id unless room_id.nil?
1159
+ command.query['fields'] = fields unless fields.nil?
1160
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1161
+ command.query['userIp'] = user_ip unless user_ip.nil?
1162
+ execute_or_queue_command(command, &block)
1163
+ end
1164
+
1165
+ # Get the data for a room.
1166
+ # @param [String] room_id
1167
+ # The ID of the room.
1168
+ # @param [String] language
1169
+ # The preferred language to use for strings returned by this method.
1170
+ # @param [String] fields
1171
+ # Selector specifying which fields to include in a partial response.
1172
+ # @param [String] quota_user
1173
+ # Available to use for quota purposes for server-side applications. Can be any
1174
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1175
+ # Overrides userIp if both are provided.
1176
+ # @param [String] user_ip
1177
+ # IP address of the site where the request originates. Use this if you want to
1178
+ # enforce per-user limits.
1179
+ # @param [Google::Apis::RequestOptions] options
1180
+ # Request-specific options
1181
+ #
1182
+ # @yield [result, err] Result & error if block supplied
1183
+ # @yieldparam result [Google::Apis::GamesV1::Room] parsed result object
1184
+ # @yieldparam err [StandardError] error object if request failed
1185
+ #
1186
+ # @return [Google::Apis::GamesV1::Room]
1187
+ #
1188
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1189
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1190
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1191
+ def get_room(room_id, language: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
1192
+ path = 'rooms/{roomId}'
1193
+ command = make_simple_command(:get, path, options)
1194
+ command.response_representation = Google::Apis::GamesV1::Room::Representation
1195
+ command.response_class = Google::Apis::GamesV1::Room
1196
+ command.params['roomId'] = room_id unless room_id.nil?
1197
+ command.query['language'] = language unless language.nil?
1198
+ command.query['fields'] = fields unless fields.nil?
1199
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1200
+ command.query['userIp'] = user_ip unless user_ip.nil?
1201
+ execute_or_queue_command(command, &block)
1202
+ end
1203
+
1204
+ # Join a room. For internal use by the Games SDK only. Calling this method
1205
+ # directly is unsupported.
1206
+ # @param [String] room_id
1207
+ # The ID of the room.
1208
+ # @param [Google::Apis::GamesV1::JoinRoomRequest] join_room_request_object
1209
+ # @param [String] language
1210
+ # The preferred language to use for strings returned by this method.
1211
+ # @param [String] fields
1212
+ # Selector specifying which fields to include in a partial response.
1213
+ # @param [String] quota_user
1214
+ # Available to use for quota purposes for server-side applications. Can be any
1215
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1216
+ # Overrides userIp if both are provided.
1217
+ # @param [String] user_ip
1218
+ # IP address of the site where the request originates. Use this if you want to
1219
+ # enforce per-user limits.
1220
+ # @param [Google::Apis::RequestOptions] options
1221
+ # Request-specific options
1222
+ #
1223
+ # @yield [result, err] Result & error if block supplied
1224
+ # @yieldparam result [Google::Apis::GamesV1::Room] parsed result object
1225
+ # @yieldparam err [StandardError] error object if request failed
1226
+ #
1227
+ # @return [Google::Apis::GamesV1::Room]
1228
+ #
1229
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1230
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1231
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1232
+ def join_room(room_id, join_room_request_object = nil, language: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
1233
+ path = 'rooms/{roomId}/join'
1234
+ command = make_simple_command(:post, path, options)
1235
+ command.request_representation = Google::Apis::GamesV1::JoinRoomRequest::Representation
1236
+ command.request_object = join_room_request_object
1237
+ command.response_representation = Google::Apis::GamesV1::Room::Representation
1238
+ command.response_class = Google::Apis::GamesV1::Room
1239
+ command.params['roomId'] = room_id unless room_id.nil?
1240
+ command.query['language'] = language unless language.nil?
1241
+ command.query['fields'] = fields unless fields.nil?
1242
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1243
+ command.query['userIp'] = user_ip unless user_ip.nil?
1244
+ execute_or_queue_command(command, &block)
1245
+ end
1246
+
1247
+ # Leave a room. For internal use by the Games SDK only. Calling this method
1248
+ # directly is unsupported.
1249
+ # @param [String] room_id
1250
+ # The ID of the room.
1251
+ # @param [Google::Apis::GamesV1::LeaveRoomRequest] leave_room_request_object
1252
+ # @param [String] language
1253
+ # The preferred language to use for strings returned by this method.
1254
+ # @param [String] fields
1255
+ # Selector specifying which fields to include in a partial response.
1256
+ # @param [String] quota_user
1257
+ # Available to use for quota purposes for server-side applications. Can be any
1258
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1259
+ # Overrides userIp if both are provided.
1260
+ # @param [String] user_ip
1261
+ # IP address of the site where the request originates. Use this if you want to
1262
+ # enforce per-user limits.
1263
+ # @param [Google::Apis::RequestOptions] options
1264
+ # Request-specific options
1265
+ #
1266
+ # @yield [result, err] Result & error if block supplied
1267
+ # @yieldparam result [Google::Apis::GamesV1::Room] parsed result object
1268
+ # @yieldparam err [StandardError] error object if request failed
1269
+ #
1270
+ # @return [Google::Apis::GamesV1::Room]
1271
+ #
1272
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1273
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1274
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1275
+ def leave_room(room_id, leave_room_request_object = nil, language: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
1276
+ path = 'rooms/{roomId}/leave'
1277
+ command = make_simple_command(:post, path, options)
1278
+ command.request_representation = Google::Apis::GamesV1::LeaveRoomRequest::Representation
1279
+ command.request_object = leave_room_request_object
1280
+ command.response_representation = Google::Apis::GamesV1::Room::Representation
1281
+ command.response_class = Google::Apis::GamesV1::Room
1282
+ command.params['roomId'] = room_id unless room_id.nil?
1283
+ command.query['language'] = language unless language.nil?
1284
+ command.query['fields'] = fields unless fields.nil?
1285
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1286
+ command.query['userIp'] = user_ip unless user_ip.nil?
1287
+ execute_or_queue_command(command, &block)
1288
+ end
1289
+
1290
+ # Returns invitations to join rooms.
1291
+ # @param [String] language
1292
+ # The preferred language to use for strings returned by this method.
1293
+ # @param [Fixnum] max_results
1294
+ # The maximum number of rooms to return in the response, used for paging. For
1295
+ # any response, the actual number of rooms to return may be less than the
1296
+ # specified maxResults.
1297
+ # @param [String] page_token
1298
+ # The token returned by the previous request.
1299
+ # @param [String] fields
1300
+ # Selector specifying which fields to include in a partial response.
1301
+ # @param [String] quota_user
1302
+ # Available to use for quota purposes for server-side applications. Can be any
1303
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1304
+ # Overrides userIp if both are provided.
1305
+ # @param [String] user_ip
1306
+ # IP address of the site where the request originates. Use this if you want to
1307
+ # enforce per-user limits.
1308
+ # @param [Google::Apis::RequestOptions] options
1309
+ # Request-specific options
1310
+ #
1311
+ # @yield [result, err] Result & error if block supplied
1312
+ # @yieldparam result [Google::Apis::GamesV1::RoomList] parsed result object
1313
+ # @yieldparam err [StandardError] error object if request failed
1314
+ #
1315
+ # @return [Google::Apis::GamesV1::RoomList]
1316
+ #
1317
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1318
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1319
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1320
+ def list_rooms(language: nil, max_results: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
1321
+ path = 'rooms'
1322
+ command = make_simple_command(:get, path, options)
1323
+ command.response_representation = Google::Apis::GamesV1::RoomList::Representation
1324
+ command.response_class = Google::Apis::GamesV1::RoomList
1325
+ command.query['language'] = language unless language.nil?
1326
+ command.query['maxResults'] = max_results unless max_results.nil?
1327
+ command.query['pageToken'] = page_token unless page_token.nil?
1328
+ command.query['fields'] = fields unless fields.nil?
1329
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1330
+ command.query['userIp'] = user_ip unless user_ip.nil?
1331
+ execute_or_queue_command(command, &block)
1332
+ end
1333
+
1334
+ # Updates sent by a client reporting the status of peers in a room. For internal
1335
+ # use by the Games SDK only. Calling this method directly is unsupported.
1336
+ # @param [String] room_id
1337
+ # The ID of the room.
1338
+ # @param [Google::Apis::GamesV1::RoomP2PStatuses] room_p2_p_statuses_object
1339
+ # @param [String] language
1340
+ # The preferred language to use for strings returned by this method.
1341
+ # @param [String] fields
1342
+ # Selector specifying which fields to include in a partial response.
1343
+ # @param [String] quota_user
1344
+ # Available to use for quota purposes for server-side applications. Can be any
1345
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1346
+ # Overrides userIp if both are provided.
1347
+ # @param [String] user_ip
1348
+ # IP address of the site where the request originates. Use this if you want to
1349
+ # enforce per-user limits.
1350
+ # @param [Google::Apis::RequestOptions] options
1351
+ # Request-specific options
1352
+ #
1353
+ # @yield [result, err] Result & error if block supplied
1354
+ # @yieldparam result [Google::Apis::GamesV1::RoomStatus] parsed result object
1355
+ # @yieldparam err [StandardError] error object if request failed
1356
+ #
1357
+ # @return [Google::Apis::GamesV1::RoomStatus]
1358
+ #
1359
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1360
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1361
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1362
+ def report_room_status(room_id, room_p2_p_statuses_object = nil, language: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
1363
+ path = 'rooms/{roomId}/reportstatus'
1364
+ command = make_simple_command(:post, path, options)
1365
+ command.request_representation = Google::Apis::GamesV1::RoomP2PStatuses::Representation
1366
+ command.request_object = room_p2_p_statuses_object
1367
+ command.response_representation = Google::Apis::GamesV1::RoomStatus::Representation
1368
+ command.response_class = Google::Apis::GamesV1::RoomStatus
1369
+ command.params['roomId'] = room_id unless room_id.nil?
1370
+ command.query['language'] = language unless language.nil?
1371
+ command.query['fields'] = fields unless fields.nil?
1372
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1373
+ command.query['userIp'] = user_ip unless user_ip.nil?
1374
+ execute_or_queue_command(command, &block)
1375
+ end
1376
+
1377
+ # Get high scores, and optionally ranks, in leaderboards for the currently
1378
+ # authenticated player. For a specific time span, leaderboardId can be set to
1379
+ # ALL to retrieve data for all leaderboards in a given time span.
1380
+ # NOTE: You cannot ask for 'ALL' leaderboards and 'ALL' timeSpans in the same
1381
+ # request; only one parameter may be set to 'ALL'.
1382
+ # @param [String] player_id
1383
+ # A player ID. A value of me may be used in place of the authenticated player's
1384
+ # ID.
1385
+ # @param [String] leaderboard_id
1386
+ # The ID of the leaderboard. Can be set to 'ALL' to retrieve data for all
1387
+ # leaderboards for this application.
1388
+ # @param [String] time_span
1389
+ # The time span for the scores and ranks you're requesting.
1390
+ # @param [String] include_rank_type
1391
+ # The types of ranks to return. If the parameter is omitted, no ranks will be
1392
+ # returned.
1393
+ # @param [String] language
1394
+ # The preferred language to use for strings returned by this method.
1395
+ # @param [Fixnum] max_results
1396
+ # The maximum number of leaderboard scores to return in the response. For any
1397
+ # response, the actual number of leaderboard scores returned may be less than
1398
+ # the specified maxResults.
1399
+ # @param [String] page_token
1400
+ # The token returned by the previous request.
1401
+ # @param [String] fields
1402
+ # Selector specifying which fields to include in a partial response.
1403
+ # @param [String] quota_user
1404
+ # Available to use for quota purposes for server-side applications. Can be any
1405
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1406
+ # Overrides userIp if both are provided.
1407
+ # @param [String] user_ip
1408
+ # IP address of the site where the request originates. Use this if you want to
1409
+ # enforce per-user limits.
1410
+ # @param [Google::Apis::RequestOptions] options
1411
+ # Request-specific options
1412
+ #
1413
+ # @yield [result, err] Result & error if block supplied
1414
+ # @yieldparam result [Google::Apis::GamesV1::ListPlayerLeaderboardScoreResponse] parsed result object
1415
+ # @yieldparam err [StandardError] error object if request failed
1416
+ #
1417
+ # @return [Google::Apis::GamesV1::ListPlayerLeaderboardScoreResponse]
1418
+ #
1419
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1420
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1421
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1422
+ def get_score(player_id, leaderboard_id, time_span, include_rank_type: nil, language: nil, max_results: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
1423
+ path = 'players/{playerId}/leaderboards/{leaderboardId}/scores/{timeSpan}'
1424
+ command = make_simple_command(:get, path, options)
1425
+ command.response_representation = Google::Apis::GamesV1::ListPlayerLeaderboardScoreResponse::Representation
1426
+ command.response_class = Google::Apis::GamesV1::ListPlayerLeaderboardScoreResponse
1427
+ command.params['playerId'] = player_id unless player_id.nil?
1428
+ command.params['leaderboardId'] = leaderboard_id unless leaderboard_id.nil?
1429
+ command.params['timeSpan'] = time_span unless time_span.nil?
1430
+ command.query['includeRankType'] = include_rank_type unless include_rank_type.nil?
1431
+ command.query['language'] = language unless language.nil?
1432
+ command.query['maxResults'] = max_results unless max_results.nil?
1433
+ command.query['pageToken'] = page_token unless page_token.nil?
1434
+ command.query['fields'] = fields unless fields.nil?
1435
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1436
+ command.query['userIp'] = user_ip unless user_ip.nil?
1437
+ execute_or_queue_command(command, &block)
1438
+ end
1439
+
1440
+ # Lists the scores in a leaderboard, starting from the top.
1441
+ # @param [String] leaderboard_id
1442
+ # The ID of the leaderboard.
1443
+ # @param [String] collection
1444
+ # The collection of scores you're requesting.
1445
+ # @param [String] language
1446
+ # The preferred language to use for strings returned by this method.
1447
+ # @param [Fixnum] max_results
1448
+ # The maximum number of leaderboard scores to return in the response. For any
1449
+ # response, the actual number of leaderboard scores returned may be less than
1450
+ # the specified maxResults.
1451
+ # @param [String] page_token
1452
+ # The token returned by the previous request.
1453
+ # @param [String] time_span
1454
+ # The time span for the scores and ranks you're requesting.
1455
+ # @param [String] fields
1456
+ # Selector specifying which fields to include in a partial response.
1457
+ # @param [String] quota_user
1458
+ # Available to use for quota purposes for server-side applications. Can be any
1459
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1460
+ # Overrides userIp if both are provided.
1461
+ # @param [String] user_ip
1462
+ # IP address of the site where the request originates. Use this if you want to
1463
+ # enforce per-user limits.
1464
+ # @param [Google::Apis::RequestOptions] options
1465
+ # Request-specific options
1466
+ #
1467
+ # @yield [result, err] Result & error if block supplied
1468
+ # @yieldparam result [Google::Apis::GamesV1::LeaderboardScores] parsed result object
1469
+ # @yieldparam err [StandardError] error object if request failed
1470
+ #
1471
+ # @return [Google::Apis::GamesV1::LeaderboardScores]
1472
+ #
1473
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1474
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1475
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1476
+ def list_scores(leaderboard_id, collection, language: nil, max_results: nil, page_token: nil, time_span: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
1477
+ path = 'leaderboards/{leaderboardId}/scores/{collection}'
1478
+ command = make_simple_command(:get, path, options)
1479
+ command.response_representation = Google::Apis::GamesV1::LeaderboardScores::Representation
1480
+ command.response_class = Google::Apis::GamesV1::LeaderboardScores
1481
+ command.params['leaderboardId'] = leaderboard_id unless leaderboard_id.nil?
1482
+ command.params['collection'] = collection unless collection.nil?
1483
+ command.query['language'] = language unless language.nil?
1484
+ command.query['maxResults'] = max_results unless max_results.nil?
1485
+ command.query['pageToken'] = page_token unless page_token.nil?
1486
+ command.query['timeSpan'] = time_span unless time_span.nil?
1487
+ command.query['fields'] = fields unless fields.nil?
1488
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1489
+ command.query['userIp'] = user_ip unless user_ip.nil?
1490
+ execute_or_queue_command(command, &block)
1491
+ end
1492
+
1493
+ # Lists the scores in a leaderboard around (and including) a player's score.
1494
+ # @param [String] leaderboard_id
1495
+ # The ID of the leaderboard.
1496
+ # @param [String] collection
1497
+ # The collection of scores you're requesting.
1498
+ # @param [String] language
1499
+ # The preferred language to use for strings returned by this method.
1500
+ # @param [Fixnum] max_results
1501
+ # The maximum number of leaderboard scores to return in the response. For any
1502
+ # response, the actual number of leaderboard scores returned may be less than
1503
+ # the specified maxResults.
1504
+ # @param [String] page_token
1505
+ # The token returned by the previous request.
1506
+ # @param [Fixnum] results_above
1507
+ # The preferred number of scores to return above the player's score. More scores
1508
+ # may be returned if the player is at the bottom of the leaderboard; fewer may
1509
+ # be returned if the player is at the top. Must be less than or equal to
1510
+ # maxResults.
1511
+ # @param [Boolean] return_top_if_absent
1512
+ # True if the top scores should be returned when the player is not in the
1513
+ # leaderboard. Defaults to true.
1514
+ # @param [String] time_span
1515
+ # The time span for the scores and ranks you're requesting.
1516
+ # @param [String] fields
1517
+ # Selector specifying which fields to include in a partial response.
1518
+ # @param [String] quota_user
1519
+ # Available to use for quota purposes for server-side applications. Can be any
1520
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1521
+ # Overrides userIp if both are provided.
1522
+ # @param [String] user_ip
1523
+ # IP address of the site where the request originates. Use this if you want to
1524
+ # enforce per-user limits.
1525
+ # @param [Google::Apis::RequestOptions] options
1526
+ # Request-specific options
1527
+ #
1528
+ # @yield [result, err] Result & error if block supplied
1529
+ # @yieldparam result [Google::Apis::GamesV1::LeaderboardScores] parsed result object
1530
+ # @yieldparam err [StandardError] error object if request failed
1531
+ #
1532
+ # @return [Google::Apis::GamesV1::LeaderboardScores]
1533
+ #
1534
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1535
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1536
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1537
+ def list_window_score(leaderboard_id, collection, language: nil, max_results: nil, page_token: nil, results_above: nil, return_top_if_absent: nil, time_span: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
1538
+ path = 'leaderboards/{leaderboardId}/window/{collection}'
1539
+ command = make_simple_command(:get, path, options)
1540
+ command.response_representation = Google::Apis::GamesV1::LeaderboardScores::Representation
1541
+ command.response_class = Google::Apis::GamesV1::LeaderboardScores
1542
+ command.params['leaderboardId'] = leaderboard_id unless leaderboard_id.nil?
1543
+ command.params['collection'] = collection unless collection.nil?
1544
+ command.query['language'] = language unless language.nil?
1545
+ command.query['maxResults'] = max_results unless max_results.nil?
1546
+ command.query['pageToken'] = page_token unless page_token.nil?
1547
+ command.query['resultsAbove'] = results_above unless results_above.nil?
1548
+ command.query['returnTopIfAbsent'] = return_top_if_absent unless return_top_if_absent.nil?
1549
+ command.query['timeSpan'] = time_span unless time_span.nil?
1550
+ command.query['fields'] = fields unless fields.nil?
1551
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1552
+ command.query['userIp'] = user_ip unless user_ip.nil?
1553
+ execute_or_queue_command(command, &block)
1554
+ end
1555
+
1556
+ # Submits a score to the specified leaderboard.
1557
+ # @param [String] leaderboard_id
1558
+ # The ID of the leaderboard.
1559
+ # @param [String] language
1560
+ # The preferred language to use for strings returned by this method.
1561
+ # @param [String] score
1562
+ # The score you're submitting. The submitted score is ignored if it is worse
1563
+ # than a previously submitted score, where worse depends on the leaderboard sort
1564
+ # order. The meaning of the score value depends on the leaderboard format type.
1565
+ # For fixed-point, the score represents the raw value. For time, the score
1566
+ # represents elapsed time in milliseconds. For currency, the score represents a
1567
+ # value in micro units.
1568
+ # @param [String] score_tag
1569
+ # Additional information about the score you're submitting. Values must contain
1570
+ # no more than 64 URI-safe characters as defined by section 2.3 of RFC 3986.
1571
+ # @param [String] fields
1572
+ # Selector specifying which fields to include in a partial response.
1573
+ # @param [String] quota_user
1574
+ # Available to use for quota purposes for server-side applications. Can be any
1575
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1576
+ # Overrides userIp if both are provided.
1577
+ # @param [String] user_ip
1578
+ # IP address of the site where the request originates. Use this if you want to
1579
+ # enforce per-user limits.
1580
+ # @param [Google::Apis::RequestOptions] options
1581
+ # Request-specific options
1582
+ #
1583
+ # @yield [result, err] Result & error if block supplied
1584
+ # @yieldparam result [Google::Apis::GamesV1::PlayerScoreResponse] parsed result object
1585
+ # @yieldparam err [StandardError] error object if request failed
1586
+ #
1587
+ # @return [Google::Apis::GamesV1::PlayerScoreResponse]
1588
+ #
1589
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1590
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1591
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1592
+ def submit_score(leaderboard_id, language: nil, score: nil, score_tag: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
1593
+ path = 'leaderboards/{leaderboardId}/scores'
1594
+ command = make_simple_command(:post, path, options)
1595
+ command.response_representation = Google::Apis::GamesV1::PlayerScoreResponse::Representation
1596
+ command.response_class = Google::Apis::GamesV1::PlayerScoreResponse
1597
+ command.params['leaderboardId'] = leaderboard_id unless leaderboard_id.nil?
1598
+ command.query['language'] = language unless language.nil?
1599
+ command.query['score'] = score unless score.nil?
1600
+ command.query['scoreTag'] = score_tag unless score_tag.nil?
1601
+ command.query['fields'] = fields unless fields.nil?
1602
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1603
+ command.query['userIp'] = user_ip unless user_ip.nil?
1604
+ execute_or_queue_command(command, &block)
1605
+ end
1606
+
1607
+ # Submits multiple scores to leaderboards.
1608
+ # @param [Google::Apis::GamesV1::PlayerScoreSubmissionList] player_score_submission_list_object
1609
+ # @param [String] language
1610
+ # The preferred language to use for strings returned by this method.
1611
+ # @param [String] fields
1612
+ # Selector specifying which fields to include in a partial response.
1613
+ # @param [String] quota_user
1614
+ # Available to use for quota purposes for server-side applications. Can be any
1615
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1616
+ # Overrides userIp if both are provided.
1617
+ # @param [String] user_ip
1618
+ # IP address of the site where the request originates. Use this if you want to
1619
+ # enforce per-user limits.
1620
+ # @param [Google::Apis::RequestOptions] options
1621
+ # Request-specific options
1622
+ #
1623
+ # @yield [result, err] Result & error if block supplied
1624
+ # @yieldparam result [Google::Apis::GamesV1::ListPlayerScoreResponse] parsed result object
1625
+ # @yieldparam err [StandardError] error object if request failed
1626
+ #
1627
+ # @return [Google::Apis::GamesV1::ListPlayerScoreResponse]
1628
+ #
1629
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1630
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1631
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1632
+ def submit_multiple_score(player_score_submission_list_object = nil, language: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
1633
+ path = 'leaderboards/scores'
1634
+ command = make_simple_command(:post, path, options)
1635
+ command.request_representation = Google::Apis::GamesV1::PlayerScoreSubmissionList::Representation
1636
+ command.request_object = player_score_submission_list_object
1637
+ command.response_representation = Google::Apis::GamesV1::ListPlayerScoreResponse::Representation
1638
+ command.response_class = Google::Apis::GamesV1::ListPlayerScoreResponse
1639
+ command.query['language'] = language unless language.nil?
1640
+ command.query['fields'] = fields unless fields.nil?
1641
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1642
+ command.query['userIp'] = user_ip unless user_ip.nil?
1643
+ execute_or_queue_command(command, &block)
1644
+ end
1645
+
1646
+ # Retrieves the metadata for a given snapshot ID.
1647
+ # @param [String] snapshot_id
1648
+ # The ID of the snapshot.
1649
+ # @param [String] language
1650
+ # The preferred language to use for strings returned by this method.
1651
+ # @param [String] fields
1652
+ # Selector specifying which fields to include in a partial response.
1653
+ # @param [String] quota_user
1654
+ # Available to use for quota purposes for server-side applications. Can be any
1655
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1656
+ # Overrides userIp if both are provided.
1657
+ # @param [String] user_ip
1658
+ # IP address of the site where the request originates. Use this if you want to
1659
+ # enforce per-user limits.
1660
+ # @param [Google::Apis::RequestOptions] options
1661
+ # Request-specific options
1662
+ #
1663
+ # @yield [result, err] Result & error if block supplied
1664
+ # @yieldparam result [Google::Apis::GamesV1::Snapshot] parsed result object
1665
+ # @yieldparam err [StandardError] error object if request failed
1666
+ #
1667
+ # @return [Google::Apis::GamesV1::Snapshot]
1668
+ #
1669
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1670
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1671
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1672
+ def get_snapshot(snapshot_id, language: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
1673
+ path = 'snapshots/{snapshotId}'
1674
+ command = make_simple_command(:get, path, options)
1675
+ command.response_representation = Google::Apis::GamesV1::Snapshot::Representation
1676
+ command.response_class = Google::Apis::GamesV1::Snapshot
1677
+ command.params['snapshotId'] = snapshot_id unless snapshot_id.nil?
1678
+ command.query['language'] = language unless language.nil?
1679
+ command.query['fields'] = fields unless fields.nil?
1680
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1681
+ command.query['userIp'] = user_ip unless user_ip.nil?
1682
+ execute_or_queue_command(command, &block)
1683
+ end
1684
+
1685
+ # Retrieves a list of snapshots created by your application for the player
1686
+ # corresponding to the player ID.
1687
+ # @param [String] player_id
1688
+ # A player ID. A value of me may be used in place of the authenticated player's
1689
+ # ID.
1690
+ # @param [String] language
1691
+ # The preferred language to use for strings returned by this method.
1692
+ # @param [Fixnum] max_results
1693
+ # The maximum number of snapshot resources to return in the response, used for
1694
+ # paging. For any response, the actual number of snapshot resources returned may
1695
+ # be less than the specified maxResults.
1696
+ # @param [String] page_token
1697
+ # The token returned by the previous request.
1698
+ # @param [String] fields
1699
+ # Selector specifying which fields to include in a partial response.
1700
+ # @param [String] quota_user
1701
+ # Available to use for quota purposes for server-side applications. Can be any
1702
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1703
+ # Overrides userIp if both are provided.
1704
+ # @param [String] user_ip
1705
+ # IP address of the site where the request originates. Use this if you want to
1706
+ # enforce per-user limits.
1707
+ # @param [Google::Apis::RequestOptions] options
1708
+ # Request-specific options
1709
+ #
1710
+ # @yield [result, err] Result & error if block supplied
1711
+ # @yieldparam result [Google::Apis::GamesV1::ListSnapshotResponse] parsed result object
1712
+ # @yieldparam err [StandardError] error object if request failed
1713
+ #
1714
+ # @return [Google::Apis::GamesV1::ListSnapshotResponse]
1715
+ #
1716
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1717
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1718
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1719
+ def list_snapshots(player_id, language: nil, max_results: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
1720
+ path = 'players/{playerId}/snapshots'
1721
+ command = make_simple_command(:get, path, options)
1722
+ command.response_representation = Google::Apis::GamesV1::ListSnapshotResponse::Representation
1723
+ command.response_class = Google::Apis::GamesV1::ListSnapshotResponse
1724
+ command.params['playerId'] = player_id unless player_id.nil?
1725
+ command.query['language'] = language unless language.nil?
1726
+ command.query['maxResults'] = max_results unless max_results.nil?
1727
+ command.query['pageToken'] = page_token unless page_token.nil?
1728
+ command.query['fields'] = fields unless fields.nil?
1729
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1730
+ command.query['userIp'] = user_ip unless user_ip.nil?
1731
+ execute_or_queue_command(command, &block)
1732
+ end
1733
+
1734
+ # Cancel a turn-based match.
1735
+ # @param [String] match_id
1736
+ # The ID of the match.
1737
+ # @param [String] fields
1738
+ # Selector specifying which fields to include in a partial response.
1739
+ # @param [String] quota_user
1740
+ # Available to use for quota purposes for server-side applications. Can be any
1741
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1742
+ # Overrides userIp if both are provided.
1743
+ # @param [String] user_ip
1744
+ # IP address of the site where the request originates. Use this if you want to
1745
+ # enforce per-user limits.
1746
+ # @param [Google::Apis::RequestOptions] options
1747
+ # Request-specific options
1748
+ #
1749
+ # @yield [result, err] Result & error if block supplied
1750
+ # @yieldparam result [NilClass] No result returned for this method
1751
+ # @yieldparam err [StandardError] error object if request failed
1752
+ #
1753
+ # @return [void]
1754
+ #
1755
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1756
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1757
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1758
+ def cancel_turn_based_match(match_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
1759
+ path = 'turnbasedmatches/{matchId}/cancel'
1760
+ command = make_simple_command(:put, path, options)
1761
+ command.params['matchId'] = match_id unless match_id.nil?
1762
+ command.query['fields'] = fields unless fields.nil?
1763
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1764
+ command.query['userIp'] = user_ip unless user_ip.nil?
1765
+ execute_or_queue_command(command, &block)
1766
+ end
1767
+
1768
+ # Create a turn-based match.
1769
+ # @param [Google::Apis::GamesV1::CreateTurnBasedMatchRequest] create_turn_based_match_request_object
1770
+ # @param [String] language
1771
+ # The preferred language to use for strings returned by this method.
1772
+ # @param [String] fields
1773
+ # Selector specifying which fields to include in a partial response.
1774
+ # @param [String] quota_user
1775
+ # Available to use for quota purposes for server-side applications. Can be any
1776
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1777
+ # Overrides userIp if both are provided.
1778
+ # @param [String] user_ip
1779
+ # IP address of the site where the request originates. Use this if you want to
1780
+ # enforce per-user limits.
1781
+ # @param [Google::Apis::RequestOptions] options
1782
+ # Request-specific options
1783
+ #
1784
+ # @yield [result, err] Result & error if block supplied
1785
+ # @yieldparam result [Google::Apis::GamesV1::TurnBasedMatch] parsed result object
1786
+ # @yieldparam err [StandardError] error object if request failed
1787
+ #
1788
+ # @return [Google::Apis::GamesV1::TurnBasedMatch]
1789
+ #
1790
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1791
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1792
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1793
+ def create_turn_based_match(create_turn_based_match_request_object = nil, language: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
1794
+ path = 'turnbasedmatches/create'
1795
+ command = make_simple_command(:post, path, options)
1796
+ command.request_representation = Google::Apis::GamesV1::CreateTurnBasedMatchRequest::Representation
1797
+ command.request_object = create_turn_based_match_request_object
1798
+ command.response_representation = Google::Apis::GamesV1::TurnBasedMatch::Representation
1799
+ command.response_class = Google::Apis::GamesV1::TurnBasedMatch
1800
+ command.query['language'] = language unless language.nil?
1801
+ command.query['fields'] = fields unless fields.nil?
1802
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1803
+ command.query['userIp'] = user_ip unless user_ip.nil?
1804
+ execute_or_queue_command(command, &block)
1805
+ end
1806
+
1807
+ # Decline an invitation to play a turn-based match.
1808
+ # @param [String] match_id
1809
+ # The ID of the match.
1810
+ # @param [String] language
1811
+ # The preferred language to use for strings returned by this method.
1812
+ # @param [String] fields
1813
+ # Selector specifying which fields to include in a partial response.
1814
+ # @param [String] quota_user
1815
+ # Available to use for quota purposes for server-side applications. Can be any
1816
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1817
+ # Overrides userIp if both are provided.
1818
+ # @param [String] user_ip
1819
+ # IP address of the site where the request originates. Use this if you want to
1820
+ # enforce per-user limits.
1821
+ # @param [Google::Apis::RequestOptions] options
1822
+ # Request-specific options
1823
+ #
1824
+ # @yield [result, err] Result & error if block supplied
1825
+ # @yieldparam result [Google::Apis::GamesV1::TurnBasedMatch] parsed result object
1826
+ # @yieldparam err [StandardError] error object if request failed
1827
+ #
1828
+ # @return [Google::Apis::GamesV1::TurnBasedMatch]
1829
+ #
1830
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1831
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1832
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1833
+ def decline_turn_based_match(match_id, language: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
1834
+ path = 'turnbasedmatches/{matchId}/decline'
1835
+ command = make_simple_command(:put, path, options)
1836
+ command.response_representation = Google::Apis::GamesV1::TurnBasedMatch::Representation
1837
+ command.response_class = Google::Apis::GamesV1::TurnBasedMatch
1838
+ command.params['matchId'] = match_id unless match_id.nil?
1839
+ command.query['language'] = language unless language.nil?
1840
+ command.query['fields'] = fields unless fields.nil?
1841
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1842
+ command.query['userIp'] = user_ip unless user_ip.nil?
1843
+ execute_or_queue_command(command, &block)
1844
+ end
1845
+
1846
+ # Dismiss a turn-based match from the match list. The match will no longer show
1847
+ # up in the list and will not generate notifications.
1848
+ # @param [String] match_id
1849
+ # The ID of the match.
1850
+ # @param [String] fields
1851
+ # Selector specifying which fields to include in a partial response.
1852
+ # @param [String] quota_user
1853
+ # Available to use for quota purposes for server-side applications. Can be any
1854
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1855
+ # Overrides userIp if both are provided.
1856
+ # @param [String] user_ip
1857
+ # IP address of the site where the request originates. Use this if you want to
1858
+ # enforce per-user limits.
1859
+ # @param [Google::Apis::RequestOptions] options
1860
+ # Request-specific options
1861
+ #
1862
+ # @yield [result, err] Result & error if block supplied
1863
+ # @yieldparam result [NilClass] No result returned for this method
1864
+ # @yieldparam err [StandardError] error object if request failed
1865
+ #
1866
+ # @return [void]
1867
+ #
1868
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1869
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1870
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1871
+ def dismiss_turn_based_match(match_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
1872
+ path = 'turnbasedmatches/{matchId}/dismiss'
1873
+ command = make_simple_command(:put, path, options)
1874
+ command.params['matchId'] = match_id unless match_id.nil?
1875
+ command.query['fields'] = fields unless fields.nil?
1876
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1877
+ command.query['userIp'] = user_ip unless user_ip.nil?
1878
+ execute_or_queue_command(command, &block)
1879
+ end
1880
+
1881
+ # Finish a turn-based match. Each player should make this call once, after all
1882
+ # results are in. Only the player whose turn it is may make the first call to
1883
+ # Finish, and can pass in the final match state.
1884
+ # @param [String] match_id
1885
+ # The ID of the match.
1886
+ # @param [Google::Apis::GamesV1::TurnBasedMatchResults] turn_based_match_results_object
1887
+ # @param [String] language
1888
+ # The preferred language to use for strings returned by this method.
1889
+ # @param [String] fields
1890
+ # Selector specifying which fields to include in a partial response.
1891
+ # @param [String] quota_user
1892
+ # Available to use for quota purposes for server-side applications. Can be any
1893
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1894
+ # Overrides userIp if both are provided.
1895
+ # @param [String] user_ip
1896
+ # IP address of the site where the request originates. Use this if you want to
1897
+ # enforce per-user limits.
1898
+ # @param [Google::Apis::RequestOptions] options
1899
+ # Request-specific options
1900
+ #
1901
+ # @yield [result, err] Result & error if block supplied
1902
+ # @yieldparam result [Google::Apis::GamesV1::TurnBasedMatch] parsed result object
1903
+ # @yieldparam err [StandardError] error object if request failed
1904
+ #
1905
+ # @return [Google::Apis::GamesV1::TurnBasedMatch]
1906
+ #
1907
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1908
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1909
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1910
+ def finish_turn_based_match(match_id, turn_based_match_results_object = nil, language: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
1911
+ path = 'turnbasedmatches/{matchId}/finish'
1912
+ command = make_simple_command(:put, path, options)
1913
+ command.request_representation = Google::Apis::GamesV1::TurnBasedMatchResults::Representation
1914
+ command.request_object = turn_based_match_results_object
1915
+ command.response_representation = Google::Apis::GamesV1::TurnBasedMatch::Representation
1916
+ command.response_class = Google::Apis::GamesV1::TurnBasedMatch
1917
+ command.params['matchId'] = match_id unless match_id.nil?
1918
+ command.query['language'] = language unless language.nil?
1919
+ command.query['fields'] = fields unless fields.nil?
1920
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1921
+ command.query['userIp'] = user_ip unless user_ip.nil?
1922
+ execute_or_queue_command(command, &block)
1923
+ end
1924
+
1925
+ # Get the data for a turn-based match.
1926
+ # @param [String] match_id
1927
+ # The ID of the match.
1928
+ # @param [Boolean] include_match_data
1929
+ # Get match data along with metadata.
1930
+ # @param [String] language
1931
+ # The preferred language to use for strings returned by this method.
1932
+ # @param [String] fields
1933
+ # Selector specifying which fields to include in a partial response.
1934
+ # @param [String] quota_user
1935
+ # Available to use for quota purposes for server-side applications. Can be any
1936
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1937
+ # Overrides userIp if both are provided.
1938
+ # @param [String] user_ip
1939
+ # IP address of the site where the request originates. Use this if you want to
1940
+ # enforce per-user limits.
1941
+ # @param [Google::Apis::RequestOptions] options
1942
+ # Request-specific options
1943
+ #
1944
+ # @yield [result, err] Result & error if block supplied
1945
+ # @yieldparam result [Google::Apis::GamesV1::TurnBasedMatch] parsed result object
1946
+ # @yieldparam err [StandardError] error object if request failed
1947
+ #
1948
+ # @return [Google::Apis::GamesV1::TurnBasedMatch]
1949
+ #
1950
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1951
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1952
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1953
+ def get_turn_based_match(match_id, include_match_data: nil, language: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
1954
+ path = 'turnbasedmatches/{matchId}'
1955
+ command = make_simple_command(:get, path, options)
1956
+ command.response_representation = Google::Apis::GamesV1::TurnBasedMatch::Representation
1957
+ command.response_class = Google::Apis::GamesV1::TurnBasedMatch
1958
+ command.params['matchId'] = match_id unless match_id.nil?
1959
+ command.query['includeMatchData'] = include_match_data unless include_match_data.nil?
1960
+ command.query['language'] = language unless language.nil?
1961
+ command.query['fields'] = fields unless fields.nil?
1962
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1963
+ command.query['userIp'] = user_ip unless user_ip.nil?
1964
+ execute_or_queue_command(command, &block)
1965
+ end
1966
+
1967
+ # Join a turn-based match.
1968
+ # @param [String] match_id
1969
+ # The ID of the match.
1970
+ # @param [String] language
1971
+ # The preferred language to use for strings returned by this method.
1972
+ # @param [String] fields
1973
+ # Selector specifying which fields to include in a partial response.
1974
+ # @param [String] quota_user
1975
+ # Available to use for quota purposes for server-side applications. Can be any
1976
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1977
+ # Overrides userIp if both are provided.
1978
+ # @param [String] user_ip
1979
+ # IP address of the site where the request originates. Use this if you want to
1980
+ # enforce per-user limits.
1981
+ # @param [Google::Apis::RequestOptions] options
1982
+ # Request-specific options
1983
+ #
1984
+ # @yield [result, err] Result & error if block supplied
1985
+ # @yieldparam result [Google::Apis::GamesV1::TurnBasedMatch] parsed result object
1986
+ # @yieldparam err [StandardError] error object if request failed
1987
+ #
1988
+ # @return [Google::Apis::GamesV1::TurnBasedMatch]
1989
+ #
1990
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1991
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1992
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1993
+ def join_turn_based_match(match_id, language: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
1994
+ path = 'turnbasedmatches/{matchId}/join'
1995
+ command = make_simple_command(:put, path, options)
1996
+ command.response_representation = Google::Apis::GamesV1::TurnBasedMatch::Representation
1997
+ command.response_class = Google::Apis::GamesV1::TurnBasedMatch
1998
+ command.params['matchId'] = match_id unless match_id.nil?
1999
+ command.query['language'] = language unless language.nil?
2000
+ command.query['fields'] = fields unless fields.nil?
2001
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
2002
+ command.query['userIp'] = user_ip unless user_ip.nil?
2003
+ execute_or_queue_command(command, &block)
2004
+ end
2005
+
2006
+ # Leave a turn-based match when it is not the current player's turn, without
2007
+ # canceling the match.
2008
+ # @param [String] match_id
2009
+ # The ID of the match.
2010
+ # @param [String] language
2011
+ # The preferred language to use for strings returned by this method.
2012
+ # @param [String] fields
2013
+ # Selector specifying which fields to include in a partial response.
2014
+ # @param [String] quota_user
2015
+ # Available to use for quota purposes for server-side applications. Can be any
2016
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
2017
+ # Overrides userIp if both are provided.
2018
+ # @param [String] user_ip
2019
+ # IP address of the site where the request originates. Use this if you want to
2020
+ # enforce per-user limits.
2021
+ # @param [Google::Apis::RequestOptions] options
2022
+ # Request-specific options
2023
+ #
2024
+ # @yield [result, err] Result & error if block supplied
2025
+ # @yieldparam result [Google::Apis::GamesV1::TurnBasedMatch] parsed result object
2026
+ # @yieldparam err [StandardError] error object if request failed
2027
+ #
2028
+ # @return [Google::Apis::GamesV1::TurnBasedMatch]
2029
+ #
2030
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
2031
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
2032
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
2033
+ def leave_turn_based_match(match_id, language: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
2034
+ path = 'turnbasedmatches/{matchId}/leave'
2035
+ command = make_simple_command(:put, path, options)
2036
+ command.response_representation = Google::Apis::GamesV1::TurnBasedMatch::Representation
2037
+ command.response_class = Google::Apis::GamesV1::TurnBasedMatch
2038
+ command.params['matchId'] = match_id unless match_id.nil?
2039
+ command.query['language'] = language unless language.nil?
2040
+ command.query['fields'] = fields unless fields.nil?
2041
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
2042
+ command.query['userIp'] = user_ip unless user_ip.nil?
2043
+ execute_or_queue_command(command, &block)
2044
+ end
2045
+
2046
+ # Leave a turn-based match during the current player's turn, without canceling
2047
+ # the match.
2048
+ # @param [String] match_id
2049
+ # The ID of the match.
2050
+ # @param [String] language
2051
+ # The preferred language to use for strings returned by this method.
2052
+ # @param [Fixnum] match_version
2053
+ # The version of the match being updated.
2054
+ # @param [String] pending_participant_id
2055
+ # The ID of another participant who should take their turn next. If not set, the
2056
+ # match will wait for other player(s) to join via automatching; this is only
2057
+ # valid if automatch criteria is set on the match with remaining slots for
2058
+ # automatched players.
2059
+ # @param [String] fields
2060
+ # Selector specifying which fields to include in a partial response.
2061
+ # @param [String] quota_user
2062
+ # Available to use for quota purposes for server-side applications. Can be any
2063
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
2064
+ # Overrides userIp if both are provided.
2065
+ # @param [String] user_ip
2066
+ # IP address of the site where the request originates. Use this if you want to
2067
+ # enforce per-user limits.
2068
+ # @param [Google::Apis::RequestOptions] options
2069
+ # Request-specific options
2070
+ #
2071
+ # @yield [result, err] Result & error if block supplied
2072
+ # @yieldparam result [Google::Apis::GamesV1::TurnBasedMatch] parsed result object
2073
+ # @yieldparam err [StandardError] error object if request failed
2074
+ #
2075
+ # @return [Google::Apis::GamesV1::TurnBasedMatch]
2076
+ #
2077
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
2078
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
2079
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
2080
+ def leave_turn(match_id, language: nil, match_version: nil, pending_participant_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
2081
+ path = 'turnbasedmatches/{matchId}/leaveTurn'
2082
+ command = make_simple_command(:put, path, options)
2083
+ command.response_representation = Google::Apis::GamesV1::TurnBasedMatch::Representation
2084
+ command.response_class = Google::Apis::GamesV1::TurnBasedMatch
2085
+ command.params['matchId'] = match_id unless match_id.nil?
2086
+ command.query['language'] = language unless language.nil?
2087
+ command.query['matchVersion'] = match_version unless match_version.nil?
2088
+ command.query['pendingParticipantId'] = pending_participant_id unless pending_participant_id.nil?
2089
+ command.query['fields'] = fields unless fields.nil?
2090
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
2091
+ command.query['userIp'] = user_ip unless user_ip.nil?
2092
+ execute_or_queue_command(command, &block)
2093
+ end
2094
+
2095
+ # Returns turn-based matches the player is or was involved in.
2096
+ # @param [Boolean] include_match_data
2097
+ # True if match data should be returned in the response. Note that not all data
2098
+ # will necessarily be returned if include_match_data is true; the server may
2099
+ # decide to only return data for some of the matches to limit download size for
2100
+ # the client. The remainder of the data for these matches will be retrievable on
2101
+ # request.
2102
+ # @param [String] language
2103
+ # The preferred language to use for strings returned by this method.
2104
+ # @param [Fixnum] max_completed_matches
2105
+ # The maximum number of completed or canceled matches to return in the response.
2106
+ # If not set, all matches returned could be completed or canceled.
2107
+ # @param [Fixnum] max_results
2108
+ # The maximum number of matches to return in the response, used for paging. For
2109
+ # any response, the actual number of matches to return may be less than the
2110
+ # specified maxResults.
2111
+ # @param [String] page_token
2112
+ # The token returned by the previous request.
2113
+ # @param [String] fields
2114
+ # Selector specifying which fields to include in a partial response.
2115
+ # @param [String] quota_user
2116
+ # Available to use for quota purposes for server-side applications. Can be any
2117
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
2118
+ # Overrides userIp if both are provided.
2119
+ # @param [String] user_ip
2120
+ # IP address of the site where the request originates. Use this if you want to
2121
+ # enforce per-user limits.
2122
+ # @param [Google::Apis::RequestOptions] options
2123
+ # Request-specific options
2124
+ #
2125
+ # @yield [result, err] Result & error if block supplied
2126
+ # @yieldparam result [Google::Apis::GamesV1::TurnBasedMatchList] parsed result object
2127
+ # @yieldparam err [StandardError] error object if request failed
2128
+ #
2129
+ # @return [Google::Apis::GamesV1::TurnBasedMatchList]
2130
+ #
2131
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
2132
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
2133
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
2134
+ def list_turn_based_matches(include_match_data: nil, language: nil, max_completed_matches: nil, max_results: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
2135
+ path = 'turnbasedmatches'
2136
+ command = make_simple_command(:get, path, options)
2137
+ command.response_representation = Google::Apis::GamesV1::TurnBasedMatchList::Representation
2138
+ command.response_class = Google::Apis::GamesV1::TurnBasedMatchList
2139
+ command.query['includeMatchData'] = include_match_data unless include_match_data.nil?
2140
+ command.query['language'] = language unless language.nil?
2141
+ command.query['maxCompletedMatches'] = max_completed_matches unless max_completed_matches.nil?
2142
+ command.query['maxResults'] = max_results unless max_results.nil?
2143
+ command.query['pageToken'] = page_token unless page_token.nil?
2144
+ command.query['fields'] = fields unless fields.nil?
2145
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
2146
+ command.query['userIp'] = user_ip unless user_ip.nil?
2147
+ execute_or_queue_command(command, &block)
2148
+ end
2149
+
2150
+ # Create a rematch of a match that was previously completed, with the same
2151
+ # participants. This can be called by only one player on a match still in their
2152
+ # list; the player must have called Finish first. Returns the newly created
2153
+ # match; it will be the caller's turn.
2154
+ # @param [String] match_id
2155
+ # The ID of the match.
2156
+ # @param [String] language
2157
+ # The preferred language to use for strings returned by this method.
2158
+ # @param [String] request_id
2159
+ # A randomly generated numeric ID for each request specified by the caller. This
2160
+ # number is used at the server to ensure that the request is handled correctly
2161
+ # across retries.
2162
+ # @param [String] fields
2163
+ # Selector specifying which fields to include in a partial response.
2164
+ # @param [String] quota_user
2165
+ # Available to use for quota purposes for server-side applications. Can be any
2166
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
2167
+ # Overrides userIp if both are provided.
2168
+ # @param [String] user_ip
2169
+ # IP address of the site where the request originates. Use this if you want to
2170
+ # enforce per-user limits.
2171
+ # @param [Google::Apis::RequestOptions] options
2172
+ # Request-specific options
2173
+ #
2174
+ # @yield [result, err] Result & error if block supplied
2175
+ # @yieldparam result [Google::Apis::GamesV1::TurnBasedMatchRematch] parsed result object
2176
+ # @yieldparam err [StandardError] error object if request failed
2177
+ #
2178
+ # @return [Google::Apis::GamesV1::TurnBasedMatchRematch]
2179
+ #
2180
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
2181
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
2182
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
2183
+ def rematch_turn_based_match(match_id, language: nil, request_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
2184
+ path = 'turnbasedmatches/{matchId}/rematch'
2185
+ command = make_simple_command(:post, path, options)
2186
+ command.response_representation = Google::Apis::GamesV1::TurnBasedMatchRematch::Representation
2187
+ command.response_class = Google::Apis::GamesV1::TurnBasedMatchRematch
2188
+ command.params['matchId'] = match_id unless match_id.nil?
2189
+ command.query['language'] = language unless language.nil?
2190
+ command.query['requestId'] = request_id unless request_id.nil?
2191
+ command.query['fields'] = fields unless fields.nil?
2192
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
2193
+ command.query['userIp'] = user_ip unless user_ip.nil?
2194
+ execute_or_queue_command(command, &block)
2195
+ end
2196
+
2197
+ # Returns turn-based matches the player is or was involved in that changed since
2198
+ # the last sync call, with the least recent changes coming first. Matches that
2199
+ # should be removed from the local cache will have a status of MATCH_DELETED.
2200
+ # @param [Boolean] include_match_data
2201
+ # True if match data should be returned in the response. Note that not all data
2202
+ # will necessarily be returned if include_match_data is true; the server may
2203
+ # decide to only return data for some of the matches to limit download size for
2204
+ # the client. The remainder of the data for these matches will be retrievable on
2205
+ # request.
2206
+ # @param [String] language
2207
+ # The preferred language to use for strings returned by this method.
2208
+ # @param [Fixnum] max_completed_matches
2209
+ # The maximum number of completed or canceled matches to return in the response.
2210
+ # If not set, all matches returned could be completed or canceled.
2211
+ # @param [Fixnum] max_results
2212
+ # The maximum number of matches to return in the response, used for paging. For
2213
+ # any response, the actual number of matches to return may be less than the
2214
+ # specified maxResults.
2215
+ # @param [String] page_token
2216
+ # The token returned by the previous request.
2217
+ # @param [String] fields
2218
+ # Selector specifying which fields to include in a partial response.
2219
+ # @param [String] quota_user
2220
+ # Available to use for quota purposes for server-side applications. Can be any
2221
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
2222
+ # Overrides userIp if both are provided.
2223
+ # @param [String] user_ip
2224
+ # IP address of the site where the request originates. Use this if you want to
2225
+ # enforce per-user limits.
2226
+ # @param [Google::Apis::RequestOptions] options
2227
+ # Request-specific options
2228
+ #
2229
+ # @yield [result, err] Result & error if block supplied
2230
+ # @yieldparam result [Google::Apis::GamesV1::TurnBasedMatchSync] parsed result object
2231
+ # @yieldparam err [StandardError] error object if request failed
2232
+ #
2233
+ # @return [Google::Apis::GamesV1::TurnBasedMatchSync]
2234
+ #
2235
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
2236
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
2237
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
2238
+ def sync_turn_based_match(include_match_data: nil, language: nil, max_completed_matches: nil, max_results: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
2239
+ path = 'turnbasedmatches/sync'
2240
+ command = make_simple_command(:get, path, options)
2241
+ command.response_representation = Google::Apis::GamesV1::TurnBasedMatchSync::Representation
2242
+ command.response_class = Google::Apis::GamesV1::TurnBasedMatchSync
2243
+ command.query['includeMatchData'] = include_match_data unless include_match_data.nil?
2244
+ command.query['language'] = language unless language.nil?
2245
+ command.query['maxCompletedMatches'] = max_completed_matches unless max_completed_matches.nil?
2246
+ command.query['maxResults'] = max_results unless max_results.nil?
2247
+ command.query['pageToken'] = page_token unless page_token.nil?
2248
+ command.query['fields'] = fields unless fields.nil?
2249
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
2250
+ command.query['userIp'] = user_ip unless user_ip.nil?
2251
+ execute_or_queue_command(command, &block)
2252
+ end
2253
+
2254
+ # Commit the results of a player turn.
2255
+ # @param [String] match_id
2256
+ # The ID of the match.
2257
+ # @param [Google::Apis::GamesV1::TurnBasedMatchTurn] turn_based_match_turn_object
2258
+ # @param [String] language
2259
+ # The preferred language to use for strings returned by this method.
2260
+ # @param [String] fields
2261
+ # Selector specifying which fields to include in a partial response.
2262
+ # @param [String] quota_user
2263
+ # Available to use for quota purposes for server-side applications. Can be any
2264
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
2265
+ # Overrides userIp if both are provided.
2266
+ # @param [String] user_ip
2267
+ # IP address of the site where the request originates. Use this if you want to
2268
+ # enforce per-user limits.
2269
+ # @param [Google::Apis::RequestOptions] options
2270
+ # Request-specific options
2271
+ #
2272
+ # @yield [result, err] Result & error if block supplied
2273
+ # @yieldparam result [Google::Apis::GamesV1::TurnBasedMatch] parsed result object
2274
+ # @yieldparam err [StandardError] error object if request failed
2275
+ #
2276
+ # @return [Google::Apis::GamesV1::TurnBasedMatch]
2277
+ #
2278
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
2279
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
2280
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
2281
+ def take_turn(match_id, turn_based_match_turn_object = nil, language: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
2282
+ path = 'turnbasedmatches/{matchId}/turn'
2283
+ command = make_simple_command(:put, path, options)
2284
+ command.request_representation = Google::Apis::GamesV1::TurnBasedMatchTurn::Representation
2285
+ command.request_object = turn_based_match_turn_object
2286
+ command.response_representation = Google::Apis::GamesV1::TurnBasedMatch::Representation
2287
+ command.response_class = Google::Apis::GamesV1::TurnBasedMatch
2288
+ command.params['matchId'] = match_id unless match_id.nil?
2289
+ command.query['language'] = language unless language.nil?
2290
+ command.query['fields'] = fields unless fields.nil?
2291
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
2292
+ command.query['userIp'] = user_ip unless user_ip.nil?
2293
+ execute_or_queue_command(command, &block)
2294
+ end
2295
+
2296
+ protected
2297
+
2298
+ def apply_command_defaults(command)
2299
+ command.query['key'] = key unless key.nil?
2300
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
2301
+ command.query['userIp'] = user_ip unless user_ip.nil?
2302
+ end
2303
+ end
2304
+ end
2305
+ end
2306
+ end