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.
- checksums.yaml +4 -4
- data/.gitignore +20 -0
- data/.rspec +2 -0
- data/.rubocop.yml +7 -0
- data/.rubocop_todo.yml +63 -0
- data/.travis.yml +21 -0
- data/.yardopts +12 -0
- data/CHANGELOG.md +6 -3
- data/CONTRIBUTING.md +31 -0
- data/Gemfile +28 -2
- data/MIGRATING.md +171 -0
- data/README.md +158 -150
- data/Rakefile +1 -40
- data/api_names.yaml +872 -0
- data/api_names_out.yaml +20843 -0
- data/bin/generate-api +93 -0
- data/generated/google/apis/adexchangebuyer_v1_3.rb +35 -0
- data/generated/google/apis/adexchangebuyer_v1_3/classes.rb +1124 -0
- data/generated/google/apis/adexchangebuyer_v1_3/representations.rb +375 -0
- data/generated/google/apis/adexchangebuyer_v1_3/service.rb +893 -0
- data/generated/google/apis/adexchangeseller_v2_0.rb +38 -0
- data/generated/google/apis/adexchangeseller_v2_0/classes.rb +792 -0
- data/generated/google/apis/adexchangeseller_v2_0/representations.rb +309 -0
- data/generated/google/apis/adexchangeseller_v2_0/service.rb +682 -0
- data/generated/google/apis/admin_directory_v1.rb +89 -0
- data/generated/google/apis/admin_directory_v1/classes.rb +2389 -0
- data/generated/google/apis/admin_directory_v1/representations.rb +780 -0
- data/generated/google/apis/admin_directory_v1/service.rb +2805 -0
- data/generated/google/apis/admin_reports_v1.rb +38 -0
- data/generated/google/apis/admin_reports_v1/classes.rb +582 -0
- data/generated/google/apis/admin_reports_v1/representations.rb +231 -0
- data/generated/google/apis/admin_reports_v1/service.rb +341 -0
- data/generated/google/apis/adsense_v1_4.rb +38 -0
- data/generated/google/apis/adsense_v1_4/classes.rb +1279 -0
- data/generated/google/apis/adsense_v1_4/representations.rb +493 -0
- data/generated/google/apis/adsense_v1_4/service.rb +1752 -0
- data/generated/google/apis/adsensehost_v4_1.rb +35 -0
- data/generated/google/apis/adsensehost_v4_1/classes.rb +834 -0
- data/generated/google/apis/adsensehost_v4_1/representations.rb +327 -0
- data/generated/google/apis/adsensehost_v4_1/service.rb +1190 -0
- data/generated/google/apis/analytics_v3.rb +49 -0
- data/generated/google/apis/analytics_v3/classes.rb +5113 -0
- data/generated/google/apis/analytics_v3/representations.rb +1661 -0
- data/generated/google/apis/analytics_v3/service.rb +3600 -0
- data/generated/google/apis/androidenterprise_v1.rb +34 -0
- data/generated/google/apis/androidenterprise_v1/classes.rb +1162 -0
- data/generated/google/apis/androidenterprise_v1/representations.rb +431 -0
- data/generated/google/apis/androidenterprise_v1/service.rb +1979 -0
- data/generated/google/apis/androidpublisher_v2.rb +34 -0
- data/generated/google/apis/androidpublisher_v2/classes.rb +1374 -0
- data/generated/google/apis/androidpublisher_v2/representations.rb +630 -0
- data/generated/google/apis/androidpublisher_v2/service.rb +2390 -0
- data/generated/google/apis/appsactivity_v1.rb +46 -0
- data/generated/google/apis/appsactivity_v1/classes.rb +392 -0
- data/generated/google/apis/appsactivity_v1/representations.rb +184 -0
- data/generated/google/apis/appsactivity_v1/service.rb +129 -0
- data/generated/google/apis/appstate_v1.rb +34 -0
- data/generated/google/apis/appstate_v1/classes.rb +154 -0
- data/generated/google/apis/appstate_v1/representations.rb +79 -0
- data/generated/google/apis/appstate_v1/service.rb +265 -0
- data/generated/google/apis/autoscaler_v1beta2.rb +38 -0
- data/generated/google/apis/autoscaler_v1beta2/classes.rb +747 -0
- data/generated/google/apis/autoscaler_v1beta2/representations.rb +281 -0
- data/generated/google/apis/autoscaler_v1beta2/service.rb +488 -0
- data/generated/google/apis/bigquery_v2.rb +49 -0
- data/generated/google/apis/bigquery_v2/classes.rb +2255 -0
- data/generated/google/apis/bigquery_v2/representations.rb +754 -0
- data/generated/google/apis/bigquery_v2/service.rb +1003 -0
- data/generated/google/apis/blogger_v3.rb +37 -0
- data/generated/google/apis/blogger_v3/classes.rb +1354 -0
- data/generated/google/apis/blogger_v3/representations.rb +562 -0
- data/generated/google/apis/blogger_v3/service.rb +1620 -0
- data/generated/google/apis/books_v1.rb +34 -0
- data/generated/google/apis/books_v1/classes.rb +3515 -0
- data/generated/google/apis/books_v1/representations.rb +1361 -0
- data/generated/google/apis/books_v1/service.rb +2170 -0
- data/generated/google/apis/calendar_v3.rb +37 -0
- data/generated/google/apis/calendar_v3/classes.rb +1702 -0
- data/generated/google/apis/calendar_v3/representations.rb +566 -0
- data/generated/google/apis/calendar_v3/service.rb +1943 -0
- data/generated/google/apis/civicinfo_v2.rb +31 -0
- data/generated/google/apis/civicinfo_v2/classes.rb +1057 -0
- data/generated/google/apis/civicinfo_v2/representations.rb +374 -0
- data/generated/google/apis/civicinfo_v2/service.rb +284 -0
- data/generated/google/apis/cloudmonitoring_v2beta2.rb +34 -0
- data/generated/google/apis/cloudmonitoring_v2beta2/classes.rb +679 -0
- data/generated/google/apis/cloudmonitoring_v2beta2/representations.rb +311 -0
- data/generated/google/apis/cloudmonitoring_v2beta2/service.rb +458 -0
- data/generated/google/apis/cloudresourcemanager_v1beta1.rb +38 -0
- data/generated/google/apis/cloudresourcemanager_v1beta1/classes.rb +139 -0
- data/generated/google/apis/cloudresourcemanager_v1beta1/representations.rb +65 -0
- data/generated/google/apis/cloudresourcemanager_v1beta1/service.rb +301 -0
- data/generated/google/apis/compute_v1.rb +49 -0
- data/generated/google/apis/compute_v1/classes.rb +6391 -0
- data/generated/google/apis/compute_v1/representations.rb +2209 -0
- data/generated/google/apis/compute_v1/service.rb +6352 -0
- data/generated/google/apis/container_v1beta1.rb +35 -0
- data/generated/google/apis/container_v1beta1/classes.rb +466 -0
- data/generated/google/apis/container_v1beta1/representations.rb +177 -0
- data/generated/google/apis/container_v1beta1/service.rb +394 -0
- data/generated/google/apis/content_v2.rb +35 -0
- data/generated/google/apis/content_v2/classes.rb +3780 -0
- data/generated/google/apis/content_v2/representations.rb +1456 -0
- data/generated/google/apis/content_v2/service.rb +1706 -0
- data/generated/google/apis/coordinate_v1.rb +37 -0
- data/generated/google/apis/coordinate_v1/classes.rb +669 -0
- data/generated/google/apis/coordinate_v1/representations.rb +285 -0
- data/generated/google/apis/coordinate_v1/service.rb +687 -0
- data/{lib/google/api_client/auth/compute_service_account.rb → generated/google/apis/customsearch_v1.rb} +13 -10
- data/generated/google/apis/customsearch_v1/classes.rb +771 -0
- data/generated/google/apis/customsearch_v1/representations.rb +276 -0
- data/generated/google/apis/customsearch_v1/service.rb +208 -0
- data/generated/google/apis/datastore_v1beta2.rb +40 -0
- data/generated/google/apis/datastore_v1beta2/classes.rb +1186 -0
- data/generated/google/apis/datastore_v1beta2/representations.rb +526 -0
- data/generated/google/apis/datastore_v1beta2/service.rb +300 -0
- data/generated/google/apis/deploymentmanager_v2beta2.rb +41 -0
- data/generated/google/apis/deploymentmanager_v2beta2/classes.rb +820 -0
- data/generated/google/apis/deploymentmanager_v2beta2/representations.rb +303 -0
- data/generated/google/apis/deploymentmanager_v2beta2/service.rb +647 -0
- data/generated/google/apis/dfareporting_v2_1.rb +37 -0
- data/generated/google/apis/dfareporting_v2_1/classes.rb +10755 -0
- data/generated/google/apis/dfareporting_v2_1/representations.rb +3438 -0
- data/generated/google/apis/dfareporting_v2_1/service.rb +8775 -0
- data/generated/google/apis/discovery_v1.rb +32 -0
- data/generated/google/apis/discovery_v1/classes.rb +947 -0
- data/generated/google/apis/discovery_v1/representations.rb +355 -0
- data/generated/google/apis/discovery_v1/service.rb +144 -0
- data/generated/google/apis/dns_v1.rb +41 -0
- data/generated/google/apis/dns_v1/classes.rb +406 -0
- data/generated/google/apis/dns_v1/representations.rb +151 -0
- data/generated/google/apis/dns_v1/service.rb +460 -0
- data/{spec/google/api_client/request_spec.rb → generated/google/apis/doubleclickbidmanager_v1.rb} +15 -13
- data/generated/google/apis/doubleclickbidmanager_v1/classes.rb +709 -0
- data/generated/google/apis/doubleclickbidmanager_v1/representations.rb +297 -0
- data/generated/google/apis/doubleclickbidmanager_v1/service.rb +349 -0
- data/generated/google/apis/doubleclicksearch_v2.rb +35 -0
- data/generated/google/apis/doubleclicksearch_v2/classes.rb +947 -0
- data/generated/google/apis/doubleclicksearch_v2/representations.rb +315 -0
- data/generated/google/apis/doubleclicksearch_v2/service.rb +490 -0
- data/generated/google/apis/drive_v2.rb +55 -0
- data/generated/google/apis/drive_v2/classes.rb +2519 -0
- data/generated/google/apis/drive_v2/representations.rb +781 -0
- data/generated/google/apis/drive_v2/service.rb +2685 -0
- data/generated/google/apis/fitness_v1.rb +49 -0
- data/generated/google/apis/fitness_v1/classes.rb +809 -0
- data/generated/google/apis/fitness_v1/representations.rb +295 -0
- data/generated/google/apis/fitness_v1/service.rb +684 -0
- data/generated/google/apis/fusiontables_v2.rb +37 -0
- data/generated/google/apis/fusiontables_v2/classes.rb +1048 -0
- data/generated/google/apis/fusiontables_v2/representations.rb +409 -0
- data/generated/google/apis/fusiontables_v2/service.rb +1496 -0
- data/generated/google/apis/games_configuration_v1configuration.rb +34 -0
- data/generated/google/apis/games_configuration_v1configuration/classes.rb +506 -0
- data/generated/google/apis/games_configuration_v1configuration/representations.rb +206 -0
- data/generated/google/apis/games_configuration_v1configuration/service.rb +578 -0
- data/generated/google/apis/games_v1.rb +40 -0
- data/generated/google/apis/games_v1/classes.rb +4578 -0
- data/generated/google/apis/games_v1/representations.rb +1570 -0
- data/generated/google/apis/games_v1/service.rb +2306 -0
- data/generated/google/apis/gan_v1beta1.rb +31 -0
- data/generated/google/apis/gan_v1beta1/classes.rb +1428 -0
- data/generated/google/apis/gan_v1beta1/representations.rb +428 -0
- data/generated/google/apis/gan_v1beta1/service.rb +692 -0
- data/generated/google/apis/genomics_v1beta2.rb +46 -0
- data/generated/google/apis/genomics_v1beta2/classes.rb +3288 -0
- data/generated/google/apis/genomics_v1beta2/representations.rb +1194 -0
- data/generated/google/apis/genomics_v1beta2/service.rb +2356 -0
- data/generated/google/apis/gmail_v1.rb +49 -0
- data/generated/google/apis/gmail_v1/classes.rb +794 -0
- data/generated/google/apis/gmail_v1/representations.rb +339 -0
- data/generated/google/apis/gmail_v1/service.rb +1502 -0
- data/generated/google/apis/groupsmigration_v1.rb +34 -0
- data/generated/google/apis/groupsmigration_v1/classes.rb +51 -0
- data/generated/google/apis/groupsmigration_v1/representations.rb +38 -0
- data/generated/google/apis/groupsmigration_v1/service.rb +111 -0
- data/generated/google/apis/groupssettings_v1.rb +34 -0
- data/generated/google/apis/groupssettings_v1/classes.rb +221 -0
- data/generated/google/apis/groupssettings_v1/representations.rb +64 -0
- data/generated/google/apis/groupssettings_v1/service.rb +179 -0
- data/generated/google/apis/identitytoolkit_v3.rb +31 -0
- data/generated/google/apis/identitytoolkit_v3/classes.rb +1229 -0
- data/generated/google/apis/identitytoolkit_v3/representations.rb +422 -0
- data/generated/google/apis/identitytoolkit_v3/service.rb +491 -0
- data/generated/google/apis/licensing_v1.rb +34 -0
- data/generated/google/apis/licensing_v1/classes.rb +132 -0
- data/generated/google/apis/licensing_v1/representations.rb +68 -0
- data/generated/google/apis/licensing_v1/service.rb +376 -0
- data/generated/google/apis/logging_v1beta3.rb +35 -0
- data/generated/google/apis/logging_v1beta3/classes.rb +505 -0
- data/generated/google/apis/logging_v1beta3/representations.rb +222 -0
- data/generated/google/apis/logging_v1beta3/service.rb +670 -0
- data/generated/google/apis/manager_v1beta2.rb +50 -0
- data/generated/google/apis/manager_v1beta2/classes.rb +1287 -0
- data/generated/google/apis/manager_v1beta2/representations.rb +536 -0
- data/generated/google/apis/manager_v1beta2/service.rb +380 -0
- data/generated/google/apis/mapsengine_v1.rb +38 -0
- data/generated/google/apis/mapsengine_v1/classes.rb +2873 -0
- data/generated/google/apis/mapsengine_v1/representations.rb +1235 -0
- data/generated/google/apis/mapsengine_v1/service.rb +3465 -0
- data/generated/google/apis/mirror_v1.rb +37 -0
- data/generated/google/apis/mirror_v1/classes.rb +1072 -0
- data/generated/google/apis/mirror_v1/representations.rb +350 -0
- data/generated/google/apis/mirror_v1/service.rb +1001 -0
- data/generated/google/apis/oauth2_v2.rb +43 -0
- data/generated/google/apis/oauth2_v2/classes.rb +245 -0
- data/generated/google/apis/oauth2_v2/representations.rb +94 -0
- data/generated/google/apis/oauth2_v2/service.rb +203 -0
- data/generated/google/apis/pagespeedonline_v2.rb +32 -0
- data/generated/google/apis/pagespeedonline_v2/classes.rb +614 -0
- data/generated/google/apis/pagespeedonline_v2/representations.rb +244 -0
- data/generated/google/apis/pagespeedonline_v2/service.rb +120 -0
- data/generated/google/apis/plus_domains_v1.rb +61 -0
- data/generated/google/apis/plus_domains_v1/classes.rb +2402 -0
- data/generated/google/apis/plus_domains_v1/representations.rb +873 -0
- data/generated/google/apis/plus_domains_v1/service.rb +924 -0
- data/generated/google/apis/plus_v1.rb +43 -0
- data/generated/google/apis/plus_v1/classes.rb +2384 -0
- data/generated/google/apis/plus_v1/representations.rb +812 -0
- data/generated/google/apis/plus_v1/service.rb +616 -0
- data/generated/google/apis/prediction_v1_6.rb +44 -0
- data/generated/google/apis/prediction_v1_6/classes.rb +751 -0
- data/generated/google/apis/prediction_v1_6/representations.rb +327 -0
- data/generated/google/apis/prediction_v1_6/service.rb +388 -0
- data/generated/google/apis/pubsub_v1beta2.rb +37 -0
- data/generated/google/apis/pubsub_v1beta2/classes.rb +824 -0
- data/generated/google/apis/pubsub_v1beta2/representations.rb +366 -0
- data/generated/google/apis/pubsub_v1beta2/service.rb +778 -0
- data/generated/google/apis/qpx_express_v1.rb +31 -0
- data/generated/google/apis/qpx_express_v1/classes.rb +1268 -0
- data/generated/google/apis/qpx_express_v1/representations.rb +424 -0
- data/generated/google/apis/qpx_express_v1/service.rb +101 -0
- data/generated/google/apis/replicapool_v1beta2.rb +41 -0
- data/generated/google/apis/replicapool_v1beta2/classes.rb +621 -0
- data/generated/google/apis/replicapool_v1beta2/representations.rb +235 -0
- data/generated/google/apis/replicapool_v1beta2/service.rb +620 -0
- data/generated/google/apis/replicapoolupdater_v1beta1.rb +41 -0
- data/generated/google/apis/replicapoolupdater_v1beta1/classes.rb +682 -0
- data/generated/google/apis/replicapoolupdater_v1beta1/representations.rb +247 -0
- data/generated/google/apis/replicapoolupdater_v1beta1/service.rb +472 -0
- data/generated/google/apis/reseller_v1.rb +37 -0
- data/generated/google/apis/reseller_v1/classes.rb +502 -0
- data/generated/google/apis/reseller_v1/representations.rb +199 -0
- data/generated/google/apis/reseller_v1/service.rb +637 -0
- data/generated/google/apis/resourceviews_v1beta2.rb +47 -0
- data/generated/google/apis/resourceviews_v1beta2/classes.rb +660 -0
- data/generated/google/apis/resourceviews_v1beta2/representations.rb +269 -0
- data/generated/google/apis/resourceviews_v1beta2/service.rb +574 -0
- data/generated/google/apis/site_verification_v1.rb +37 -0
- data/generated/google/apis/site_verification_v1/classes.rb +185 -0
- data/generated/google/apis/site_verification_v1/representations.rb +101 -0
- data/generated/google/apis/site_verification_v1/service.rb +322 -0
- data/generated/google/apis/sqladmin_v1beta4.rb +37 -0
- data/generated/google/apis/sqladmin_v1beta4/classes.rb +1817 -0
- data/generated/google/apis/sqladmin_v1beta4/representations.rb +688 -0
- data/generated/google/apis/sqladmin_v1beta4/service.rb +1534 -0
- data/generated/google/apis/storage_v1.rb +43 -0
- data/generated/google/apis/storage_v1/classes.rb +1177 -0
- data/generated/google/apis/storage_v1/representations.rb +427 -0
- data/generated/google/apis/storage_v1/service.rb +1920 -0
- data/generated/google/apis/tagmanager_v1.rb +52 -0
- data/generated/google/apis/tagmanager_v1/classes.rb +1226 -0
- data/generated/google/apis/tagmanager_v1/representations.rb +461 -0
- data/generated/google/apis/tagmanager_v1/service.rb +1978 -0
- data/generated/google/apis/taskqueue_v1beta2.rb +37 -0
- data/generated/google/apis/taskqueue_v1beta2/classes.rb +254 -0
- data/generated/google/apis/taskqueue_v1beta2/representations.rb +114 -0
- data/generated/google/apis/taskqueue_v1beta2/service.rb +416 -0
- data/generated/google/apis/tasks_v1.rb +37 -0
- data/generated/google/apis/tasks_v1/classes.rb +296 -0
- data/generated/google/apis/tasks_v1/representations.rb +115 -0
- data/generated/google/apis/tasks_v1/service.rb +657 -0
- data/generated/google/apis/translate_v2.rb +31 -0
- data/generated/google/apis/translate_v2/classes.rb +168 -0
- data/generated/google/apis/translate_v2/representations.rb +109 -0
- data/generated/google/apis/translate_v2/service.rb +185 -0
- data/generated/google/apis/urlshortener_v1.rb +34 -0
- data/generated/google/apis/urlshortener_v1/classes.rb +246 -0
- data/generated/google/apis/urlshortener_v1/representations.rb +111 -0
- data/generated/google/apis/urlshortener_v1/service.rb +179 -0
- data/generated/google/apis/webmasters_v3.rb +37 -0
- data/generated/google/apis/webmasters_v3/classes.rb +563 -0
- data/generated/google/apis/webmasters_v3/representations.rb +250 -0
- data/generated/google/apis/webmasters_v3/service.rb +587 -0
- data/generated/google/apis/youtube_analytics_v1.rb +46 -0
- data/generated/google/apis/youtube_analytics_v1/classes.rb +540 -0
- data/generated/google/apis/youtube_analytics_v1/representations.rb +242 -0
- data/generated/google/apis/youtube_analytics_v1/service.rb +567 -0
- data/generated/google/apis/youtube_v3.rb +49 -0
- data/generated/google/apis/youtube_v3/classes.rb +7225 -0
- data/generated/google/apis/youtube_v3/representations.rb +2529 -0
- data/generated/google/apis/youtube_v3/service.rb +4051 -0
- data/google-api-client.gemspec +27 -39
- data/lib/google/api_client/auth/storage.rb +3 -2
- data/lib/google/api_client/auth/storages/file_store.rb +1 -3
- data/lib/google/api_client/auth/storages/redis_store.rb +6 -2
- data/lib/google/apis.rb +48 -0
- data/lib/google/apis/core/api_command.rb +128 -0
- data/lib/google/apis/core/base_service.rb +314 -0
- data/lib/google/apis/core/batch.rb +222 -0
- data/lib/google/apis/core/download.rb +94 -0
- data/lib/google/apis/core/hashable.rb +44 -0
- data/lib/google/apis/core/http_command.rb +275 -0
- data/lib/google/apis/core/json_representation.rb +122 -0
- data/lib/google/{api_client/version.rb → apis/core/logging.rb} +12 -8
- data/lib/google/apis/core/multipart.rb +173 -0
- data/lib/google/apis/core/upload.rb +275 -0
- data/lib/google/{api_client → apis}/errors.rb +32 -28
- data/lib/google/apis/generator.rb +70 -0
- data/lib/google/apis/generator/annotator.rb +271 -0
- data/lib/google/apis/generator/helpers.rb +74 -0
- data/lib/google/apis/generator/model.rb +130 -0
- data/lib/google/apis/generator/template.rb +124 -0
- data/lib/google/apis/generator/templates/_class.tmpl +40 -0
- data/lib/google/apis/generator/templates/_method.tmpl +90 -0
- data/lib/google/apis/generator/templates/_representation.tmpl +51 -0
- data/lib/google/apis/generator/templates/_representation_stub.tmpl +15 -0
- data/lib/google/apis/generator/templates/_representation_type.tmpl +10 -0
- data/lib/google/{api_client/reference.rb → apis/generator/templates/classes.rb.tmpl} +11 -9
- data/lib/google/apis/generator/templates/module.rb.tmpl +40 -0
- data/lib/google/apis/generator/templates/representations.rb.tmpl +32 -0
- data/lib/google/apis/generator/templates/service.rb.tmpl +60 -0
- data/lib/google/apis/options.rb +79 -0
- data/lib/google/apis/version.rb +39 -0
- data/rakelib/metrics.rake +22 -0
- data/rakelib/rubocop.rake +10 -0
- data/rakelib/spec.rake +11 -0
- data/rakelib/yard.rake +11 -0
- data/samples/calendar/calendar.rb +43 -0
- data/samples/drive/drive.rb +40 -0
- data/samples/pubsub/pubsub.rb +52 -0
- data/{lib/google/api_client/discovery.rb → samples/translate/translate.rb} +14 -5
- data/script/generate +79 -0
- data/script/package +8 -0
- data/script/release +15 -0
- data/spec/fixtures/files/api_names.yaml +3 -0
- data/spec/fixtures/files/auth_stored_credentials.json +8 -0
- data/spec/fixtures/files/client_secrets.json +1 -0
- data/spec/fixtures/files/test.blah +1 -0
- data/spec/fixtures/files/test.txt +1 -0
- data/spec/fixtures/files/test_api.json +440 -0
- data/spec/google/api_client/auth/storage_spec.rb +1 -3
- data/spec/google/api_client/auth/storages/file_store_spec.rb +1 -2
- data/spec/google/api_client/auth/storages/redis_store_spec.rb +1 -3
- data/spec/google/apis/core/api_command_spec.rb +170 -0
- data/spec/google/apis/core/batch_spec.rb +128 -0
- data/spec/google/apis/core/download_spec.rb +90 -0
- data/spec/google/apis/core/hashable_spec.rb +60 -0
- data/spec/google/apis/core/http_command_spec.rb +238 -0
- data/spec/google/apis/core/json_representation_spec.rb +192 -0
- data/spec/google/apis/core/service_spec.rb +247 -0
- data/spec/google/apis/core/upload_spec.rb +238 -0
- data/{lib/google/api_client/service_account.rb → spec/google/apis/generated_spec.rb} +14 -8
- data/spec/google/apis/generator/generator_spec.rb +272 -0
- data/spec/google/apis/logging_spec.rb +45 -0
- data/spec/google/apis/options_spec.rb +40 -0
- data/spec/integration_tests/drive_spec.rb +35 -0
- data/spec/integration_tests/pubsub_spec.rb +48 -0
- data/spec/integration_tests/url_shortener_spec.rb +31 -0
- data/spec/spec_helper.rb +102 -46
- metadata +433 -178
- data/lib/compat/multi_json.rb +0 -19
- data/lib/google/api_client.rb +0 -750
- data/lib/google/api_client/auth/file_storage.rb +0 -59
- data/lib/google/api_client/auth/jwt_asserter.rb +0 -126
- data/lib/google/api_client/auth/key_utils.rb +0 -93
- data/lib/google/api_client/auth/pkcs12.rb +0 -41
- data/lib/google/api_client/batch.rb +0 -326
- data/lib/google/api_client/charset.rb +0 -33
- data/lib/google/api_client/discovery/api.rb +0 -310
- data/lib/google/api_client/discovery/media.rb +0 -77
- data/lib/google/api_client/discovery/method.rb +0 -363
- data/lib/google/api_client/discovery/resource.rb +0 -156
- data/lib/google/api_client/discovery/schema.rb +0 -117
- data/lib/google/api_client/environment.rb +0 -42
- data/lib/google/api_client/gzip.rb +0 -28
- data/lib/google/api_client/logging.rb +0 -32
- data/lib/google/api_client/media.rb +0 -259
- data/lib/google/api_client/railtie.rb +0 -18
- data/lib/google/api_client/request.rb +0 -350
- data/lib/google/api_client/result.rb +0 -255
- data/lib/google/api_client/service.rb +0 -233
- data/lib/google/api_client/service/batch.rb +0 -110
- data/lib/google/api_client/service/request.rb +0 -144
- data/lib/google/api_client/service/resource.rb +0 -40
- data/lib/google/api_client/service/result.rb +0 -162
- data/lib/google/api_client/service/simple_file_store.rb +0 -151
- data/lib/google/api_client/service/stub_generator.rb +0 -61
- data/spec/google/api_client/batch_spec.rb +0 -248
- data/spec/google/api_client/discovery_spec.rb +0 -708
- data/spec/google/api_client/gzip_spec.rb +0 -98
- data/spec/google/api_client/media_spec.rb +0 -178
- data/spec/google/api_client/result_spec.rb +0 -207
- data/spec/google/api_client/service_account_spec.rb +0 -169
- data/spec/google/api_client/service_spec.rb +0 -618
- data/spec/google/api_client/simple_file_store_spec.rb +0 -133
- data/spec/google/api_client_spec.rb +0 -352
@@ -0,0 +1,295 @@
|
|
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 'date'
|
16
|
+
require 'google/apis/core/base_service'
|
17
|
+
require 'google/apis/core/json_representation'
|
18
|
+
require 'google/apis/core/hashable'
|
19
|
+
require 'google/apis/errors'
|
20
|
+
|
21
|
+
module Google
|
22
|
+
module Apis
|
23
|
+
module FitnessV1
|
24
|
+
|
25
|
+
class AggregateBucket
|
26
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
27
|
+
end
|
28
|
+
|
29
|
+
class AggregateBy
|
30
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
31
|
+
end
|
32
|
+
|
33
|
+
class AggregateRequest
|
34
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
35
|
+
end
|
36
|
+
|
37
|
+
class AggregateResponse
|
38
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
39
|
+
end
|
40
|
+
|
41
|
+
class Application
|
42
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
43
|
+
end
|
44
|
+
|
45
|
+
class BucketByActivity
|
46
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
47
|
+
end
|
48
|
+
|
49
|
+
class BucketBySession
|
50
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
51
|
+
end
|
52
|
+
|
53
|
+
class BucketByTime
|
54
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
55
|
+
end
|
56
|
+
|
57
|
+
class DataPoint
|
58
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
59
|
+
end
|
60
|
+
|
61
|
+
class DataSource
|
62
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
63
|
+
end
|
64
|
+
|
65
|
+
class DataType
|
66
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
67
|
+
end
|
68
|
+
|
69
|
+
class DataTypeField
|
70
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
71
|
+
end
|
72
|
+
|
73
|
+
class Dataset
|
74
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
75
|
+
end
|
76
|
+
|
77
|
+
class Device
|
78
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
79
|
+
end
|
80
|
+
|
81
|
+
class ListDataSourcesResponse
|
82
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
83
|
+
end
|
84
|
+
|
85
|
+
class ListSessionsResponse
|
86
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
87
|
+
end
|
88
|
+
|
89
|
+
class Session
|
90
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
91
|
+
end
|
92
|
+
|
93
|
+
class Value
|
94
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
95
|
+
end
|
96
|
+
|
97
|
+
class AggregateBucket
|
98
|
+
# @private
|
99
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
100
|
+
property :activity, as: 'activity'
|
101
|
+
collection :dataset, as: 'dataset', class: Google::Apis::FitnessV1::Dataset, decorator: Google::Apis::FitnessV1::Dataset::Representation
|
102
|
+
|
103
|
+
property :end_time_millis, as: 'endTimeMillis'
|
104
|
+
property :session, as: 'session', class: Google::Apis::FitnessV1::Session, decorator: Google::Apis::FitnessV1::Session::Representation
|
105
|
+
|
106
|
+
property :start_time_millis, as: 'startTimeMillis'
|
107
|
+
property :type, as: 'type'
|
108
|
+
end
|
109
|
+
end
|
110
|
+
|
111
|
+
class AggregateBy
|
112
|
+
# @private
|
113
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
114
|
+
property :data_source_id, as: 'dataSourceId'
|
115
|
+
property :data_type_name, as: 'dataTypeName'
|
116
|
+
property :output_data_source_id, as: 'outputDataSourceId'
|
117
|
+
property :output_data_type_name, as: 'outputDataTypeName'
|
118
|
+
end
|
119
|
+
end
|
120
|
+
|
121
|
+
class AggregateRequest
|
122
|
+
# @private
|
123
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
124
|
+
collection :aggregate_by, as: 'aggregateBy', class: Google::Apis::FitnessV1::AggregateBy, decorator: Google::Apis::FitnessV1::AggregateBy::Representation
|
125
|
+
|
126
|
+
property :bucket_by_activity_segment, as: 'bucketByActivitySegment', class: Google::Apis::FitnessV1::BucketByActivity, decorator: Google::Apis::FitnessV1::BucketByActivity::Representation
|
127
|
+
|
128
|
+
property :bucket_by_activity_type, as: 'bucketByActivityType', class: Google::Apis::FitnessV1::BucketByActivity, decorator: Google::Apis::FitnessV1::BucketByActivity::Representation
|
129
|
+
|
130
|
+
property :bucket_by_session, as: 'bucketBySession', class: Google::Apis::FitnessV1::BucketBySession, decorator: Google::Apis::FitnessV1::BucketBySession::Representation
|
131
|
+
|
132
|
+
property :bucket_by_time, as: 'bucketByTime', class: Google::Apis::FitnessV1::BucketByTime, decorator: Google::Apis::FitnessV1::BucketByTime::Representation
|
133
|
+
|
134
|
+
property :end_time_millis, as: 'endTimeMillis'
|
135
|
+
property :start_time_millis, as: 'startTimeMillis'
|
136
|
+
end
|
137
|
+
end
|
138
|
+
|
139
|
+
class AggregateResponse
|
140
|
+
# @private
|
141
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
142
|
+
collection :bucket, as: 'bucket', class: Google::Apis::FitnessV1::AggregateBucket, decorator: Google::Apis::FitnessV1::AggregateBucket::Representation
|
143
|
+
|
144
|
+
end
|
145
|
+
end
|
146
|
+
|
147
|
+
class Application
|
148
|
+
# @private
|
149
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
150
|
+
property :details_url, as: 'detailsUrl'
|
151
|
+
property :name, as: 'name'
|
152
|
+
property :package_name, as: 'packageName'
|
153
|
+
property :version, as: 'version'
|
154
|
+
end
|
155
|
+
end
|
156
|
+
|
157
|
+
class BucketByActivity
|
158
|
+
# @private
|
159
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
160
|
+
property :activity_data_source_id, as: 'activityDataSourceId'
|
161
|
+
property :min_duration_millis, as: 'minDurationMillis'
|
162
|
+
end
|
163
|
+
end
|
164
|
+
|
165
|
+
class BucketBySession
|
166
|
+
# @private
|
167
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
168
|
+
property :min_duration_millis, as: 'minDurationMillis'
|
169
|
+
end
|
170
|
+
end
|
171
|
+
|
172
|
+
class BucketByTime
|
173
|
+
# @private
|
174
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
175
|
+
property :duration_millis, as: 'durationMillis'
|
176
|
+
end
|
177
|
+
end
|
178
|
+
|
179
|
+
class DataPoint
|
180
|
+
# @private
|
181
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
182
|
+
property :computation_time_millis, as: 'computationTimeMillis'
|
183
|
+
property :data_type_name, as: 'dataTypeName'
|
184
|
+
property :end_time_nanos, as: 'endTimeNanos'
|
185
|
+
property :modified_time_millis, as: 'modifiedTimeMillis'
|
186
|
+
property :origin_data_source_id, as: 'originDataSourceId'
|
187
|
+
property :raw_timestamp_nanos, as: 'rawTimestampNanos'
|
188
|
+
property :start_time_nanos, as: 'startTimeNanos'
|
189
|
+
collection :value, as: 'value', class: Google::Apis::FitnessV1::Value, decorator: Google::Apis::FitnessV1::Value::Representation
|
190
|
+
|
191
|
+
end
|
192
|
+
end
|
193
|
+
|
194
|
+
class DataSource
|
195
|
+
# @private
|
196
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
197
|
+
property :application, as: 'application', class: Google::Apis::FitnessV1::Application, decorator: Google::Apis::FitnessV1::Application::Representation
|
198
|
+
|
199
|
+
property :data_stream_id, as: 'dataStreamId'
|
200
|
+
property :data_stream_name, as: 'dataStreamName'
|
201
|
+
property :data_type, as: 'dataType', class: Google::Apis::FitnessV1::DataType, decorator: Google::Apis::FitnessV1::DataType::Representation
|
202
|
+
|
203
|
+
property :device, as: 'device', class: Google::Apis::FitnessV1::Device, decorator: Google::Apis::FitnessV1::Device::Representation
|
204
|
+
|
205
|
+
property :name, as: 'name'
|
206
|
+
property :type, as: 'type'
|
207
|
+
end
|
208
|
+
end
|
209
|
+
|
210
|
+
class DataType
|
211
|
+
# @private
|
212
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
213
|
+
collection :field, as: 'field', class: Google::Apis::FitnessV1::DataTypeField, decorator: Google::Apis::FitnessV1::DataTypeField::Representation
|
214
|
+
|
215
|
+
property :name, as: 'name'
|
216
|
+
end
|
217
|
+
end
|
218
|
+
|
219
|
+
class DataTypeField
|
220
|
+
# @private
|
221
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
222
|
+
property :format, as: 'format'
|
223
|
+
property :name, as: 'name'
|
224
|
+
property :optional, as: 'optional'
|
225
|
+
end
|
226
|
+
end
|
227
|
+
|
228
|
+
class Dataset
|
229
|
+
# @private
|
230
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
231
|
+
property :data_source_id, as: 'dataSourceId'
|
232
|
+
property :max_end_time_ns, as: 'maxEndTimeNs'
|
233
|
+
property :min_start_time_ns, as: 'minStartTimeNs'
|
234
|
+
property :next_page_token, as: 'nextPageToken'
|
235
|
+
collection :point, as: 'point', class: Google::Apis::FitnessV1::DataPoint, decorator: Google::Apis::FitnessV1::DataPoint::Representation
|
236
|
+
|
237
|
+
end
|
238
|
+
end
|
239
|
+
|
240
|
+
class Device
|
241
|
+
# @private
|
242
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
243
|
+
property :manufacturer, as: 'manufacturer'
|
244
|
+
property :model, as: 'model'
|
245
|
+
property :type, as: 'type'
|
246
|
+
property :uid, as: 'uid'
|
247
|
+
property :version, as: 'version'
|
248
|
+
end
|
249
|
+
end
|
250
|
+
|
251
|
+
class ListDataSourcesResponse
|
252
|
+
# @private
|
253
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
254
|
+
collection :data_source, as: 'dataSource', class: Google::Apis::FitnessV1::DataSource, decorator: Google::Apis::FitnessV1::DataSource::Representation
|
255
|
+
|
256
|
+
end
|
257
|
+
end
|
258
|
+
|
259
|
+
class ListSessionsResponse
|
260
|
+
# @private
|
261
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
262
|
+
collection :deleted_session, as: 'deletedSession', class: Google::Apis::FitnessV1::Session, decorator: Google::Apis::FitnessV1::Session::Representation
|
263
|
+
|
264
|
+
property :next_page_token, as: 'nextPageToken'
|
265
|
+
collection :session, as: 'session', class: Google::Apis::FitnessV1::Session, decorator: Google::Apis::FitnessV1::Session::Representation
|
266
|
+
|
267
|
+
end
|
268
|
+
end
|
269
|
+
|
270
|
+
class Session
|
271
|
+
# @private
|
272
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
273
|
+
property :active_time_millis, as: 'activeTimeMillis'
|
274
|
+
property :activity_type, as: 'activityType'
|
275
|
+
property :application, as: 'application', class: Google::Apis::FitnessV1::Application, decorator: Google::Apis::FitnessV1::Application::Representation
|
276
|
+
|
277
|
+
property :description, as: 'description'
|
278
|
+
property :end_time_millis, as: 'endTimeMillis'
|
279
|
+
property :id, as: 'id'
|
280
|
+
property :modified_time_millis, as: 'modifiedTimeMillis'
|
281
|
+
property :name, as: 'name'
|
282
|
+
property :start_time_millis, as: 'startTimeMillis'
|
283
|
+
end
|
284
|
+
end
|
285
|
+
|
286
|
+
class Value
|
287
|
+
# @private
|
288
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
289
|
+
property :fp_val, as: 'fpVal'
|
290
|
+
property :int_val, as: 'intVal'
|
291
|
+
end
|
292
|
+
end
|
293
|
+
end
|
294
|
+
end
|
295
|
+
end
|
@@ -0,0 +1,684 @@
|
|
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 FitnessV1
|
23
|
+
# Fitness
|
24
|
+
#
|
25
|
+
# Google Fit API
|
26
|
+
#
|
27
|
+
# @example
|
28
|
+
# require 'google/apis/fitness_v1'
|
29
|
+
#
|
30
|
+
# Fitness = Google::Apis::FitnessV1 # Alias the module
|
31
|
+
# service = Fitness::FitnessService.new
|
32
|
+
#
|
33
|
+
# @see https://developers.google.com/fit/rest/
|
34
|
+
class FitnessService < 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/', 'fitness/v1/users/')
|
53
|
+
end
|
54
|
+
|
55
|
+
# Creates a new data source that is unique across all data sources belonging to
|
56
|
+
# this user. The data stream ID field can be omitted and will be generated by
|
57
|
+
# the server with the correct format. The data stream ID is an ordered
|
58
|
+
# combination of some fields from the data source. In addition to the data
|
59
|
+
# source fields reflected into the data source ID, the developer project number
|
60
|
+
# that is authenticated when creating the data source is included. This
|
61
|
+
# developer project number is obfuscated when read by any other developer
|
62
|
+
# reading public data types.
|
63
|
+
# @param [String] user_id
|
64
|
+
# Create the data source for the person identified. Use me to indicate the
|
65
|
+
# authenticated user. Only me is supported at this time.
|
66
|
+
# @param [Google::Apis::FitnessV1::DataSource] data_source_object
|
67
|
+
# @param [String] fields
|
68
|
+
# Selector specifying which fields to include in a partial response.
|
69
|
+
# @param [String] quota_user
|
70
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
71
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
72
|
+
# Overrides userIp if both are provided.
|
73
|
+
# @param [String] user_ip
|
74
|
+
# IP address of the site where the request originates. Use this if you want to
|
75
|
+
# enforce per-user limits.
|
76
|
+
# @param [Google::Apis::RequestOptions] options
|
77
|
+
# Request-specific options
|
78
|
+
#
|
79
|
+
# @yield [result, err] Result & error if block supplied
|
80
|
+
# @yieldparam result [Google::Apis::FitnessV1::DataSource] parsed result object
|
81
|
+
# @yieldparam err [StandardError] error object if request failed
|
82
|
+
#
|
83
|
+
# @return [Google::Apis::FitnessV1::DataSource]
|
84
|
+
#
|
85
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
86
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
87
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
88
|
+
def create_user_data_source(user_id, data_source_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
89
|
+
path = '{userId}/dataSources'
|
90
|
+
command = make_simple_command(:post, path, options)
|
91
|
+
command.request_representation = Google::Apis::FitnessV1::DataSource::Representation
|
92
|
+
command.request_object = data_source_object
|
93
|
+
command.response_representation = Google::Apis::FitnessV1::DataSource::Representation
|
94
|
+
command.response_class = Google::Apis::FitnessV1::DataSource
|
95
|
+
command.params['userId'] = user_id unless user_id.nil?
|
96
|
+
command.query['fields'] = fields unless fields.nil?
|
97
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
98
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
99
|
+
execute_or_queue_command(command, &block)
|
100
|
+
end
|
101
|
+
|
102
|
+
# Delete the data source if there are no datapoints associated with it
|
103
|
+
# @param [String] user_id
|
104
|
+
# Retrieve a data source for the person identified. Use me to indicate the
|
105
|
+
# authenticated user. Only me is supported at this time.
|
106
|
+
# @param [String] data_source_id
|
107
|
+
# The data stream ID of the data source to delete.
|
108
|
+
# @param [String] fields
|
109
|
+
# Selector specifying which fields to include in a partial response.
|
110
|
+
# @param [String] quota_user
|
111
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
112
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
113
|
+
# Overrides userIp if both are provided.
|
114
|
+
# @param [String] user_ip
|
115
|
+
# IP address of the site where the request originates. Use this if you want to
|
116
|
+
# enforce per-user limits.
|
117
|
+
# @param [Google::Apis::RequestOptions] options
|
118
|
+
# Request-specific options
|
119
|
+
#
|
120
|
+
# @yield [result, err] Result & error if block supplied
|
121
|
+
# @yieldparam result [Google::Apis::FitnessV1::DataSource] parsed result object
|
122
|
+
# @yieldparam err [StandardError] error object if request failed
|
123
|
+
#
|
124
|
+
# @return [Google::Apis::FitnessV1::DataSource]
|
125
|
+
#
|
126
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
127
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
128
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
129
|
+
def delete_user_data_source(user_id, data_source_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
130
|
+
path = '{userId}/dataSources/{dataSourceId}'
|
131
|
+
command = make_simple_command(:delete, path, options)
|
132
|
+
command.response_representation = Google::Apis::FitnessV1::DataSource::Representation
|
133
|
+
command.response_class = Google::Apis::FitnessV1::DataSource
|
134
|
+
command.params['userId'] = user_id unless user_id.nil?
|
135
|
+
command.params['dataSourceId'] = data_source_id unless data_source_id.nil?
|
136
|
+
command.query['fields'] = fields unless fields.nil?
|
137
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
138
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
139
|
+
execute_or_queue_command(command, &block)
|
140
|
+
end
|
141
|
+
|
142
|
+
# Returns a data source identified by a data stream ID.
|
143
|
+
# @param [String] user_id
|
144
|
+
# Retrieve a data source for the person identified. Use me to indicate the
|
145
|
+
# authenticated user. Only me is supported at this time.
|
146
|
+
# @param [String] data_source_id
|
147
|
+
# The data stream ID of the data source to retrieve.
|
148
|
+
# @param [String] fields
|
149
|
+
# Selector specifying which fields to include in a partial response.
|
150
|
+
# @param [String] quota_user
|
151
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
152
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
153
|
+
# Overrides userIp if both are provided.
|
154
|
+
# @param [String] user_ip
|
155
|
+
# IP address of the site where the request originates. Use this if you want to
|
156
|
+
# enforce per-user limits.
|
157
|
+
# @param [Google::Apis::RequestOptions] options
|
158
|
+
# Request-specific options
|
159
|
+
#
|
160
|
+
# @yield [result, err] Result & error if block supplied
|
161
|
+
# @yieldparam result [Google::Apis::FitnessV1::DataSource] parsed result object
|
162
|
+
# @yieldparam err [StandardError] error object if request failed
|
163
|
+
#
|
164
|
+
# @return [Google::Apis::FitnessV1::DataSource]
|
165
|
+
#
|
166
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
167
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
168
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
169
|
+
def get_user_data_source(user_id, data_source_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
170
|
+
path = '{userId}/dataSources/{dataSourceId}'
|
171
|
+
command = make_simple_command(:get, path, options)
|
172
|
+
command.response_representation = Google::Apis::FitnessV1::DataSource::Representation
|
173
|
+
command.response_class = Google::Apis::FitnessV1::DataSource
|
174
|
+
command.params['userId'] = user_id unless user_id.nil?
|
175
|
+
command.params['dataSourceId'] = data_source_id unless data_source_id.nil?
|
176
|
+
command.query['fields'] = fields unless fields.nil?
|
177
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
178
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
179
|
+
execute_or_queue_command(command, &block)
|
180
|
+
end
|
181
|
+
|
182
|
+
# Lists all data sources that are visible to the developer, using the OAuth
|
183
|
+
# scopes provided. The list is not exhaustive: the user may have private data
|
184
|
+
# sources that are only visible to other developers or calls using other scopes.
|
185
|
+
# @param [String] user_id
|
186
|
+
# List data sources for the person identified. Use me to indicate the
|
187
|
+
# authenticated user. Only me is supported at this time.
|
188
|
+
# @param [Array<String>, String] data_type_name
|
189
|
+
# The names of data types to include in the list. If not specified, all data
|
190
|
+
# sources will be returned.
|
191
|
+
# @param [String] fields
|
192
|
+
# Selector specifying which fields to include in a partial response.
|
193
|
+
# @param [String] quota_user
|
194
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
195
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
196
|
+
# Overrides userIp if both are provided.
|
197
|
+
# @param [String] user_ip
|
198
|
+
# IP address of the site where the request originates. Use this if you want to
|
199
|
+
# enforce per-user limits.
|
200
|
+
# @param [Google::Apis::RequestOptions] options
|
201
|
+
# Request-specific options
|
202
|
+
#
|
203
|
+
# @yield [result, err] Result & error if block supplied
|
204
|
+
# @yieldparam result [Google::Apis::FitnessV1::ListDataSourcesResponse] parsed result object
|
205
|
+
# @yieldparam err [StandardError] error object if request failed
|
206
|
+
#
|
207
|
+
# @return [Google::Apis::FitnessV1::ListDataSourcesResponse]
|
208
|
+
#
|
209
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
210
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
211
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
212
|
+
def list_user_data_sources(user_id, data_type_name: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
213
|
+
path = '{userId}/dataSources'
|
214
|
+
command = make_simple_command(:get, path, options)
|
215
|
+
command.response_representation = Google::Apis::FitnessV1::ListDataSourcesResponse::Representation
|
216
|
+
command.response_class = Google::Apis::FitnessV1::ListDataSourcesResponse
|
217
|
+
command.params['userId'] = user_id unless user_id.nil?
|
218
|
+
command.query['dataTypeName'] = data_type_name unless data_type_name.nil?
|
219
|
+
command.query['fields'] = fields unless fields.nil?
|
220
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
221
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
222
|
+
execute_or_queue_command(command, &block)
|
223
|
+
end
|
224
|
+
|
225
|
+
# Updates a given data source. It is an error to modify the data source's data
|
226
|
+
# stream ID, data type, type, stream name or device information apart from the
|
227
|
+
# device version. Changing these fields would require a new unique data stream
|
228
|
+
# ID and separate data source.
|
229
|
+
# Data sources are identified by their data stream ID. This method supports
|
230
|
+
# patch semantics.
|
231
|
+
# @param [String] user_id
|
232
|
+
# Update the data source for the person identified. Use me to indicate the
|
233
|
+
# authenticated user. Only me is supported at this time.
|
234
|
+
# @param [String] data_source_id
|
235
|
+
# The data stream ID of the data source to update.
|
236
|
+
# @param [Google::Apis::FitnessV1::DataSource] data_source_object
|
237
|
+
# @param [String] fields
|
238
|
+
# Selector specifying which fields to include in a partial response.
|
239
|
+
# @param [String] quota_user
|
240
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
241
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
242
|
+
# Overrides userIp if both are provided.
|
243
|
+
# @param [String] user_ip
|
244
|
+
# IP address of the site where the request originates. Use this if you want to
|
245
|
+
# enforce per-user limits.
|
246
|
+
# @param [Google::Apis::RequestOptions] options
|
247
|
+
# Request-specific options
|
248
|
+
#
|
249
|
+
# @yield [result, err] Result & error if block supplied
|
250
|
+
# @yieldparam result [Google::Apis::FitnessV1::DataSource] parsed result object
|
251
|
+
# @yieldparam err [StandardError] error object if request failed
|
252
|
+
#
|
253
|
+
# @return [Google::Apis::FitnessV1::DataSource]
|
254
|
+
#
|
255
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
256
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
257
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
258
|
+
def patch_user_data_source(user_id, data_source_id, data_source_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
259
|
+
path = '{userId}/dataSources/{dataSourceId}'
|
260
|
+
command = make_simple_command(:patch, path, options)
|
261
|
+
command.request_representation = Google::Apis::FitnessV1::DataSource::Representation
|
262
|
+
command.request_object = data_source_object
|
263
|
+
command.response_representation = Google::Apis::FitnessV1::DataSource::Representation
|
264
|
+
command.response_class = Google::Apis::FitnessV1::DataSource
|
265
|
+
command.params['userId'] = user_id unless user_id.nil?
|
266
|
+
command.params['dataSourceId'] = data_source_id unless data_source_id.nil?
|
267
|
+
command.query['fields'] = fields unless fields.nil?
|
268
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
269
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
270
|
+
execute_or_queue_command(command, &block)
|
271
|
+
end
|
272
|
+
|
273
|
+
# Updates a given data source. It is an error to modify the data source's data
|
274
|
+
# stream ID, data type, type, stream name or device information apart from the
|
275
|
+
# device version. Changing these fields would require a new unique data stream
|
276
|
+
# ID and separate data source.
|
277
|
+
# Data sources are identified by their data stream ID.
|
278
|
+
# @param [String] user_id
|
279
|
+
# Update the data source for the person identified. Use me to indicate the
|
280
|
+
# authenticated user. Only me is supported at this time.
|
281
|
+
# @param [String] data_source_id
|
282
|
+
# The data stream ID of the data source to update.
|
283
|
+
# @param [Google::Apis::FitnessV1::DataSource] data_source_object
|
284
|
+
# @param [String] fields
|
285
|
+
# Selector specifying which fields to include in a partial response.
|
286
|
+
# @param [String] quota_user
|
287
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
288
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
289
|
+
# Overrides userIp if both are provided.
|
290
|
+
# @param [String] user_ip
|
291
|
+
# IP address of the site where the request originates. Use this if you want to
|
292
|
+
# enforce per-user limits.
|
293
|
+
# @param [Google::Apis::RequestOptions] options
|
294
|
+
# Request-specific options
|
295
|
+
#
|
296
|
+
# @yield [result, err] Result & error if block supplied
|
297
|
+
# @yieldparam result [Google::Apis::FitnessV1::DataSource] parsed result object
|
298
|
+
# @yieldparam err [StandardError] error object if request failed
|
299
|
+
#
|
300
|
+
# @return [Google::Apis::FitnessV1::DataSource]
|
301
|
+
#
|
302
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
303
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
304
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
305
|
+
def update_user_data_source(user_id, data_source_id, data_source_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
306
|
+
path = '{userId}/dataSources/{dataSourceId}'
|
307
|
+
command = make_simple_command(:put, path, options)
|
308
|
+
command.request_representation = Google::Apis::FitnessV1::DataSource::Representation
|
309
|
+
command.request_object = data_source_object
|
310
|
+
command.response_representation = Google::Apis::FitnessV1::DataSource::Representation
|
311
|
+
command.response_class = Google::Apis::FitnessV1::DataSource
|
312
|
+
command.params['userId'] = user_id unless user_id.nil?
|
313
|
+
command.params['dataSourceId'] = data_source_id unless data_source_id.nil?
|
314
|
+
command.query['fields'] = fields unless fields.nil?
|
315
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
316
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
317
|
+
execute_or_queue_command(command, &block)
|
318
|
+
end
|
319
|
+
|
320
|
+
# Performs an inclusive delete of all data points whose start and end times have
|
321
|
+
# any overlap with the time range specified by the dataset ID. For most data
|
322
|
+
# types, the entire data point will be deleted. For data types where the time
|
323
|
+
# span represents a consistent value (such as com.google.activity.segment), and
|
324
|
+
# a data point straddles either end point of the dataset, only the overlapping
|
325
|
+
# portion of the data point will be deleted.
|
326
|
+
# @param [String] user_id
|
327
|
+
# Delete a dataset for the person identified. Use me to indicate the
|
328
|
+
# authenticated user. Only me is supported at this time.
|
329
|
+
# @param [String] data_source_id
|
330
|
+
# The data stream ID of the data source that created the dataset.
|
331
|
+
# @param [String] dataset_id
|
332
|
+
# Dataset identifier that is a composite of the minimum data point start time
|
333
|
+
# and maximum data point end time represented as nanoseconds from the epoch. The
|
334
|
+
# ID is formatted like: "startTime-endTime" where startTime and endTime are 64
|
335
|
+
# bit integers.
|
336
|
+
# @param [String] current_time_millis
|
337
|
+
# The client's current time in milliseconds since epoch.
|
338
|
+
# @param [String] modified_time_millis
|
339
|
+
# When the operation was performed on the client.
|
340
|
+
# @param [String] fields
|
341
|
+
# Selector specifying which fields to include in a partial response.
|
342
|
+
# @param [String] quota_user
|
343
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
344
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
345
|
+
# Overrides userIp if both are provided.
|
346
|
+
# @param [String] user_ip
|
347
|
+
# IP address of the site where the request originates. Use this if you want to
|
348
|
+
# enforce per-user limits.
|
349
|
+
# @param [Google::Apis::RequestOptions] options
|
350
|
+
# Request-specific options
|
351
|
+
#
|
352
|
+
# @yield [result, err] Result & error if block supplied
|
353
|
+
# @yieldparam result [NilClass] No result returned for this method
|
354
|
+
# @yieldparam err [StandardError] error object if request failed
|
355
|
+
#
|
356
|
+
# @return [void]
|
357
|
+
#
|
358
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
359
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
360
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
361
|
+
def delete_user_data_source_dataset(user_id, data_source_id, dataset_id, current_time_millis: nil, modified_time_millis: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
362
|
+
path = '{userId}/dataSources/{dataSourceId}/datasets/{datasetId}'
|
363
|
+
command = make_simple_command(:delete, path, options)
|
364
|
+
command.params['userId'] = user_id unless user_id.nil?
|
365
|
+
command.params['dataSourceId'] = data_source_id unless data_source_id.nil?
|
366
|
+
command.params['datasetId'] = dataset_id unless dataset_id.nil?
|
367
|
+
command.query['currentTimeMillis'] = current_time_millis unless current_time_millis.nil?
|
368
|
+
command.query['modifiedTimeMillis'] = modified_time_millis unless modified_time_millis.nil?
|
369
|
+
command.query['fields'] = fields unless fields.nil?
|
370
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
371
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
372
|
+
execute_or_queue_command(command, &block)
|
373
|
+
end
|
374
|
+
|
375
|
+
# Returns a dataset containing all data points whose start and end times overlap
|
376
|
+
# with the specified range of the dataset minimum start time and maximum end
|
377
|
+
# time. Specifically, any data point whose start time is less than or equal to
|
378
|
+
# the dataset end time and whose end time is greater than or equal to the
|
379
|
+
# dataset start time.
|
380
|
+
# @param [String] user_id
|
381
|
+
# Retrieve a dataset for the person identified. Use me to indicate the
|
382
|
+
# authenticated user. Only me is supported at this time.
|
383
|
+
# @param [String] data_source_id
|
384
|
+
# The data stream ID of the data source that created the dataset.
|
385
|
+
# @param [String] dataset_id
|
386
|
+
# Dataset identifier that is a composite of the minimum data point start time
|
387
|
+
# and maximum data point end time represented as nanoseconds from the epoch. The
|
388
|
+
# ID is formatted like: "startTime-endTime" where startTime and endTime are 64
|
389
|
+
# bit integers.
|
390
|
+
# @param [Fixnum] limit
|
391
|
+
# If specified, no more than this many data points will be included in the
|
392
|
+
# dataset. If the there are more data points in the dataset, nextPageToken will
|
393
|
+
# be set in the dataset response.
|
394
|
+
# @param [String] page_token
|
395
|
+
# The continuation token, which is used to page through large datasets. To get
|
396
|
+
# the next page of a dataset, set this parameter to the value of nextPageToken
|
397
|
+
# from the previous response. Each subsequent call will yield a partial dataset
|
398
|
+
# with data point end timestamps that are strictly smaller than those in the
|
399
|
+
# previous partial response.
|
400
|
+
# @param [String] fields
|
401
|
+
# Selector specifying which fields to include in a partial response.
|
402
|
+
# @param [String] quota_user
|
403
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
404
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
405
|
+
# Overrides userIp if both are provided.
|
406
|
+
# @param [String] user_ip
|
407
|
+
# IP address of the site where the request originates. Use this if you want to
|
408
|
+
# enforce per-user limits.
|
409
|
+
# @param [Google::Apis::RequestOptions] options
|
410
|
+
# Request-specific options
|
411
|
+
#
|
412
|
+
# @yield [result, err] Result & error if block supplied
|
413
|
+
# @yieldparam result [Google::Apis::FitnessV1::Dataset] parsed result object
|
414
|
+
# @yieldparam err [StandardError] error object if request failed
|
415
|
+
#
|
416
|
+
# @return [Google::Apis::FitnessV1::Dataset]
|
417
|
+
#
|
418
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
419
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
420
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
421
|
+
def get_user_data_source_dataset(user_id, data_source_id, dataset_id, limit: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
422
|
+
path = '{userId}/dataSources/{dataSourceId}/datasets/{datasetId}'
|
423
|
+
command = make_simple_command(:get, path, options)
|
424
|
+
command.response_representation = Google::Apis::FitnessV1::Dataset::Representation
|
425
|
+
command.response_class = Google::Apis::FitnessV1::Dataset
|
426
|
+
command.params['userId'] = user_id unless user_id.nil?
|
427
|
+
command.params['dataSourceId'] = data_source_id unless data_source_id.nil?
|
428
|
+
command.params['datasetId'] = dataset_id unless dataset_id.nil?
|
429
|
+
command.query['limit'] = limit unless limit.nil?
|
430
|
+
command.query['pageToken'] = page_token unless page_token.nil?
|
431
|
+
command.query['fields'] = fields unless fields.nil?
|
432
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
433
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
434
|
+
execute_or_queue_command(command, &block)
|
435
|
+
end
|
436
|
+
|
437
|
+
# Adds data points to a dataset. The dataset need not be previously created. All
|
438
|
+
# points within the given dataset will be returned with subsquent calls to
|
439
|
+
# retrieve this dataset. Data points can belong to more than one dataset. This
|
440
|
+
# method does not use patch semantics.
|
441
|
+
# @param [String] user_id
|
442
|
+
# Patch a dataset for the person identified. Use me to indicate the
|
443
|
+
# authenticated user. Only me is supported at this time.
|
444
|
+
# @param [String] data_source_id
|
445
|
+
# The data stream ID of the data source that created the dataset.
|
446
|
+
# @param [String] dataset_id
|
447
|
+
# Dataset identifier that is a composite of the minimum data point start time
|
448
|
+
# and maximum data point end time represented as nanoseconds from the epoch. The
|
449
|
+
# ID is formatted like: "startTime-endTime" where startTime and endTime are 64
|
450
|
+
# bit integers.
|
451
|
+
# @param [Google::Apis::FitnessV1::Dataset] dataset_object
|
452
|
+
# @param [String] current_time_millis
|
453
|
+
# The client's current time in milliseconds since epoch. Note that the
|
454
|
+
# minStartTimeNs and maxEndTimeNs properties in the request body are in
|
455
|
+
# nanoseconds instead of milliseconds.
|
456
|
+
# @param [String] fields
|
457
|
+
# Selector specifying which fields to include in a partial response.
|
458
|
+
# @param [String] quota_user
|
459
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
460
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
461
|
+
# Overrides userIp if both are provided.
|
462
|
+
# @param [String] user_ip
|
463
|
+
# IP address of the site where the request originates. Use this if you want to
|
464
|
+
# enforce per-user limits.
|
465
|
+
# @param [Google::Apis::RequestOptions] options
|
466
|
+
# Request-specific options
|
467
|
+
#
|
468
|
+
# @yield [result, err] Result & error if block supplied
|
469
|
+
# @yieldparam result [Google::Apis::FitnessV1::Dataset] parsed result object
|
470
|
+
# @yieldparam err [StandardError] error object if request failed
|
471
|
+
#
|
472
|
+
# @return [Google::Apis::FitnessV1::Dataset]
|
473
|
+
#
|
474
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
475
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
476
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
477
|
+
def patch_user_data_source_dataset(user_id, data_source_id, dataset_id, dataset_object = nil, current_time_millis: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
478
|
+
path = '{userId}/dataSources/{dataSourceId}/datasets/{datasetId}'
|
479
|
+
command = make_simple_command(:patch, path, options)
|
480
|
+
command.request_representation = Google::Apis::FitnessV1::Dataset::Representation
|
481
|
+
command.request_object = dataset_object
|
482
|
+
command.response_representation = Google::Apis::FitnessV1::Dataset::Representation
|
483
|
+
command.response_class = Google::Apis::FitnessV1::Dataset
|
484
|
+
command.params['userId'] = user_id unless user_id.nil?
|
485
|
+
command.params['dataSourceId'] = data_source_id unless data_source_id.nil?
|
486
|
+
command.params['datasetId'] = dataset_id unless dataset_id.nil?
|
487
|
+
command.query['currentTimeMillis'] = current_time_millis unless current_time_millis.nil?
|
488
|
+
command.query['fields'] = fields unless fields.nil?
|
489
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
490
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
491
|
+
execute_or_queue_command(command, &block)
|
492
|
+
end
|
493
|
+
|
494
|
+
#
|
495
|
+
# @param [String] user_id
|
496
|
+
# @param [Google::Apis::FitnessV1::AggregateRequest] aggregate_request_object
|
497
|
+
# @param [String] fields
|
498
|
+
# Selector specifying which fields to include in a partial response.
|
499
|
+
# @param [String] quota_user
|
500
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
501
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
502
|
+
# Overrides userIp if both are provided.
|
503
|
+
# @param [String] user_ip
|
504
|
+
# IP address of the site where the request originates. Use this if you want to
|
505
|
+
# enforce per-user limits.
|
506
|
+
# @param [Google::Apis::RequestOptions] options
|
507
|
+
# Request-specific options
|
508
|
+
#
|
509
|
+
# @yield [result, err] Result & error if block supplied
|
510
|
+
# @yieldparam result [Google::Apis::FitnessV1::AggregateResponse] parsed result object
|
511
|
+
# @yieldparam err [StandardError] error object if request failed
|
512
|
+
#
|
513
|
+
# @return [Google::Apis::FitnessV1::AggregateResponse]
|
514
|
+
#
|
515
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
516
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
517
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
518
|
+
def aggregate(user_id, aggregate_request_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
519
|
+
path = '{userId}/dataset:aggregate'
|
520
|
+
command = make_simple_command(:post, path, options)
|
521
|
+
command.request_representation = Google::Apis::FitnessV1::AggregateRequest::Representation
|
522
|
+
command.request_object = aggregate_request_object
|
523
|
+
command.response_representation = Google::Apis::FitnessV1::AggregateResponse::Representation
|
524
|
+
command.response_class = Google::Apis::FitnessV1::AggregateResponse
|
525
|
+
command.params['userId'] = user_id unless user_id.nil?
|
526
|
+
command.query['fields'] = fields unless fields.nil?
|
527
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
528
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
529
|
+
execute_or_queue_command(command, &block)
|
530
|
+
end
|
531
|
+
|
532
|
+
# Deletes a session specified by the given session ID.
|
533
|
+
# @param [String] user_id
|
534
|
+
# Delete a session for the person identified. Use me to indicate the
|
535
|
+
# authenticated user. Only me is supported at this time.
|
536
|
+
# @param [String] session_id
|
537
|
+
# The ID of the session to be deleted.
|
538
|
+
# @param [String] current_time_millis
|
539
|
+
# The client's current time in milliseconds since epoch.
|
540
|
+
# @param [String] fields
|
541
|
+
# Selector specifying which fields to include in a partial response.
|
542
|
+
# @param [String] quota_user
|
543
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
544
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
545
|
+
# Overrides userIp if both are provided.
|
546
|
+
# @param [String] user_ip
|
547
|
+
# IP address of the site where the request originates. Use this if you want to
|
548
|
+
# enforce per-user limits.
|
549
|
+
# @param [Google::Apis::RequestOptions] options
|
550
|
+
# Request-specific options
|
551
|
+
#
|
552
|
+
# @yield [result, err] Result & error if block supplied
|
553
|
+
# @yieldparam result [NilClass] No result returned for this method
|
554
|
+
# @yieldparam err [StandardError] error object if request failed
|
555
|
+
#
|
556
|
+
# @return [void]
|
557
|
+
#
|
558
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
559
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
560
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
561
|
+
def delete_user_session(user_id, session_id, current_time_millis: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
562
|
+
path = '{userId}/sessions/{sessionId}'
|
563
|
+
command = make_simple_command(:delete, path, options)
|
564
|
+
command.params['userId'] = user_id unless user_id.nil?
|
565
|
+
command.params['sessionId'] = session_id unless session_id.nil?
|
566
|
+
command.query['currentTimeMillis'] = current_time_millis unless current_time_millis.nil?
|
567
|
+
command.query['fields'] = fields unless fields.nil?
|
568
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
569
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
570
|
+
execute_or_queue_command(command, &block)
|
571
|
+
end
|
572
|
+
|
573
|
+
# Lists sessions previously created.
|
574
|
+
# @param [String] user_id
|
575
|
+
# List sessions for the person identified. Use me to indicate the authenticated
|
576
|
+
# user. Only me is supported at this time.
|
577
|
+
# @param [String] end_time
|
578
|
+
# An RFC3339 timestamp. Only sessions ending between the start and end times
|
579
|
+
# will be included in the response.
|
580
|
+
# @param [Boolean] include_deleted
|
581
|
+
# If true, deleted sessions will be returned. When set to true, sessions
|
582
|
+
# returned in this response will only have an ID and will not have any other
|
583
|
+
# fields.
|
584
|
+
# @param [String] page_token
|
585
|
+
# The continuation token, which is used to page through large result sets. To
|
586
|
+
# get the next page of results, set this parameter to the value of nextPageToken
|
587
|
+
# from the previous response.
|
588
|
+
# @param [String] start_time
|
589
|
+
# An RFC3339 timestamp. Only sessions ending between the start and end times
|
590
|
+
# will be included in the response.
|
591
|
+
# @param [String] fields
|
592
|
+
# Selector specifying which fields to include in a partial response.
|
593
|
+
# @param [String] quota_user
|
594
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
595
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
596
|
+
# Overrides userIp if both are provided.
|
597
|
+
# @param [String] user_ip
|
598
|
+
# IP address of the site where the request originates. Use this if you want to
|
599
|
+
# enforce per-user limits.
|
600
|
+
# @param [Google::Apis::RequestOptions] options
|
601
|
+
# Request-specific options
|
602
|
+
#
|
603
|
+
# @yield [result, err] Result & error if block supplied
|
604
|
+
# @yieldparam result [Google::Apis::FitnessV1::ListSessionsResponse] parsed result object
|
605
|
+
# @yieldparam err [StandardError] error object if request failed
|
606
|
+
#
|
607
|
+
# @return [Google::Apis::FitnessV1::ListSessionsResponse]
|
608
|
+
#
|
609
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
610
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
611
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
612
|
+
def list_user_sessions(user_id, end_time: nil, include_deleted: nil, page_token: nil, start_time: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
613
|
+
path = '{userId}/sessions'
|
614
|
+
command = make_simple_command(:get, path, options)
|
615
|
+
command.response_representation = Google::Apis::FitnessV1::ListSessionsResponse::Representation
|
616
|
+
command.response_class = Google::Apis::FitnessV1::ListSessionsResponse
|
617
|
+
command.params['userId'] = user_id unless user_id.nil?
|
618
|
+
command.query['endTime'] = end_time unless end_time.nil?
|
619
|
+
command.query['includeDeleted'] = include_deleted unless include_deleted.nil?
|
620
|
+
command.query['pageToken'] = page_token unless page_token.nil?
|
621
|
+
command.query['startTime'] = start_time unless start_time.nil?
|
622
|
+
command.query['fields'] = fields unless fields.nil?
|
623
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
624
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
625
|
+
execute_or_queue_command(command, &block)
|
626
|
+
end
|
627
|
+
|
628
|
+
# Updates or insert a given session.
|
629
|
+
# @param [String] user_id
|
630
|
+
# Create sessions for the person identified. Use me to indicate the
|
631
|
+
# authenticated user. Only me is supported at this time.
|
632
|
+
# @param [String] session_id
|
633
|
+
# The ID of the session to be created.
|
634
|
+
# @param [Google::Apis::FitnessV1::Session] session_object
|
635
|
+
# @param [String] current_time_millis
|
636
|
+
# The client's current time in milliseconds since epoch.
|
637
|
+
# @param [String] fields
|
638
|
+
# Selector specifying which fields to include in a partial response.
|
639
|
+
# @param [String] quota_user
|
640
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
641
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
642
|
+
# Overrides userIp if both are provided.
|
643
|
+
# @param [String] user_ip
|
644
|
+
# IP address of the site where the request originates. Use this if you want to
|
645
|
+
# enforce per-user limits.
|
646
|
+
# @param [Google::Apis::RequestOptions] options
|
647
|
+
# Request-specific options
|
648
|
+
#
|
649
|
+
# @yield [result, err] Result & error if block supplied
|
650
|
+
# @yieldparam result [Google::Apis::FitnessV1::Session] parsed result object
|
651
|
+
# @yieldparam err [StandardError] error object if request failed
|
652
|
+
#
|
653
|
+
# @return [Google::Apis::FitnessV1::Session]
|
654
|
+
#
|
655
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
656
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
657
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
658
|
+
def update_user_session(user_id, session_id, session_object = nil, current_time_millis: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
659
|
+
path = '{userId}/sessions/{sessionId}'
|
660
|
+
command = make_simple_command(:put, path, options)
|
661
|
+
command.request_representation = Google::Apis::FitnessV1::Session::Representation
|
662
|
+
command.request_object = session_object
|
663
|
+
command.response_representation = Google::Apis::FitnessV1::Session::Representation
|
664
|
+
command.response_class = Google::Apis::FitnessV1::Session
|
665
|
+
command.params['userId'] = user_id unless user_id.nil?
|
666
|
+
command.params['sessionId'] = session_id unless session_id.nil?
|
667
|
+
command.query['currentTimeMillis'] = current_time_millis unless current_time_millis.nil?
|
668
|
+
command.query['fields'] = fields unless fields.nil?
|
669
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
670
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
671
|
+
execute_or_queue_command(command, &block)
|
672
|
+
end
|
673
|
+
|
674
|
+
protected
|
675
|
+
|
676
|
+
def apply_command_defaults(command)
|
677
|
+
command.query['key'] = key unless key.nil?
|
678
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
679
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
680
|
+
end
|
681
|
+
end
|
682
|
+
end
|
683
|
+
end
|
684
|
+
end
|