1<?php 2/* 3 * Copyright 2014 Google Inc. 4 * 5 * Licensed under the Apache License, Version 2.0 (the "License"); you may not 6 * use this file except in compliance with the License. You may obtain a copy of 7 * the License at 8 * 9 * http://www.apache.org/licenses/LICENSE-2.0 10 * 11 * Unless required by applicable law or agreed to in writing, software 12 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 13 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 14 * License for the specific language governing permissions and limitations under 15 * the License. 16 */ 17 18/** 19 * Service definition for Fitness (v1). 20 * 21 * <p> 22 * Stores and accesses user data in the fitness store from apps on any platform.</p> 23 * 24 * <p> 25 * For more information about this service, see the API 26 * <a href="https://developers.google.com/fit/rest/" target="_blank">Documentation</a> 27 * </p> 28 * 29 * @author Google, Inc. 30 */ 31class Google_Service_Fitness extends Google_Service 32{ 33 /** View your activity information in Google Fit. */ 34 const FITNESS_ACTIVITY_READ = 35 "https://www.googleapis.com/auth/fitness.activity.read"; 36 /** View and store your activity information in Google Fit. */ 37 const FITNESS_ACTIVITY_WRITE = 38 "https://www.googleapis.com/auth/fitness.activity.write"; 39 /** View blood glucose data in Google Fit. */ 40 const FITNESS_BLOOD_GLUCOSE_READ = 41 "https://www.googleapis.com/auth/fitness.blood_glucose.read"; 42 /** View and store blood glucose data in Google Fit. */ 43 const FITNESS_BLOOD_GLUCOSE_WRITE = 44 "https://www.googleapis.com/auth/fitness.blood_glucose.write"; 45 /** View blood pressure data in Google Fit. */ 46 const FITNESS_BLOOD_PRESSURE_READ = 47 "https://www.googleapis.com/auth/fitness.blood_pressure.read"; 48 /** View and store blood pressure data in Google Fit. */ 49 const FITNESS_BLOOD_PRESSURE_WRITE = 50 "https://www.googleapis.com/auth/fitness.blood_pressure.write"; 51 /** View body sensor information in Google Fit. */ 52 const FITNESS_BODY_READ = 53 "https://www.googleapis.com/auth/fitness.body.read"; 54 /** View and store body sensor data in Google Fit. */ 55 const FITNESS_BODY_WRITE = 56 "https://www.googleapis.com/auth/fitness.body.write"; 57 /** View body temperature data in Google Fit. */ 58 const FITNESS_BODY_TEMPERATURE_READ = 59 "https://www.googleapis.com/auth/fitness.body_temperature.read"; 60 /** View and store body temperature data in Google Fit. */ 61 const FITNESS_BODY_TEMPERATURE_WRITE = 62 "https://www.googleapis.com/auth/fitness.body_temperature.write"; 63 /** View your stored location data in Google Fit. */ 64 const FITNESS_LOCATION_READ = 65 "https://www.googleapis.com/auth/fitness.location.read"; 66 /** View and store your location data in Google Fit. */ 67 const FITNESS_LOCATION_WRITE = 68 "https://www.googleapis.com/auth/fitness.location.write"; 69 /** View nutrition information in Google Fit. */ 70 const FITNESS_NUTRITION_READ = 71 "https://www.googleapis.com/auth/fitness.nutrition.read"; 72 /** View and store nutrition information in Google Fit. */ 73 const FITNESS_NUTRITION_WRITE = 74 "https://www.googleapis.com/auth/fitness.nutrition.write"; 75 /** View oxygen saturation data in Google Fit. */ 76 const FITNESS_OXYGEN_SATURATION_READ = 77 "https://www.googleapis.com/auth/fitness.oxygen_saturation.read"; 78 /** View and store oxygen saturation data in Google Fit. */ 79 const FITNESS_OXYGEN_SATURATION_WRITE = 80 "https://www.googleapis.com/auth/fitness.oxygen_saturation.write"; 81 /** View reproductive health data in Google Fit. */ 82 const FITNESS_REPRODUCTIVE_HEALTH_READ = 83 "https://www.googleapis.com/auth/fitness.reproductive_health.read"; 84 /** View and store reproductive health data in Google Fit. */ 85 const FITNESS_REPRODUCTIVE_HEALTH_WRITE = 86 "https://www.googleapis.com/auth/fitness.reproductive_health.write"; 87 88 public $users_dataSources; 89 public $users_dataSources_dataPointChanges; 90 public $users_dataSources_datasets; 91 public $users_dataset; 92 public $users_sessions; 93 94 /** 95 * Constructs the internal representation of the Fitness service. 96 * 97 * @param Google_Client $client 98 */ 99 public function __construct(Google_Client $client) 100 { 101 parent::__construct($client); 102 $this->rootUrl = 'https://www.googleapis.com/'; 103 $this->servicePath = 'fitness/v1/users/'; 104 $this->batchPath = 'batch/fitness/v1'; 105 $this->version = 'v1'; 106 $this->serviceName = 'fitness'; 107 108 $this->users_dataSources = new Google_Service_Fitness_Resource_UsersDataSources( 109 $this, 110 $this->serviceName, 111 'dataSources', 112 array( 113 'methods' => array( 114 'create' => array( 115 'path' => '{userId}/dataSources', 116 'httpMethod' => 'POST', 117 'parameters' => array( 118 'userId' => array( 119 'location' => 'path', 120 'type' => 'string', 121 'required' => true, 122 ), 123 ), 124 ),'delete' => array( 125 'path' => '{userId}/dataSources/{dataSourceId}', 126 'httpMethod' => 'DELETE', 127 'parameters' => array( 128 'userId' => array( 129 'location' => 'path', 130 'type' => 'string', 131 'required' => true, 132 ), 133 'dataSourceId' => array( 134 'location' => 'path', 135 'type' => 'string', 136 'required' => true, 137 ), 138 ), 139 ),'get' => array( 140 'path' => '{userId}/dataSources/{dataSourceId}', 141 'httpMethod' => 'GET', 142 'parameters' => array( 143 'userId' => array( 144 'location' => 'path', 145 'type' => 'string', 146 'required' => true, 147 ), 148 'dataSourceId' => array( 149 'location' => 'path', 150 'type' => 'string', 151 'required' => true, 152 ), 153 ), 154 ),'list' => array( 155 'path' => '{userId}/dataSources', 156 'httpMethod' => 'GET', 157 'parameters' => array( 158 'userId' => array( 159 'location' => 'path', 160 'type' => 'string', 161 'required' => true, 162 ), 163 'dataTypeName' => array( 164 'location' => 'query', 165 'type' => 'string', 166 'repeated' => true, 167 ), 168 ), 169 ),'update' => array( 170 'path' => '{userId}/dataSources/{dataSourceId}', 171 'httpMethod' => 'PUT', 172 'parameters' => array( 173 'userId' => array( 174 'location' => 'path', 175 'type' => 'string', 176 'required' => true, 177 ), 178 'dataSourceId' => array( 179 'location' => 'path', 180 'type' => 'string', 181 'required' => true, 182 ), 183 ), 184 ), 185 ) 186 ) 187 ); 188 $this->users_dataSources_dataPointChanges = new Google_Service_Fitness_Resource_UsersDataSourcesDataPointChanges( 189 $this, 190 $this->serviceName, 191 'dataPointChanges', 192 array( 193 'methods' => array( 194 'list' => array( 195 'path' => '{userId}/dataSources/{dataSourceId}/dataPointChanges', 196 'httpMethod' => 'GET', 197 'parameters' => array( 198 'userId' => array( 199 'location' => 'path', 200 'type' => 'string', 201 'required' => true, 202 ), 203 'dataSourceId' => array( 204 'location' => 'path', 205 'type' => 'string', 206 'required' => true, 207 ), 208 'limit' => array( 209 'location' => 'query', 210 'type' => 'integer', 211 ), 212 'pageToken' => array( 213 'location' => 'query', 214 'type' => 'string', 215 ), 216 ), 217 ), 218 ) 219 ) 220 ); 221 $this->users_dataSources_datasets = new Google_Service_Fitness_Resource_UsersDataSourcesDatasets( 222 $this, 223 $this->serviceName, 224 'datasets', 225 array( 226 'methods' => array( 227 'delete' => array( 228 'path' => '{userId}/dataSources/{dataSourceId}/datasets/{datasetId}', 229 'httpMethod' => 'DELETE', 230 'parameters' => array( 231 'userId' => array( 232 'location' => 'path', 233 'type' => 'string', 234 'required' => true, 235 ), 236 'dataSourceId' => array( 237 'location' => 'path', 238 'type' => 'string', 239 'required' => true, 240 ), 241 'datasetId' => array( 242 'location' => 'path', 243 'type' => 'string', 244 'required' => true, 245 ), 246 'currentTimeMillis' => array( 247 'location' => 'query', 248 'type' => 'string', 249 ), 250 'modifiedTimeMillis' => array( 251 'location' => 'query', 252 'type' => 'string', 253 ), 254 ), 255 ),'get' => array( 256 'path' => '{userId}/dataSources/{dataSourceId}/datasets/{datasetId}', 257 'httpMethod' => 'GET', 258 'parameters' => array( 259 'userId' => array( 260 'location' => 'path', 261 'type' => 'string', 262 'required' => true, 263 ), 264 'dataSourceId' => array( 265 'location' => 'path', 266 'type' => 'string', 267 'required' => true, 268 ), 269 'datasetId' => array( 270 'location' => 'path', 271 'type' => 'string', 272 'required' => true, 273 ), 274 'limit' => array( 275 'location' => 'query', 276 'type' => 'integer', 277 ), 278 'pageToken' => array( 279 'location' => 'query', 280 'type' => 'string', 281 ), 282 ), 283 ),'patch' => array( 284 'path' => '{userId}/dataSources/{dataSourceId}/datasets/{datasetId}', 285 'httpMethod' => 'PATCH', 286 'parameters' => array( 287 'userId' => array( 288 'location' => 'path', 289 'type' => 'string', 290 'required' => true, 291 ), 292 'dataSourceId' => array( 293 'location' => 'path', 294 'type' => 'string', 295 'required' => true, 296 ), 297 'datasetId' => array( 298 'location' => 'path', 299 'type' => 'string', 300 'required' => true, 301 ), 302 'currentTimeMillis' => array( 303 'location' => 'query', 304 'type' => 'string', 305 ), 306 ), 307 ), 308 ) 309 ) 310 ); 311 $this->users_dataset = new Google_Service_Fitness_Resource_UsersDataset( 312 $this, 313 $this->serviceName, 314 'dataset', 315 array( 316 'methods' => array( 317 'aggregate' => array( 318 'path' => '{userId}/dataset:aggregate', 319 'httpMethod' => 'POST', 320 'parameters' => array( 321 'userId' => array( 322 'location' => 'path', 323 'type' => 'string', 324 'required' => true, 325 ), 326 ), 327 ), 328 ) 329 ) 330 ); 331 $this->users_sessions = new Google_Service_Fitness_Resource_UsersSessions( 332 $this, 333 $this->serviceName, 334 'sessions', 335 array( 336 'methods' => array( 337 'delete' => array( 338 'path' => '{userId}/sessions/{sessionId}', 339 'httpMethod' => 'DELETE', 340 'parameters' => array( 341 'userId' => array( 342 'location' => 'path', 343 'type' => 'string', 344 'required' => true, 345 ), 346 'sessionId' => array( 347 'location' => 'path', 348 'type' => 'string', 349 'required' => true, 350 ), 351 'currentTimeMillis' => array( 352 'location' => 'query', 353 'type' => 'string', 354 ), 355 ), 356 ),'list' => array( 357 'path' => '{userId}/sessions', 358 'httpMethod' => 'GET', 359 'parameters' => array( 360 'userId' => array( 361 'location' => 'path', 362 'type' => 'string', 363 'required' => true, 364 ), 365 'endTime' => array( 366 'location' => 'query', 367 'type' => 'string', 368 ), 369 'includeDeleted' => array( 370 'location' => 'query', 371 'type' => 'boolean', 372 ), 373 'pageToken' => array( 374 'location' => 'query', 375 'type' => 'string', 376 ), 377 'startTime' => array( 378 'location' => 'query', 379 'type' => 'string', 380 ), 381 ), 382 ),'update' => array( 383 'path' => '{userId}/sessions/{sessionId}', 384 'httpMethod' => 'PUT', 385 'parameters' => array( 386 'userId' => array( 387 'location' => 'path', 388 'type' => 'string', 389 'required' => true, 390 ), 391 'sessionId' => array( 392 'location' => 'path', 393 'type' => 'string', 394 'required' => true, 395 ), 396 'currentTimeMillis' => array( 397 'location' => 'query', 398 'type' => 'string', 399 ), 400 ), 401 ), 402 ) 403 ) 404 ); 405 } 406} 407