google-api-client 0.8.7 → 0.9.pre1
Sign up to get free protection for your applications and to get access to all the features.
- 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,409 @@
|
|
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 FusiontablesV2
|
24
|
+
|
25
|
+
class Bucket
|
26
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
27
|
+
end
|
28
|
+
|
29
|
+
class Column
|
30
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
31
|
+
|
32
|
+
class BaseColumn
|
33
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
34
|
+
end
|
35
|
+
end
|
36
|
+
|
37
|
+
class ColumnList
|
38
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
39
|
+
end
|
40
|
+
|
41
|
+
class Geometry
|
42
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
43
|
+
end
|
44
|
+
|
45
|
+
class Import
|
46
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
47
|
+
end
|
48
|
+
|
49
|
+
class Line
|
50
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
51
|
+
end
|
52
|
+
|
53
|
+
class LineStyle
|
54
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
55
|
+
end
|
56
|
+
|
57
|
+
class Point
|
58
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
59
|
+
end
|
60
|
+
|
61
|
+
class PointStyle
|
62
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
63
|
+
end
|
64
|
+
|
65
|
+
class Polygon
|
66
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
67
|
+
end
|
68
|
+
|
69
|
+
class PolygonStyle
|
70
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
71
|
+
end
|
72
|
+
|
73
|
+
class Sqlresponse
|
74
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
75
|
+
end
|
76
|
+
|
77
|
+
class StyleFunction
|
78
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
79
|
+
|
80
|
+
class Gradient
|
81
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
82
|
+
|
83
|
+
class Color
|
84
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
85
|
+
end
|
86
|
+
end
|
87
|
+
end
|
88
|
+
|
89
|
+
class StyleSetting
|
90
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
91
|
+
end
|
92
|
+
|
93
|
+
class StyleSettingList
|
94
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
95
|
+
end
|
96
|
+
|
97
|
+
class Table
|
98
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
99
|
+
end
|
100
|
+
|
101
|
+
class TableList
|
102
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
103
|
+
end
|
104
|
+
|
105
|
+
class Task
|
106
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
107
|
+
end
|
108
|
+
|
109
|
+
class TaskList
|
110
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
111
|
+
end
|
112
|
+
|
113
|
+
class Template
|
114
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
115
|
+
end
|
116
|
+
|
117
|
+
class TemplateList
|
118
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
119
|
+
end
|
120
|
+
|
121
|
+
class Bucket
|
122
|
+
# @private
|
123
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
124
|
+
property :color, as: 'color'
|
125
|
+
property :icon, as: 'icon'
|
126
|
+
property :max, as: 'max'
|
127
|
+
property :min, as: 'min'
|
128
|
+
property :opacity, as: 'opacity'
|
129
|
+
property :weight, as: 'weight'
|
130
|
+
end
|
131
|
+
end
|
132
|
+
|
133
|
+
class Column
|
134
|
+
# @private
|
135
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
136
|
+
property :base_column, as: 'baseColumn', class: Google::Apis::FusiontablesV2::Column::BaseColumn, decorator: Google::Apis::FusiontablesV2::Column::BaseColumn::Representation
|
137
|
+
|
138
|
+
property :column_id, as: 'columnId'
|
139
|
+
property :column_json_schema, as: 'columnJsonSchema'
|
140
|
+
property :column_properties_json, as: 'columnPropertiesJson'
|
141
|
+
property :description, as: 'description'
|
142
|
+
property :format_pattern, as: 'formatPattern'
|
143
|
+
property :graph_predicate, as: 'graphPredicate'
|
144
|
+
property :kind, as: 'kind'
|
145
|
+
property :name, as: 'name'
|
146
|
+
property :type, as: 'type'
|
147
|
+
collection :valid_values, as: 'validValues'
|
148
|
+
property :validate_data, as: 'validateData'
|
149
|
+
end
|
150
|
+
|
151
|
+
class BaseColumn
|
152
|
+
# @private
|
153
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
154
|
+
property :column_id, as: 'columnId'
|
155
|
+
property :table_index, as: 'tableIndex'
|
156
|
+
end
|
157
|
+
end
|
158
|
+
end
|
159
|
+
|
160
|
+
class ColumnList
|
161
|
+
# @private
|
162
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
163
|
+
collection :items, as: 'items', class: Google::Apis::FusiontablesV2::Column, decorator: Google::Apis::FusiontablesV2::Column::Representation
|
164
|
+
|
165
|
+
property :kind, as: 'kind'
|
166
|
+
property :next_page_token, as: 'nextPageToken'
|
167
|
+
property :total_items, as: 'totalItems'
|
168
|
+
end
|
169
|
+
end
|
170
|
+
|
171
|
+
class Geometry
|
172
|
+
# @private
|
173
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
174
|
+
collection :geometries, as: 'geometries'
|
175
|
+
property :geometry, as: 'geometry'
|
176
|
+
property :type, as: 'type'
|
177
|
+
end
|
178
|
+
end
|
179
|
+
|
180
|
+
class Import
|
181
|
+
# @private
|
182
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
183
|
+
property :kind, as: 'kind'
|
184
|
+
property :num_rows_received, as: 'numRowsReceived'
|
185
|
+
end
|
186
|
+
end
|
187
|
+
|
188
|
+
class Line
|
189
|
+
# @private
|
190
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
191
|
+
collection :coordinates, as: 'coordinates', :class => Array do
|
192
|
+
include Representable::JSON::Collection
|
193
|
+
items
|
194
|
+
end
|
195
|
+
|
196
|
+
property :type, as: 'type'
|
197
|
+
end
|
198
|
+
end
|
199
|
+
|
200
|
+
class LineStyle
|
201
|
+
# @private
|
202
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
203
|
+
property :stroke_color, as: 'strokeColor'
|
204
|
+
property :stroke_color_styler, as: 'strokeColorStyler', class: Google::Apis::FusiontablesV2::StyleFunction, decorator: Google::Apis::FusiontablesV2::StyleFunction::Representation
|
205
|
+
|
206
|
+
property :stroke_opacity, as: 'strokeOpacity'
|
207
|
+
property :stroke_weight, as: 'strokeWeight'
|
208
|
+
property :stroke_weight_styler, as: 'strokeWeightStyler', class: Google::Apis::FusiontablesV2::StyleFunction, decorator: Google::Apis::FusiontablesV2::StyleFunction::Representation
|
209
|
+
|
210
|
+
end
|
211
|
+
end
|
212
|
+
|
213
|
+
class Point
|
214
|
+
# @private
|
215
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
216
|
+
collection :coordinates, as: 'coordinates'
|
217
|
+
property :type, as: 'type'
|
218
|
+
end
|
219
|
+
end
|
220
|
+
|
221
|
+
class PointStyle
|
222
|
+
# @private
|
223
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
224
|
+
property :icon_name, as: 'iconName'
|
225
|
+
property :icon_styler, as: 'iconStyler', class: Google::Apis::FusiontablesV2::StyleFunction, decorator: Google::Apis::FusiontablesV2::StyleFunction::Representation
|
226
|
+
|
227
|
+
end
|
228
|
+
end
|
229
|
+
|
230
|
+
class Polygon
|
231
|
+
# @private
|
232
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
233
|
+
collection :coordinates, as: 'coordinates', :class => Array do
|
234
|
+
include Representable::JSON::Collection
|
235
|
+
items :class => Array do
|
236
|
+
include Representable::JSON::Collection
|
237
|
+
items
|
238
|
+
end
|
239
|
+
|
240
|
+
end
|
241
|
+
|
242
|
+
property :type, as: 'type'
|
243
|
+
end
|
244
|
+
end
|
245
|
+
|
246
|
+
class PolygonStyle
|
247
|
+
# @private
|
248
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
249
|
+
property :fill_color, as: 'fillColor'
|
250
|
+
property :fill_color_styler, as: 'fillColorStyler', class: Google::Apis::FusiontablesV2::StyleFunction, decorator: Google::Apis::FusiontablesV2::StyleFunction::Representation
|
251
|
+
|
252
|
+
property :fill_opacity, as: 'fillOpacity'
|
253
|
+
property :stroke_color, as: 'strokeColor'
|
254
|
+
property :stroke_color_styler, as: 'strokeColorStyler', class: Google::Apis::FusiontablesV2::StyleFunction, decorator: Google::Apis::FusiontablesV2::StyleFunction::Representation
|
255
|
+
|
256
|
+
property :stroke_opacity, as: 'strokeOpacity'
|
257
|
+
property :stroke_weight, as: 'strokeWeight'
|
258
|
+
property :stroke_weight_styler, as: 'strokeWeightStyler', class: Google::Apis::FusiontablesV2::StyleFunction, decorator: Google::Apis::FusiontablesV2::StyleFunction::Representation
|
259
|
+
|
260
|
+
end
|
261
|
+
end
|
262
|
+
|
263
|
+
class Sqlresponse
|
264
|
+
# @private
|
265
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
266
|
+
collection :columns, as: 'columns'
|
267
|
+
property :kind, as: 'kind'
|
268
|
+
collection :rows, as: 'rows', :class => Array do
|
269
|
+
include Representable::JSON::Collection
|
270
|
+
items
|
271
|
+
end
|
272
|
+
|
273
|
+
end
|
274
|
+
end
|
275
|
+
|
276
|
+
class StyleFunction
|
277
|
+
# @private
|
278
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
279
|
+
collection :buckets, as: 'buckets', class: Google::Apis::FusiontablesV2::Bucket, decorator: Google::Apis::FusiontablesV2::Bucket::Representation
|
280
|
+
|
281
|
+
property :column_name, as: 'columnName'
|
282
|
+
property :gradient, as: 'gradient', class: Google::Apis::FusiontablesV2::StyleFunction::Gradient, decorator: Google::Apis::FusiontablesV2::StyleFunction::Gradient::Representation
|
283
|
+
|
284
|
+
property :kind, as: 'kind'
|
285
|
+
end
|
286
|
+
|
287
|
+
class Gradient
|
288
|
+
# @private
|
289
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
290
|
+
collection :colors, as: 'colors', class: Google::Apis::FusiontablesV2::StyleFunction::Gradient::Color, decorator: Google::Apis::FusiontablesV2::StyleFunction::Gradient::Color::Representation
|
291
|
+
|
292
|
+
property :max, as: 'max'
|
293
|
+
property :min, as: 'min'
|
294
|
+
end
|
295
|
+
|
296
|
+
class Color
|
297
|
+
# @private
|
298
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
299
|
+
property :color, as: 'color'
|
300
|
+
property :opacity, as: 'opacity'
|
301
|
+
end
|
302
|
+
end
|
303
|
+
end
|
304
|
+
end
|
305
|
+
|
306
|
+
class StyleSetting
|
307
|
+
# @private
|
308
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
309
|
+
property :kind, as: 'kind'
|
310
|
+
property :marker_options, as: 'markerOptions', class: Google::Apis::FusiontablesV2::PointStyle, decorator: Google::Apis::FusiontablesV2::PointStyle::Representation
|
311
|
+
|
312
|
+
property :name, as: 'name'
|
313
|
+
property :polygon_options, as: 'polygonOptions', class: Google::Apis::FusiontablesV2::PolygonStyle, decorator: Google::Apis::FusiontablesV2::PolygonStyle::Representation
|
314
|
+
|
315
|
+
property :polyline_options, as: 'polylineOptions', class: Google::Apis::FusiontablesV2::LineStyle, decorator: Google::Apis::FusiontablesV2::LineStyle::Representation
|
316
|
+
|
317
|
+
property :style_id, as: 'styleId'
|
318
|
+
property :table_id, as: 'tableId'
|
319
|
+
end
|
320
|
+
end
|
321
|
+
|
322
|
+
class StyleSettingList
|
323
|
+
# @private
|
324
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
325
|
+
collection :items, as: 'items', class: Google::Apis::FusiontablesV2::StyleSetting, decorator: Google::Apis::FusiontablesV2::StyleSetting::Representation
|
326
|
+
|
327
|
+
property :kind, as: 'kind'
|
328
|
+
property :next_page_token, as: 'nextPageToken'
|
329
|
+
property :total_items, as: 'totalItems'
|
330
|
+
end
|
331
|
+
end
|
332
|
+
|
333
|
+
class Table
|
334
|
+
# @private
|
335
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
336
|
+
property :attribution, as: 'attribution'
|
337
|
+
property :attribution_link, as: 'attributionLink'
|
338
|
+
collection :base_table_ids, as: 'baseTableIds'
|
339
|
+
property :column_properties_json_schema, as: 'columnPropertiesJsonSchema'
|
340
|
+
collection :columns, as: 'columns', class: Google::Apis::FusiontablesV2::Column, decorator: Google::Apis::FusiontablesV2::Column::Representation
|
341
|
+
|
342
|
+
property :description, as: 'description'
|
343
|
+
property :is_exportable, as: 'isExportable'
|
344
|
+
property :kind, as: 'kind'
|
345
|
+
property :name, as: 'name'
|
346
|
+
property :sql, as: 'sql'
|
347
|
+
property :table_id, as: 'tableId'
|
348
|
+
property :table_properties_json, as: 'tablePropertiesJson'
|
349
|
+
property :table_properties_json_schema, as: 'tablePropertiesJsonSchema'
|
350
|
+
end
|
351
|
+
end
|
352
|
+
|
353
|
+
class TableList
|
354
|
+
# @private
|
355
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
356
|
+
collection :items, as: 'items', class: Google::Apis::FusiontablesV2::Table, decorator: Google::Apis::FusiontablesV2::Table::Representation
|
357
|
+
|
358
|
+
property :kind, as: 'kind'
|
359
|
+
property :next_page_token, as: 'nextPageToken'
|
360
|
+
end
|
361
|
+
end
|
362
|
+
|
363
|
+
class Task
|
364
|
+
# @private
|
365
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
366
|
+
property :kind, as: 'kind'
|
367
|
+
property :progress, as: 'progress'
|
368
|
+
property :started, as: 'started'
|
369
|
+
property :task_id, as: 'taskId'
|
370
|
+
property :type, as: 'type'
|
371
|
+
end
|
372
|
+
end
|
373
|
+
|
374
|
+
class TaskList
|
375
|
+
# @private
|
376
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
377
|
+
collection :items, as: 'items', class: Google::Apis::FusiontablesV2::Task, decorator: Google::Apis::FusiontablesV2::Task::Representation
|
378
|
+
|
379
|
+
property :kind, as: 'kind'
|
380
|
+
property :next_page_token, as: 'nextPageToken'
|
381
|
+
property :total_items, as: 'totalItems'
|
382
|
+
end
|
383
|
+
end
|
384
|
+
|
385
|
+
class Template
|
386
|
+
# @private
|
387
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
388
|
+
collection :automatic_column_names, as: 'automaticColumnNames'
|
389
|
+
property :body, as: 'body'
|
390
|
+
property :kind, as: 'kind'
|
391
|
+
property :name, as: 'name'
|
392
|
+
property :table_id, as: 'tableId'
|
393
|
+
property :template_id, as: 'templateId'
|
394
|
+
end
|
395
|
+
end
|
396
|
+
|
397
|
+
class TemplateList
|
398
|
+
# @private
|
399
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
400
|
+
collection :items, as: 'items', class: Google::Apis::FusiontablesV2::Template, decorator: Google::Apis::FusiontablesV2::Template::Representation
|
401
|
+
|
402
|
+
property :kind, as: 'kind'
|
403
|
+
property :next_page_token, as: 'nextPageToken'
|
404
|
+
property :total_items, as: 'totalItems'
|
405
|
+
end
|
406
|
+
end
|
407
|
+
end
|
408
|
+
end
|
409
|
+
end
|
@@ -0,0 +1,1496 @@
|
|
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 FusiontablesV2
|
23
|
+
# Fusion Tables API
|
24
|
+
#
|
25
|
+
# API for working with Fusion Tables data.
|
26
|
+
#
|
27
|
+
# @example
|
28
|
+
# require 'google/apis/fusiontables_v2'
|
29
|
+
#
|
30
|
+
# Fusiontables = Google::Apis::FusiontablesV2 # Alias the module
|
31
|
+
# service = Fusiontables::FusiontablesService.new
|
32
|
+
#
|
33
|
+
# @see https://developers.google.com/fusiontables
|
34
|
+
class FusiontablesService < 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/', 'fusiontables/v2/')
|
53
|
+
end
|
54
|
+
|
55
|
+
# Deletes the specified column.
|
56
|
+
# @param [String] table_id
|
57
|
+
# Table from which the column is being deleted.
|
58
|
+
# @param [String] column_id
|
59
|
+
# Name or identifier for the column being deleted.
|
60
|
+
# @param [String] fields
|
61
|
+
# Selector specifying which fields to include in a partial response.
|
62
|
+
# @param [String] quota_user
|
63
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
64
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
65
|
+
# Overrides userIp if both are provided.
|
66
|
+
# @param [String] user_ip
|
67
|
+
# IP address of the site where the request originates. Use this if you want to
|
68
|
+
# enforce per-user limits.
|
69
|
+
# @param [Google::Apis::RequestOptions] options
|
70
|
+
# Request-specific options
|
71
|
+
#
|
72
|
+
# @yield [result, err] Result & error if block supplied
|
73
|
+
# @yieldparam result [NilClass] No result returned for this method
|
74
|
+
# @yieldparam err [StandardError] error object if request failed
|
75
|
+
#
|
76
|
+
# @return [void]
|
77
|
+
#
|
78
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
79
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
80
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
81
|
+
def delete_column(table_id, column_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
82
|
+
path = 'tables/{tableId}/columns/{columnId}'
|
83
|
+
command = make_simple_command(:delete, path, options)
|
84
|
+
command.params['tableId'] = table_id unless table_id.nil?
|
85
|
+
command.params['columnId'] = column_id unless column_id.nil?
|
86
|
+
command.query['fields'] = fields unless fields.nil?
|
87
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
88
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
89
|
+
execute_or_queue_command(command, &block)
|
90
|
+
end
|
91
|
+
|
92
|
+
# Retrieves a specific column by its ID.
|
93
|
+
# @param [String] table_id
|
94
|
+
# Table to which the column belongs.
|
95
|
+
# @param [String] column_id
|
96
|
+
# Name or identifier for the column that is being requested.
|
97
|
+
# @param [String] fields
|
98
|
+
# Selector specifying which fields to include in a partial response.
|
99
|
+
# @param [String] quota_user
|
100
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
101
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
102
|
+
# Overrides userIp if both are provided.
|
103
|
+
# @param [String] user_ip
|
104
|
+
# IP address of the site where the request originates. Use this if you want to
|
105
|
+
# enforce per-user limits.
|
106
|
+
# @param [Google::Apis::RequestOptions] options
|
107
|
+
# Request-specific options
|
108
|
+
#
|
109
|
+
# @yield [result, err] Result & error if block supplied
|
110
|
+
# @yieldparam result [Google::Apis::FusiontablesV2::Column] parsed result object
|
111
|
+
# @yieldparam err [StandardError] error object if request failed
|
112
|
+
#
|
113
|
+
# @return [Google::Apis::FusiontablesV2::Column]
|
114
|
+
#
|
115
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
116
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
117
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
118
|
+
def get_column(table_id, column_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
119
|
+
path = 'tables/{tableId}/columns/{columnId}'
|
120
|
+
command = make_simple_command(:get, path, options)
|
121
|
+
command.response_representation = Google::Apis::FusiontablesV2::Column::Representation
|
122
|
+
command.response_class = Google::Apis::FusiontablesV2::Column
|
123
|
+
command.params['tableId'] = table_id unless table_id.nil?
|
124
|
+
command.params['columnId'] = column_id unless column_id.nil?
|
125
|
+
command.query['fields'] = fields unless fields.nil?
|
126
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
127
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
128
|
+
execute_or_queue_command(command, &block)
|
129
|
+
end
|
130
|
+
|
131
|
+
# Adds a new column to the table.
|
132
|
+
# @param [String] table_id
|
133
|
+
# Table for which a new column is being added.
|
134
|
+
# @param [Google::Apis::FusiontablesV2::Column] column_object
|
135
|
+
# @param [String] fields
|
136
|
+
# Selector specifying which fields to include in a partial response.
|
137
|
+
# @param [String] quota_user
|
138
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
139
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
140
|
+
# Overrides userIp if both are provided.
|
141
|
+
# @param [String] user_ip
|
142
|
+
# IP address of the site where the request originates. Use this if you want to
|
143
|
+
# enforce per-user limits.
|
144
|
+
# @param [Google::Apis::RequestOptions] options
|
145
|
+
# Request-specific options
|
146
|
+
#
|
147
|
+
# @yield [result, err] Result & error if block supplied
|
148
|
+
# @yieldparam result [Google::Apis::FusiontablesV2::Column] parsed result object
|
149
|
+
# @yieldparam err [StandardError] error object if request failed
|
150
|
+
#
|
151
|
+
# @return [Google::Apis::FusiontablesV2::Column]
|
152
|
+
#
|
153
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
154
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
155
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
156
|
+
def insert_column(table_id, column_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
157
|
+
path = 'tables/{tableId}/columns'
|
158
|
+
command = make_simple_command(:post, path, options)
|
159
|
+
command.request_representation = Google::Apis::FusiontablesV2::Column::Representation
|
160
|
+
command.request_object = column_object
|
161
|
+
command.response_representation = Google::Apis::FusiontablesV2::Column::Representation
|
162
|
+
command.response_class = Google::Apis::FusiontablesV2::Column
|
163
|
+
command.params['tableId'] = table_id unless table_id.nil?
|
164
|
+
command.query['fields'] = fields unless fields.nil?
|
165
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
166
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
167
|
+
execute_or_queue_command(command, &block)
|
168
|
+
end
|
169
|
+
|
170
|
+
# Retrieves a list of columns.
|
171
|
+
# @param [String] table_id
|
172
|
+
# Table whose columns are being listed.
|
173
|
+
# @param [Fixnum] max_results
|
174
|
+
# Maximum number of columns to return. Default is 5.
|
175
|
+
# @param [String] page_token
|
176
|
+
# Continuation token specifying which result page to return.
|
177
|
+
# @param [String] fields
|
178
|
+
# Selector specifying which fields to include in a partial response.
|
179
|
+
# @param [String] quota_user
|
180
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
181
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
182
|
+
# Overrides userIp if both are provided.
|
183
|
+
# @param [String] user_ip
|
184
|
+
# IP address of the site where the request originates. Use this if you want to
|
185
|
+
# enforce per-user limits.
|
186
|
+
# @param [Google::Apis::RequestOptions] options
|
187
|
+
# Request-specific options
|
188
|
+
#
|
189
|
+
# @yield [result, err] Result & error if block supplied
|
190
|
+
# @yieldparam result [Google::Apis::FusiontablesV2::ColumnList] parsed result object
|
191
|
+
# @yieldparam err [StandardError] error object if request failed
|
192
|
+
#
|
193
|
+
# @return [Google::Apis::FusiontablesV2::ColumnList]
|
194
|
+
#
|
195
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
196
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
197
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
198
|
+
def list_columns(table_id, max_results: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
199
|
+
path = 'tables/{tableId}/columns'
|
200
|
+
command = make_simple_command(:get, path, options)
|
201
|
+
command.response_representation = Google::Apis::FusiontablesV2::ColumnList::Representation
|
202
|
+
command.response_class = Google::Apis::FusiontablesV2::ColumnList
|
203
|
+
command.params['tableId'] = table_id unless table_id.nil?
|
204
|
+
command.query['maxResults'] = max_results unless max_results.nil?
|
205
|
+
command.query['pageToken'] = page_token unless page_token.nil?
|
206
|
+
command.query['fields'] = fields unless fields.nil?
|
207
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
208
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
209
|
+
execute_or_queue_command(command, &block)
|
210
|
+
end
|
211
|
+
|
212
|
+
# Updates the name or type of an existing column. This method supports patch
|
213
|
+
# semantics.
|
214
|
+
# @param [String] table_id
|
215
|
+
# Table for which the column is being updated.
|
216
|
+
# @param [String] column_id
|
217
|
+
# Name or identifier for the column that is being updated.
|
218
|
+
# @param [Google::Apis::FusiontablesV2::Column] column_object
|
219
|
+
# @param [String] fields
|
220
|
+
# Selector specifying which fields to include in a partial response.
|
221
|
+
# @param [String] quota_user
|
222
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
223
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
224
|
+
# Overrides userIp if both are provided.
|
225
|
+
# @param [String] user_ip
|
226
|
+
# IP address of the site where the request originates. Use this if you want to
|
227
|
+
# enforce per-user limits.
|
228
|
+
# @param [Google::Apis::RequestOptions] options
|
229
|
+
# Request-specific options
|
230
|
+
#
|
231
|
+
# @yield [result, err] Result & error if block supplied
|
232
|
+
# @yieldparam result [Google::Apis::FusiontablesV2::Column] parsed result object
|
233
|
+
# @yieldparam err [StandardError] error object if request failed
|
234
|
+
#
|
235
|
+
# @return [Google::Apis::FusiontablesV2::Column]
|
236
|
+
#
|
237
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
238
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
239
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
240
|
+
def patch_column(table_id, column_id, column_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
241
|
+
path = 'tables/{tableId}/columns/{columnId}'
|
242
|
+
command = make_simple_command(:patch, path, options)
|
243
|
+
command.request_representation = Google::Apis::FusiontablesV2::Column::Representation
|
244
|
+
command.request_object = column_object
|
245
|
+
command.response_representation = Google::Apis::FusiontablesV2::Column::Representation
|
246
|
+
command.response_class = Google::Apis::FusiontablesV2::Column
|
247
|
+
command.params['tableId'] = table_id unless table_id.nil?
|
248
|
+
command.params['columnId'] = column_id unless column_id.nil?
|
249
|
+
command.query['fields'] = fields unless fields.nil?
|
250
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
251
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
252
|
+
execute_or_queue_command(command, &block)
|
253
|
+
end
|
254
|
+
|
255
|
+
# Updates the name or type of an existing column.
|
256
|
+
# @param [String] table_id
|
257
|
+
# Table for which the column is being updated.
|
258
|
+
# @param [String] column_id
|
259
|
+
# Name or identifier for the column that is being updated.
|
260
|
+
# @param [Google::Apis::FusiontablesV2::Column] column_object
|
261
|
+
# @param [String] fields
|
262
|
+
# Selector specifying which fields to include in a partial response.
|
263
|
+
# @param [String] quota_user
|
264
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
265
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
266
|
+
# Overrides userIp if both are provided.
|
267
|
+
# @param [String] user_ip
|
268
|
+
# IP address of the site where the request originates. Use this if you want to
|
269
|
+
# enforce per-user limits.
|
270
|
+
# @param [Google::Apis::RequestOptions] options
|
271
|
+
# Request-specific options
|
272
|
+
#
|
273
|
+
# @yield [result, err] Result & error if block supplied
|
274
|
+
# @yieldparam result [Google::Apis::FusiontablesV2::Column] parsed result object
|
275
|
+
# @yieldparam err [StandardError] error object if request failed
|
276
|
+
#
|
277
|
+
# @return [Google::Apis::FusiontablesV2::Column]
|
278
|
+
#
|
279
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
280
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
281
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
282
|
+
def update_column(table_id, column_id, column_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
283
|
+
path = 'tables/{tableId}/columns/{columnId}'
|
284
|
+
command = make_simple_command(:put, path, options)
|
285
|
+
command.request_representation = Google::Apis::FusiontablesV2::Column::Representation
|
286
|
+
command.request_object = column_object
|
287
|
+
command.response_representation = Google::Apis::FusiontablesV2::Column::Representation
|
288
|
+
command.response_class = Google::Apis::FusiontablesV2::Column
|
289
|
+
command.params['tableId'] = table_id unless table_id.nil?
|
290
|
+
command.params['columnId'] = column_id unless column_id.nil?
|
291
|
+
command.query['fields'] = fields unless fields.nil?
|
292
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
293
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
294
|
+
execute_or_queue_command(command, &block)
|
295
|
+
end
|
296
|
+
|
297
|
+
# Executes a Fusion Tables SQL statement, which can be any of
|
298
|
+
# - SELECT
|
299
|
+
# - INSERT
|
300
|
+
# - UPDATE
|
301
|
+
# - DELETE
|
302
|
+
# - SHOW
|
303
|
+
# - DESCRIBE
|
304
|
+
# - CREATE statement.
|
305
|
+
# @param [Boolean] hdrs
|
306
|
+
# Whether column names are included in the first row. Default is true.
|
307
|
+
# @param [String] sql
|
308
|
+
# A Fusion Tables SQL statement, which can be any of
|
309
|
+
# - SELECT
|
310
|
+
# - INSERT
|
311
|
+
# - UPDATE
|
312
|
+
# - DELETE
|
313
|
+
# - SHOW
|
314
|
+
# - DESCRIBE
|
315
|
+
# - CREATE
|
316
|
+
# @param [Boolean] typed
|
317
|
+
# Whether typed values are returned in the (JSON) response: numbers for numeric
|
318
|
+
# values and parsed geometries for KML values. Default is true.
|
319
|
+
# @param [String] fields
|
320
|
+
# Selector specifying which fields to include in a partial response.
|
321
|
+
# @param [String] quota_user
|
322
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
323
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
324
|
+
# Overrides userIp if both are provided.
|
325
|
+
# @param [String] user_ip
|
326
|
+
# IP address of the site where the request originates. Use this if you want to
|
327
|
+
# enforce per-user limits.
|
328
|
+
# @param [IO, String] download_dest
|
329
|
+
# IO stream or filename to receive content download
|
330
|
+
# @param [Google::Apis::RequestOptions] options
|
331
|
+
# Request-specific options
|
332
|
+
#
|
333
|
+
# @yield [result, err] Result & error if block supplied
|
334
|
+
# @yieldparam result [Google::Apis::FusiontablesV2::Sqlresponse] parsed result object
|
335
|
+
# @yieldparam err [StandardError] error object if request failed
|
336
|
+
#
|
337
|
+
# @return [Google::Apis::FusiontablesV2::Sqlresponse]
|
338
|
+
#
|
339
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
340
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
341
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
342
|
+
def sql_query(hdrs: nil, sql: nil, typed: nil, fields: nil, quota_user: nil, user_ip: nil, download_dest: nil, options: nil, &block)
|
343
|
+
path = 'query'
|
344
|
+
if download_dest.nil?
|
345
|
+
command = make_simple_command(:post, path, options)
|
346
|
+
else
|
347
|
+
command = make_download_command(:post, path, options)
|
348
|
+
command.download_dest = download_dest
|
349
|
+
end
|
350
|
+
command.response_representation = Google::Apis::FusiontablesV2::Sqlresponse::Representation
|
351
|
+
command.response_class = Google::Apis::FusiontablesV2::Sqlresponse
|
352
|
+
command.query['hdrs'] = hdrs unless hdrs.nil?
|
353
|
+
command.query['sql'] = sql unless sql.nil?
|
354
|
+
command.query['typed'] = typed unless typed.nil?
|
355
|
+
command.query['fields'] = fields unless fields.nil?
|
356
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
357
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
358
|
+
execute_or_queue_command(command, &block)
|
359
|
+
end
|
360
|
+
|
361
|
+
# Executes a SQL statement which can be any of
|
362
|
+
# - SELECT
|
363
|
+
# - SHOW
|
364
|
+
# - DESCRIBE
|
365
|
+
# @param [Boolean] hdrs
|
366
|
+
# Whether column names are included (in the first row). Default is true.
|
367
|
+
# @param [String] sql
|
368
|
+
# A SQL statement which can be any of
|
369
|
+
# - SELECT
|
370
|
+
# - SHOW
|
371
|
+
# - DESCRIBE
|
372
|
+
# @param [Boolean] typed
|
373
|
+
# Whether typed values are returned in the (JSON) response: numbers for numeric
|
374
|
+
# values and parsed geometries for KML values. Default is true.
|
375
|
+
# @param [String] fields
|
376
|
+
# Selector specifying which fields to include in a partial response.
|
377
|
+
# @param [String] quota_user
|
378
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
379
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
380
|
+
# Overrides userIp if both are provided.
|
381
|
+
# @param [String] user_ip
|
382
|
+
# IP address of the site where the request originates. Use this if you want to
|
383
|
+
# enforce per-user limits.
|
384
|
+
# @param [IO, String] download_dest
|
385
|
+
# IO stream or filename to receive content download
|
386
|
+
# @param [Google::Apis::RequestOptions] options
|
387
|
+
# Request-specific options
|
388
|
+
#
|
389
|
+
# @yield [result, err] Result & error if block supplied
|
390
|
+
# @yieldparam result [Google::Apis::FusiontablesV2::Sqlresponse] parsed result object
|
391
|
+
# @yieldparam err [StandardError] error object if request failed
|
392
|
+
#
|
393
|
+
# @return [Google::Apis::FusiontablesV2::Sqlresponse]
|
394
|
+
#
|
395
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
396
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
397
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
398
|
+
def sql_get_query(hdrs: nil, sql: nil, typed: nil, fields: nil, quota_user: nil, user_ip: nil, download_dest: nil, options: nil, &block)
|
399
|
+
path = 'query'
|
400
|
+
if download_dest.nil?
|
401
|
+
command = make_simple_command(:get, path, options)
|
402
|
+
else
|
403
|
+
command = make_download_command(:get, path, options)
|
404
|
+
command.download_dest = download_dest
|
405
|
+
end
|
406
|
+
command.response_representation = Google::Apis::FusiontablesV2::Sqlresponse::Representation
|
407
|
+
command.response_class = Google::Apis::FusiontablesV2::Sqlresponse
|
408
|
+
command.query['hdrs'] = hdrs unless hdrs.nil?
|
409
|
+
command.query['sql'] = sql unless sql.nil?
|
410
|
+
command.query['typed'] = typed unless typed.nil?
|
411
|
+
command.query['fields'] = fields unless fields.nil?
|
412
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
413
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
414
|
+
execute_or_queue_command(command, &block)
|
415
|
+
end
|
416
|
+
|
417
|
+
# Deletes a style.
|
418
|
+
# @param [String] table_id
|
419
|
+
# Table from which the style is being deleted
|
420
|
+
# @param [Fixnum] style_id
|
421
|
+
# Identifier (within a table) for the style being deleted
|
422
|
+
# @param [String] fields
|
423
|
+
# Selector specifying which fields to include in a partial response.
|
424
|
+
# @param [String] quota_user
|
425
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
426
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
427
|
+
# Overrides userIp if both are provided.
|
428
|
+
# @param [String] user_ip
|
429
|
+
# IP address of the site where the request originates. Use this if you want to
|
430
|
+
# enforce per-user limits.
|
431
|
+
# @param [Google::Apis::RequestOptions] options
|
432
|
+
# Request-specific options
|
433
|
+
#
|
434
|
+
# @yield [result, err] Result & error if block supplied
|
435
|
+
# @yieldparam result [NilClass] No result returned for this method
|
436
|
+
# @yieldparam err [StandardError] error object if request failed
|
437
|
+
#
|
438
|
+
# @return [void]
|
439
|
+
#
|
440
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
441
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
442
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
443
|
+
def delete_style(table_id, style_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
444
|
+
path = 'tables/{tableId}/styles/{styleId}'
|
445
|
+
command = make_simple_command(:delete, path, options)
|
446
|
+
command.params['tableId'] = table_id unless table_id.nil?
|
447
|
+
command.params['styleId'] = style_id unless style_id.nil?
|
448
|
+
command.query['fields'] = fields unless fields.nil?
|
449
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
450
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
451
|
+
execute_or_queue_command(command, &block)
|
452
|
+
end
|
453
|
+
|
454
|
+
# Gets a specific style.
|
455
|
+
# @param [String] table_id
|
456
|
+
# Table to which the requested style belongs
|
457
|
+
# @param [Fixnum] style_id
|
458
|
+
# Identifier (integer) for a specific style in a table
|
459
|
+
# @param [String] fields
|
460
|
+
# Selector specifying which fields to include in a partial response.
|
461
|
+
# @param [String] quota_user
|
462
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
463
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
464
|
+
# Overrides userIp if both are provided.
|
465
|
+
# @param [String] user_ip
|
466
|
+
# IP address of the site where the request originates. Use this if you want to
|
467
|
+
# enforce per-user limits.
|
468
|
+
# @param [Google::Apis::RequestOptions] options
|
469
|
+
# Request-specific options
|
470
|
+
#
|
471
|
+
# @yield [result, err] Result & error if block supplied
|
472
|
+
# @yieldparam result [Google::Apis::FusiontablesV2::StyleSetting] parsed result object
|
473
|
+
# @yieldparam err [StandardError] error object if request failed
|
474
|
+
#
|
475
|
+
# @return [Google::Apis::FusiontablesV2::StyleSetting]
|
476
|
+
#
|
477
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
478
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
479
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
480
|
+
def get_style(table_id, style_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
481
|
+
path = 'tables/{tableId}/styles/{styleId}'
|
482
|
+
command = make_simple_command(:get, path, options)
|
483
|
+
command.response_representation = Google::Apis::FusiontablesV2::StyleSetting::Representation
|
484
|
+
command.response_class = Google::Apis::FusiontablesV2::StyleSetting
|
485
|
+
command.params['tableId'] = table_id unless table_id.nil?
|
486
|
+
command.params['styleId'] = style_id unless style_id.nil?
|
487
|
+
command.query['fields'] = fields unless fields.nil?
|
488
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
489
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
490
|
+
execute_or_queue_command(command, &block)
|
491
|
+
end
|
492
|
+
|
493
|
+
# Adds a new style for the table.
|
494
|
+
# @param [String] table_id
|
495
|
+
# Table for which a new style is being added
|
496
|
+
# @param [Google::Apis::FusiontablesV2::StyleSetting] style_setting_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::FusiontablesV2::StyleSetting] parsed result object
|
511
|
+
# @yieldparam err [StandardError] error object if request failed
|
512
|
+
#
|
513
|
+
# @return [Google::Apis::FusiontablesV2::StyleSetting]
|
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 insert_style(table_id, style_setting_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
519
|
+
path = 'tables/{tableId}/styles'
|
520
|
+
command = make_simple_command(:post, path, options)
|
521
|
+
command.request_representation = Google::Apis::FusiontablesV2::StyleSetting::Representation
|
522
|
+
command.request_object = style_setting_object
|
523
|
+
command.response_representation = Google::Apis::FusiontablesV2::StyleSetting::Representation
|
524
|
+
command.response_class = Google::Apis::FusiontablesV2::StyleSetting
|
525
|
+
command.params['tableId'] = table_id unless table_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
|
+
# Retrieves a list of styles.
|
533
|
+
# @param [String] table_id
|
534
|
+
# Table whose styles are being listed
|
535
|
+
# @param [Fixnum] max_results
|
536
|
+
# Maximum number of styles to return. Optional. Default is 5.
|
537
|
+
# @param [String] page_token
|
538
|
+
# Continuation token specifying which result page to return. Optional.
|
539
|
+
# @param [String] fields
|
540
|
+
# Selector specifying which fields to include in a partial response.
|
541
|
+
# @param [String] quota_user
|
542
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
543
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
544
|
+
# Overrides userIp if both are provided.
|
545
|
+
# @param [String] user_ip
|
546
|
+
# IP address of the site where the request originates. Use this if you want to
|
547
|
+
# enforce per-user limits.
|
548
|
+
# @param [Google::Apis::RequestOptions] options
|
549
|
+
# Request-specific options
|
550
|
+
#
|
551
|
+
# @yield [result, err] Result & error if block supplied
|
552
|
+
# @yieldparam result [Google::Apis::FusiontablesV2::StyleSettingList] parsed result object
|
553
|
+
# @yieldparam err [StandardError] error object if request failed
|
554
|
+
#
|
555
|
+
# @return [Google::Apis::FusiontablesV2::StyleSettingList]
|
556
|
+
#
|
557
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
558
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
559
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
560
|
+
def list_styles(table_id, max_results: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
561
|
+
path = 'tables/{tableId}/styles'
|
562
|
+
command = make_simple_command(:get, path, options)
|
563
|
+
command.response_representation = Google::Apis::FusiontablesV2::StyleSettingList::Representation
|
564
|
+
command.response_class = Google::Apis::FusiontablesV2::StyleSettingList
|
565
|
+
command.params['tableId'] = table_id unless table_id.nil?
|
566
|
+
command.query['maxResults'] = max_results unless max_results.nil?
|
567
|
+
command.query['pageToken'] = page_token unless page_token.nil?
|
568
|
+
command.query['fields'] = fields unless fields.nil?
|
569
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
570
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
571
|
+
execute_or_queue_command(command, &block)
|
572
|
+
end
|
573
|
+
|
574
|
+
# Updates an existing style. This method supports patch semantics.
|
575
|
+
# @param [String] table_id
|
576
|
+
# Table whose style is being updated.
|
577
|
+
# @param [Fixnum] style_id
|
578
|
+
# Identifier (within a table) for the style being updated.
|
579
|
+
# @param [Google::Apis::FusiontablesV2::StyleSetting] style_setting_object
|
580
|
+
# @param [String] fields
|
581
|
+
# Selector specifying which fields to include in a partial response.
|
582
|
+
# @param [String] quota_user
|
583
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
584
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
585
|
+
# Overrides userIp if both are provided.
|
586
|
+
# @param [String] user_ip
|
587
|
+
# IP address of the site where the request originates. Use this if you want to
|
588
|
+
# enforce per-user limits.
|
589
|
+
# @param [Google::Apis::RequestOptions] options
|
590
|
+
# Request-specific options
|
591
|
+
#
|
592
|
+
# @yield [result, err] Result & error if block supplied
|
593
|
+
# @yieldparam result [Google::Apis::FusiontablesV2::StyleSetting] parsed result object
|
594
|
+
# @yieldparam err [StandardError] error object if request failed
|
595
|
+
#
|
596
|
+
# @return [Google::Apis::FusiontablesV2::StyleSetting]
|
597
|
+
#
|
598
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
599
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
600
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
601
|
+
def patch_style(table_id, style_id, style_setting_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
602
|
+
path = 'tables/{tableId}/styles/{styleId}'
|
603
|
+
command = make_simple_command(:patch, path, options)
|
604
|
+
command.request_representation = Google::Apis::FusiontablesV2::StyleSetting::Representation
|
605
|
+
command.request_object = style_setting_object
|
606
|
+
command.response_representation = Google::Apis::FusiontablesV2::StyleSetting::Representation
|
607
|
+
command.response_class = Google::Apis::FusiontablesV2::StyleSetting
|
608
|
+
command.params['tableId'] = table_id unless table_id.nil?
|
609
|
+
command.params['styleId'] = style_id unless style_id.nil?
|
610
|
+
command.query['fields'] = fields unless fields.nil?
|
611
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
612
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
613
|
+
execute_or_queue_command(command, &block)
|
614
|
+
end
|
615
|
+
|
616
|
+
# Updates an existing style.
|
617
|
+
# @param [String] table_id
|
618
|
+
# Table whose style is being updated.
|
619
|
+
# @param [Fixnum] style_id
|
620
|
+
# Identifier (within a table) for the style being updated.
|
621
|
+
# @param [Google::Apis::FusiontablesV2::StyleSetting] style_setting_object
|
622
|
+
# @param [String] fields
|
623
|
+
# Selector specifying which fields to include in a partial response.
|
624
|
+
# @param [String] quota_user
|
625
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
626
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
627
|
+
# Overrides userIp if both are provided.
|
628
|
+
# @param [String] user_ip
|
629
|
+
# IP address of the site where the request originates. Use this if you want to
|
630
|
+
# enforce per-user limits.
|
631
|
+
# @param [Google::Apis::RequestOptions] options
|
632
|
+
# Request-specific options
|
633
|
+
#
|
634
|
+
# @yield [result, err] Result & error if block supplied
|
635
|
+
# @yieldparam result [Google::Apis::FusiontablesV2::StyleSetting] parsed result object
|
636
|
+
# @yieldparam err [StandardError] error object if request failed
|
637
|
+
#
|
638
|
+
# @return [Google::Apis::FusiontablesV2::StyleSetting]
|
639
|
+
#
|
640
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
641
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
642
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
643
|
+
def update_style(table_id, style_id, style_setting_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
644
|
+
path = 'tables/{tableId}/styles/{styleId}'
|
645
|
+
command = make_simple_command(:put, path, options)
|
646
|
+
command.request_representation = Google::Apis::FusiontablesV2::StyleSetting::Representation
|
647
|
+
command.request_object = style_setting_object
|
648
|
+
command.response_representation = Google::Apis::FusiontablesV2::StyleSetting::Representation
|
649
|
+
command.response_class = Google::Apis::FusiontablesV2::StyleSetting
|
650
|
+
command.params['tableId'] = table_id unless table_id.nil?
|
651
|
+
command.params['styleId'] = style_id unless style_id.nil?
|
652
|
+
command.query['fields'] = fields unless fields.nil?
|
653
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
654
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
655
|
+
execute_or_queue_command(command, &block)
|
656
|
+
end
|
657
|
+
|
658
|
+
# Copies a table.
|
659
|
+
# @param [String] table_id
|
660
|
+
# ID of the table that is being copied.
|
661
|
+
# @param [Boolean] copy_presentation
|
662
|
+
# Whether to also copy tabs, styles, and templates. Default is false.
|
663
|
+
# @param [String] fields
|
664
|
+
# Selector specifying which fields to include in a partial response.
|
665
|
+
# @param [String] quota_user
|
666
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
667
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
668
|
+
# Overrides userIp if both are provided.
|
669
|
+
# @param [String] user_ip
|
670
|
+
# IP address of the site where the request originates. Use this if you want to
|
671
|
+
# enforce per-user limits.
|
672
|
+
# @param [Google::Apis::RequestOptions] options
|
673
|
+
# Request-specific options
|
674
|
+
#
|
675
|
+
# @yield [result, err] Result & error if block supplied
|
676
|
+
# @yieldparam result [Google::Apis::FusiontablesV2::Table] parsed result object
|
677
|
+
# @yieldparam err [StandardError] error object if request failed
|
678
|
+
#
|
679
|
+
# @return [Google::Apis::FusiontablesV2::Table]
|
680
|
+
#
|
681
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
682
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
683
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
684
|
+
def copy_table(table_id, copy_presentation: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
685
|
+
path = 'tables/{tableId}/copy'
|
686
|
+
command = make_simple_command(:post, path, options)
|
687
|
+
command.response_representation = Google::Apis::FusiontablesV2::Table::Representation
|
688
|
+
command.response_class = Google::Apis::FusiontablesV2::Table
|
689
|
+
command.params['tableId'] = table_id unless table_id.nil?
|
690
|
+
command.query['copyPresentation'] = copy_presentation unless copy_presentation.nil?
|
691
|
+
command.query['fields'] = fields unless fields.nil?
|
692
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
693
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
694
|
+
execute_or_queue_command(command, &block)
|
695
|
+
end
|
696
|
+
|
697
|
+
# Deletes a table.
|
698
|
+
# @param [String] table_id
|
699
|
+
# ID of the table to be deleted.
|
700
|
+
# @param [String] fields
|
701
|
+
# Selector specifying which fields to include in a partial response.
|
702
|
+
# @param [String] quota_user
|
703
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
704
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
705
|
+
# Overrides userIp if both are provided.
|
706
|
+
# @param [String] user_ip
|
707
|
+
# IP address of the site where the request originates. Use this if you want to
|
708
|
+
# enforce per-user limits.
|
709
|
+
# @param [Google::Apis::RequestOptions] options
|
710
|
+
# Request-specific options
|
711
|
+
#
|
712
|
+
# @yield [result, err] Result & error if block supplied
|
713
|
+
# @yieldparam result [NilClass] No result returned for this method
|
714
|
+
# @yieldparam err [StandardError] error object if request failed
|
715
|
+
#
|
716
|
+
# @return [void]
|
717
|
+
#
|
718
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
719
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
720
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
721
|
+
def delete_table(table_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
722
|
+
path = 'tables/{tableId}'
|
723
|
+
command = make_simple_command(:delete, path, options)
|
724
|
+
command.params['tableId'] = table_id unless table_id.nil?
|
725
|
+
command.query['fields'] = fields unless fields.nil?
|
726
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
727
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
728
|
+
execute_or_queue_command(command, &block)
|
729
|
+
end
|
730
|
+
|
731
|
+
# Retrieves a specific table by its ID.
|
732
|
+
# @param [String] table_id
|
733
|
+
# Identifier for the table being requested.
|
734
|
+
# @param [String] fields
|
735
|
+
# Selector specifying which fields to include in a partial response.
|
736
|
+
# @param [String] quota_user
|
737
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
738
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
739
|
+
# Overrides userIp if both are provided.
|
740
|
+
# @param [String] user_ip
|
741
|
+
# IP address of the site where the request originates. Use this if you want to
|
742
|
+
# enforce per-user limits.
|
743
|
+
# @param [Google::Apis::RequestOptions] options
|
744
|
+
# Request-specific options
|
745
|
+
#
|
746
|
+
# @yield [result, err] Result & error if block supplied
|
747
|
+
# @yieldparam result [Google::Apis::FusiontablesV2::Table] parsed result object
|
748
|
+
# @yieldparam err [StandardError] error object if request failed
|
749
|
+
#
|
750
|
+
# @return [Google::Apis::FusiontablesV2::Table]
|
751
|
+
#
|
752
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
753
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
754
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
755
|
+
def get_table(table_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
756
|
+
path = 'tables/{tableId}'
|
757
|
+
command = make_simple_command(:get, path, options)
|
758
|
+
command.response_representation = Google::Apis::FusiontablesV2::Table::Representation
|
759
|
+
command.response_class = Google::Apis::FusiontablesV2::Table
|
760
|
+
command.params['tableId'] = table_id unless table_id.nil?
|
761
|
+
command.query['fields'] = fields unless fields.nil?
|
762
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
763
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
764
|
+
execute_or_queue_command(command, &block)
|
765
|
+
end
|
766
|
+
|
767
|
+
# Imports more rows into a table.
|
768
|
+
# @param [String] table_id
|
769
|
+
# The table into which new rows are being imported.
|
770
|
+
# @param [String] delimiter
|
771
|
+
# The delimiter used to separate cell values. This can only consist of a single
|
772
|
+
# character. Default is ,.
|
773
|
+
# @param [String] encoding
|
774
|
+
# The encoding of the content. Default is UTF-8. Use auto-detect if you are
|
775
|
+
# unsure of the encoding.
|
776
|
+
# @param [Fixnum] end_line
|
777
|
+
# The index of the line up to which data will be imported. Default is to import
|
778
|
+
# the entire file. If endLine is negative, it is an offset from the end of the
|
779
|
+
# file; the imported content will exclude the last endLine lines.
|
780
|
+
# @param [Boolean] is_strict
|
781
|
+
# Whether the imported CSV must have the same number of values for each row. If
|
782
|
+
# false, rows with fewer values will be padded with empty values. Default is
|
783
|
+
# true.
|
784
|
+
# @param [Fixnum] start_line
|
785
|
+
# The index of the first line from which to start importing, inclusive. Default
|
786
|
+
# is 0.
|
787
|
+
# @param [String] fields
|
788
|
+
# Selector specifying which fields to include in a partial response.
|
789
|
+
# @param [String] quota_user
|
790
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
791
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
792
|
+
# Overrides userIp if both are provided.
|
793
|
+
# @param [String] user_ip
|
794
|
+
# IP address of the site where the request originates. Use this if you want to
|
795
|
+
# enforce per-user limits.
|
796
|
+
# @param [IO, String] upload_source
|
797
|
+
# IO stream or filename containing content to upload
|
798
|
+
# @param [String] content_type
|
799
|
+
# Content type of the uploaded content.
|
800
|
+
# @param [Google::Apis::RequestOptions] options
|
801
|
+
# Request-specific options
|
802
|
+
#
|
803
|
+
# @yield [result, err] Result & error if block supplied
|
804
|
+
# @yieldparam result [Google::Apis::FusiontablesV2::Import] parsed result object
|
805
|
+
# @yieldparam err [StandardError] error object if request failed
|
806
|
+
#
|
807
|
+
# @return [Google::Apis::FusiontablesV2::Import]
|
808
|
+
#
|
809
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
810
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
811
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
812
|
+
def import_rows(table_id, delimiter: nil, encoding: nil, end_line: nil, is_strict: nil, start_line: nil, fields: nil, quota_user: nil, user_ip: nil, upload_source: nil, content_type: nil, options: nil, &block)
|
813
|
+
path = 'tables/{tableId}/import'
|
814
|
+
if upload_source.nil?
|
815
|
+
command = make_simple_command(:post, path, options)
|
816
|
+
else
|
817
|
+
command = make_upload_command(:post, path, options)
|
818
|
+
command.upload_source = upload_source
|
819
|
+
command.upload_content_type = content_type
|
820
|
+
end
|
821
|
+
command.response_representation = Google::Apis::FusiontablesV2::Import::Representation
|
822
|
+
command.response_class = Google::Apis::FusiontablesV2::Import
|
823
|
+
command.params['tableId'] = table_id unless table_id.nil?
|
824
|
+
command.query['delimiter'] = delimiter unless delimiter.nil?
|
825
|
+
command.query['encoding'] = encoding unless encoding.nil?
|
826
|
+
command.query['endLine'] = end_line unless end_line.nil?
|
827
|
+
command.query['isStrict'] = is_strict unless is_strict.nil?
|
828
|
+
command.query['startLine'] = start_line unless start_line.nil?
|
829
|
+
command.query['fields'] = fields unless fields.nil?
|
830
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
831
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
832
|
+
execute_or_queue_command(command, &block)
|
833
|
+
end
|
834
|
+
|
835
|
+
# Imports a new table.
|
836
|
+
# @param [String] delimiter
|
837
|
+
# The delimiter used to separate cell values. This can only consist of a single
|
838
|
+
# character. Default is ,.
|
839
|
+
# @param [String] encoding
|
840
|
+
# The encoding of the content. Default is UTF-8. Use auto-detect if you are
|
841
|
+
# unsure of the encoding.
|
842
|
+
# @param [String] name
|
843
|
+
# The name to be assigned to the new table.
|
844
|
+
# @param [String] fields
|
845
|
+
# Selector specifying which fields to include in a partial response.
|
846
|
+
# @param [String] quota_user
|
847
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
848
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
849
|
+
# Overrides userIp if both are provided.
|
850
|
+
# @param [String] user_ip
|
851
|
+
# IP address of the site where the request originates. Use this if you want to
|
852
|
+
# enforce per-user limits.
|
853
|
+
# @param [IO, String] upload_source
|
854
|
+
# IO stream or filename containing content to upload
|
855
|
+
# @param [String] content_type
|
856
|
+
# Content type of the uploaded content.
|
857
|
+
# @param [Google::Apis::RequestOptions] options
|
858
|
+
# Request-specific options
|
859
|
+
#
|
860
|
+
# @yield [result, err] Result & error if block supplied
|
861
|
+
# @yieldparam result [Google::Apis::FusiontablesV2::Table] parsed result object
|
862
|
+
# @yieldparam err [StandardError] error object if request failed
|
863
|
+
#
|
864
|
+
# @return [Google::Apis::FusiontablesV2::Table]
|
865
|
+
#
|
866
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
867
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
868
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
869
|
+
def import_table(delimiter: nil, encoding: nil, name: nil, fields: nil, quota_user: nil, user_ip: nil, upload_source: nil, content_type: nil, options: nil, &block)
|
870
|
+
path = 'tables/import'
|
871
|
+
if upload_source.nil?
|
872
|
+
command = make_simple_command(:post, path, options)
|
873
|
+
else
|
874
|
+
command = make_upload_command(:post, path, options)
|
875
|
+
command.upload_source = upload_source
|
876
|
+
command.upload_content_type = content_type
|
877
|
+
end
|
878
|
+
command.response_representation = Google::Apis::FusiontablesV2::Table::Representation
|
879
|
+
command.response_class = Google::Apis::FusiontablesV2::Table
|
880
|
+
command.query['delimiter'] = delimiter unless delimiter.nil?
|
881
|
+
command.query['encoding'] = encoding unless encoding.nil?
|
882
|
+
command.query['name'] = name unless name.nil?
|
883
|
+
command.query['fields'] = fields unless fields.nil?
|
884
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
885
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
886
|
+
execute_or_queue_command(command, &block)
|
887
|
+
end
|
888
|
+
|
889
|
+
# Creates a new table.
|
890
|
+
# @param [Google::Apis::FusiontablesV2::Table] table_object
|
891
|
+
# @param [String] fields
|
892
|
+
# Selector specifying which fields to include in a partial response.
|
893
|
+
# @param [String] quota_user
|
894
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
895
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
896
|
+
# Overrides userIp if both are provided.
|
897
|
+
# @param [String] user_ip
|
898
|
+
# IP address of the site where the request originates. Use this if you want to
|
899
|
+
# enforce per-user limits.
|
900
|
+
# @param [Google::Apis::RequestOptions] options
|
901
|
+
# Request-specific options
|
902
|
+
#
|
903
|
+
# @yield [result, err] Result & error if block supplied
|
904
|
+
# @yieldparam result [Google::Apis::FusiontablesV2::Table] parsed result object
|
905
|
+
# @yieldparam err [StandardError] error object if request failed
|
906
|
+
#
|
907
|
+
# @return [Google::Apis::FusiontablesV2::Table]
|
908
|
+
#
|
909
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
910
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
911
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
912
|
+
def insert_table(table_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
913
|
+
path = 'tables'
|
914
|
+
command = make_simple_command(:post, path, options)
|
915
|
+
command.request_representation = Google::Apis::FusiontablesV2::Table::Representation
|
916
|
+
command.request_object = table_object
|
917
|
+
command.response_representation = Google::Apis::FusiontablesV2::Table::Representation
|
918
|
+
command.response_class = Google::Apis::FusiontablesV2::Table
|
919
|
+
command.query['fields'] = fields unless fields.nil?
|
920
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
921
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
922
|
+
execute_or_queue_command(command, &block)
|
923
|
+
end
|
924
|
+
|
925
|
+
# Retrieves a list of tables a user owns.
|
926
|
+
# @param [Fixnum] max_results
|
927
|
+
# Maximum number of tables to return. Default is 5.
|
928
|
+
# @param [String] page_token
|
929
|
+
# Continuation token specifying which result page to return.
|
930
|
+
# @param [String] fields
|
931
|
+
# Selector specifying which fields to include in a partial response.
|
932
|
+
# @param [String] quota_user
|
933
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
934
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
935
|
+
# Overrides userIp if both are provided.
|
936
|
+
# @param [String] user_ip
|
937
|
+
# IP address of the site where the request originates. Use this if you want to
|
938
|
+
# enforce per-user limits.
|
939
|
+
# @param [Google::Apis::RequestOptions] options
|
940
|
+
# Request-specific options
|
941
|
+
#
|
942
|
+
# @yield [result, err] Result & error if block supplied
|
943
|
+
# @yieldparam result [Google::Apis::FusiontablesV2::TableList] parsed result object
|
944
|
+
# @yieldparam err [StandardError] error object if request failed
|
945
|
+
#
|
946
|
+
# @return [Google::Apis::FusiontablesV2::TableList]
|
947
|
+
#
|
948
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
949
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
950
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
951
|
+
def list_tables(max_results: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
952
|
+
path = 'tables'
|
953
|
+
command = make_simple_command(:get, path, options)
|
954
|
+
command.response_representation = Google::Apis::FusiontablesV2::TableList::Representation
|
955
|
+
command.response_class = Google::Apis::FusiontablesV2::TableList
|
956
|
+
command.query['maxResults'] = max_results unless max_results.nil?
|
957
|
+
command.query['pageToken'] = page_token unless page_token.nil?
|
958
|
+
command.query['fields'] = fields unless fields.nil?
|
959
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
960
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
961
|
+
execute_or_queue_command(command, &block)
|
962
|
+
end
|
963
|
+
|
964
|
+
# Updates an existing table. Unless explicitly requested, only the name,
|
965
|
+
# description, and attribution will be updated. This method supports patch
|
966
|
+
# semantics.
|
967
|
+
# @param [String] table_id
|
968
|
+
# ID of the table that is being updated.
|
969
|
+
# @param [Google::Apis::FusiontablesV2::Table] table_object
|
970
|
+
# @param [Boolean] replace_view_definition
|
971
|
+
# Whether the view definition is also updated. The specified view definition
|
972
|
+
# replaces the existing one. Only a view can be updated with a new definition.
|
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::FusiontablesV2::Table] parsed result object
|
987
|
+
# @yieldparam err [StandardError] error object if request failed
|
988
|
+
#
|
989
|
+
# @return [Google::Apis::FusiontablesV2::Table]
|
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 patch_table(table_id, table_object = nil, replace_view_definition: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
995
|
+
path = 'tables/{tableId}'
|
996
|
+
command = make_simple_command(:patch, path, options)
|
997
|
+
command.request_representation = Google::Apis::FusiontablesV2::Table::Representation
|
998
|
+
command.request_object = table_object
|
999
|
+
command.response_representation = Google::Apis::FusiontablesV2::Table::Representation
|
1000
|
+
command.response_class = Google::Apis::FusiontablesV2::Table
|
1001
|
+
command.params['tableId'] = table_id unless table_id.nil?
|
1002
|
+
command.query['replaceViewDefinition'] = replace_view_definition unless replace_view_definition.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
|
+
# Replaces rows of an existing table. Current rows remain visible until all
|
1010
|
+
# replacement rows are ready.
|
1011
|
+
# @param [String] table_id
|
1012
|
+
# Table whose rows will be replaced.
|
1013
|
+
# @param [String] delimiter
|
1014
|
+
# The delimiter used to separate cell values. This can only consist of a single
|
1015
|
+
# character. Default is ,.
|
1016
|
+
# @param [String] encoding
|
1017
|
+
# The encoding of the content. Default is UTF-8. Use 'auto-detect' if you are
|
1018
|
+
# unsure of the encoding.
|
1019
|
+
# @param [Fixnum] end_line
|
1020
|
+
# The index of the line up to which data will be imported. Default is to import
|
1021
|
+
# the entire file. If endLine is negative, it is an offset from the end of the
|
1022
|
+
# file; the imported content will exclude the last endLine lines.
|
1023
|
+
# @param [Boolean] is_strict
|
1024
|
+
# Whether the imported CSV must have the same number of column values for each
|
1025
|
+
# row. If true, throws an exception if the CSV does not have the same number of
|
1026
|
+
# columns. If false, rows with fewer column values will be padded with empty
|
1027
|
+
# values. Default is true.
|
1028
|
+
# @param [Fixnum] start_line
|
1029
|
+
# The index of the first line from which to start importing, inclusive. Default
|
1030
|
+
# is 0.
|
1031
|
+
# @param [String] fields
|
1032
|
+
# Selector specifying which fields to include in a partial response.
|
1033
|
+
# @param [String] quota_user
|
1034
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
1035
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
1036
|
+
# Overrides userIp if both are provided.
|
1037
|
+
# @param [String] user_ip
|
1038
|
+
# IP address of the site where the request originates. Use this if you want to
|
1039
|
+
# enforce per-user limits.
|
1040
|
+
# @param [IO, String] upload_source
|
1041
|
+
# IO stream or filename containing content to upload
|
1042
|
+
# @param [String] content_type
|
1043
|
+
# Content type of the uploaded content.
|
1044
|
+
# @param [Google::Apis::RequestOptions] options
|
1045
|
+
# Request-specific options
|
1046
|
+
#
|
1047
|
+
# @yield [result, err] Result & error if block supplied
|
1048
|
+
# @yieldparam result [Google::Apis::FusiontablesV2::Task] parsed result object
|
1049
|
+
# @yieldparam err [StandardError] error object if request failed
|
1050
|
+
#
|
1051
|
+
# @return [Google::Apis::FusiontablesV2::Task]
|
1052
|
+
#
|
1053
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
1054
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
1055
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
1056
|
+
def replace_rows_table(table_id, delimiter: nil, encoding: nil, end_line: nil, is_strict: nil, start_line: nil, fields: nil, quota_user: nil, user_ip: nil, upload_source: nil, content_type: nil, options: nil, &block)
|
1057
|
+
path = 'tables/{tableId}/replace'
|
1058
|
+
if upload_source.nil?
|
1059
|
+
command = make_simple_command(:post, path, options)
|
1060
|
+
else
|
1061
|
+
command = make_upload_command(:post, path, options)
|
1062
|
+
command.upload_source = upload_source
|
1063
|
+
command.upload_content_type = content_type
|
1064
|
+
end
|
1065
|
+
command.response_representation = Google::Apis::FusiontablesV2::Task::Representation
|
1066
|
+
command.response_class = Google::Apis::FusiontablesV2::Task
|
1067
|
+
command.params['tableId'] = table_id unless table_id.nil?
|
1068
|
+
command.query['delimiter'] = delimiter unless delimiter.nil?
|
1069
|
+
command.query['encoding'] = encoding unless encoding.nil?
|
1070
|
+
command.query['endLine'] = end_line unless end_line.nil?
|
1071
|
+
command.query['isStrict'] = is_strict unless is_strict.nil?
|
1072
|
+
command.query['startLine'] = start_line unless start_line.nil?
|
1073
|
+
command.query['fields'] = fields unless fields.nil?
|
1074
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
1075
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
1076
|
+
execute_or_queue_command(command, &block)
|
1077
|
+
end
|
1078
|
+
|
1079
|
+
# Updates an existing table. Unless explicitly requested, only the name,
|
1080
|
+
# description, and attribution will be updated.
|
1081
|
+
# @param [String] table_id
|
1082
|
+
# ID of the table that is being updated.
|
1083
|
+
# @param [Google::Apis::FusiontablesV2::Table] table_object
|
1084
|
+
# @param [Boolean] replace_view_definition
|
1085
|
+
# Whether the view definition is also updated. The specified view definition
|
1086
|
+
# replaces the existing one. Only a view can be updated with a new definition.
|
1087
|
+
# @param [String] fields
|
1088
|
+
# Selector specifying which fields to include in a partial response.
|
1089
|
+
# @param [String] quota_user
|
1090
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
1091
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
1092
|
+
# Overrides userIp if both are provided.
|
1093
|
+
# @param [String] user_ip
|
1094
|
+
# IP address of the site where the request originates. Use this if you want to
|
1095
|
+
# enforce per-user limits.
|
1096
|
+
# @param [Google::Apis::RequestOptions] options
|
1097
|
+
# Request-specific options
|
1098
|
+
#
|
1099
|
+
# @yield [result, err] Result & error if block supplied
|
1100
|
+
# @yieldparam result [Google::Apis::FusiontablesV2::Table] parsed result object
|
1101
|
+
# @yieldparam err [StandardError] error object if request failed
|
1102
|
+
#
|
1103
|
+
# @return [Google::Apis::FusiontablesV2::Table]
|
1104
|
+
#
|
1105
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
1106
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
1107
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
1108
|
+
def update_table(table_id, table_object = nil, replace_view_definition: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
1109
|
+
path = 'tables/{tableId}'
|
1110
|
+
command = make_simple_command(:put, path, options)
|
1111
|
+
command.request_representation = Google::Apis::FusiontablesV2::Table::Representation
|
1112
|
+
command.request_object = table_object
|
1113
|
+
command.response_representation = Google::Apis::FusiontablesV2::Table::Representation
|
1114
|
+
command.response_class = Google::Apis::FusiontablesV2::Table
|
1115
|
+
command.params['tableId'] = table_id unless table_id.nil?
|
1116
|
+
command.query['replaceViewDefinition'] = replace_view_definition unless replace_view_definition.nil?
|
1117
|
+
command.query['fields'] = fields unless fields.nil?
|
1118
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
1119
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
1120
|
+
execute_or_queue_command(command, &block)
|
1121
|
+
end
|
1122
|
+
|
1123
|
+
# Deletes a specific task by its ID, unless that task has already started
|
1124
|
+
# running.
|
1125
|
+
# @param [String] table_id
|
1126
|
+
# Table from which the task is being deleted.
|
1127
|
+
# @param [String] task_id
|
1128
|
+
# The identifier of the task to delete.
|
1129
|
+
# @param [String] fields
|
1130
|
+
# Selector specifying which fields to include in a partial response.
|
1131
|
+
# @param [String] quota_user
|
1132
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
1133
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
1134
|
+
# Overrides userIp if both are provided.
|
1135
|
+
# @param [String] user_ip
|
1136
|
+
# IP address of the site where the request originates. Use this if you want to
|
1137
|
+
# enforce per-user limits.
|
1138
|
+
# @param [Google::Apis::RequestOptions] options
|
1139
|
+
# Request-specific options
|
1140
|
+
#
|
1141
|
+
# @yield [result, err] Result & error if block supplied
|
1142
|
+
# @yieldparam result [NilClass] No result returned for this method
|
1143
|
+
# @yieldparam err [StandardError] error object if request failed
|
1144
|
+
#
|
1145
|
+
# @return [void]
|
1146
|
+
#
|
1147
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
1148
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
1149
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
1150
|
+
def delete_task(table_id, task_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
1151
|
+
path = 'tables/{tableId}/tasks/{taskId}'
|
1152
|
+
command = make_simple_command(:delete, path, options)
|
1153
|
+
command.params['tableId'] = table_id unless table_id.nil?
|
1154
|
+
command.params['taskId'] = task_id unless task_id.nil?
|
1155
|
+
command.query['fields'] = fields unless fields.nil?
|
1156
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
1157
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
1158
|
+
execute_or_queue_command(command, &block)
|
1159
|
+
end
|
1160
|
+
|
1161
|
+
# Retrieves a specific task by its ID.
|
1162
|
+
# @param [String] table_id
|
1163
|
+
# Table to which the task belongs.
|
1164
|
+
# @param [String] task_id
|
1165
|
+
# The identifier of the task to get.
|
1166
|
+
# @param [String] fields
|
1167
|
+
# Selector specifying which fields to include in a partial response.
|
1168
|
+
# @param [String] quota_user
|
1169
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
1170
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
1171
|
+
# Overrides userIp if both are provided.
|
1172
|
+
# @param [String] user_ip
|
1173
|
+
# IP address of the site where the request originates. Use this if you want to
|
1174
|
+
# enforce per-user limits.
|
1175
|
+
# @param [Google::Apis::RequestOptions] options
|
1176
|
+
# Request-specific options
|
1177
|
+
#
|
1178
|
+
# @yield [result, err] Result & error if block supplied
|
1179
|
+
# @yieldparam result [Google::Apis::FusiontablesV2::Task] parsed result object
|
1180
|
+
# @yieldparam err [StandardError] error object if request failed
|
1181
|
+
#
|
1182
|
+
# @return [Google::Apis::FusiontablesV2::Task]
|
1183
|
+
#
|
1184
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
1185
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
1186
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
1187
|
+
def get_task(table_id, task_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
1188
|
+
path = 'tables/{tableId}/tasks/{taskId}'
|
1189
|
+
command = make_simple_command(:get, path, options)
|
1190
|
+
command.response_representation = Google::Apis::FusiontablesV2::Task::Representation
|
1191
|
+
command.response_class = Google::Apis::FusiontablesV2::Task
|
1192
|
+
command.params['tableId'] = table_id unless table_id.nil?
|
1193
|
+
command.params['taskId'] = task_id unless task_id.nil?
|
1194
|
+
command.query['fields'] = fields unless fields.nil?
|
1195
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
1196
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
1197
|
+
execute_or_queue_command(command, &block)
|
1198
|
+
end
|
1199
|
+
|
1200
|
+
# Retrieves a list of tasks.
|
1201
|
+
# @param [String] table_id
|
1202
|
+
# Table whose tasks are being listed.
|
1203
|
+
# @param [Fixnum] max_results
|
1204
|
+
# Maximum number of tasks to return. Default is 5.
|
1205
|
+
# @param [String] page_token
|
1206
|
+
# Continuation token specifying which result page to return.
|
1207
|
+
# @param [Fixnum] start_index
|
1208
|
+
# Index of the first result returned in the current page.
|
1209
|
+
# @param [String] fields
|
1210
|
+
# Selector specifying which fields to include in a partial response.
|
1211
|
+
# @param [String] quota_user
|
1212
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
1213
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
1214
|
+
# Overrides userIp if both are provided.
|
1215
|
+
# @param [String] user_ip
|
1216
|
+
# IP address of the site where the request originates. Use this if you want to
|
1217
|
+
# enforce per-user limits.
|
1218
|
+
# @param [Google::Apis::RequestOptions] options
|
1219
|
+
# Request-specific options
|
1220
|
+
#
|
1221
|
+
# @yield [result, err] Result & error if block supplied
|
1222
|
+
# @yieldparam result [Google::Apis::FusiontablesV2::TaskList] parsed result object
|
1223
|
+
# @yieldparam err [StandardError] error object if request failed
|
1224
|
+
#
|
1225
|
+
# @return [Google::Apis::FusiontablesV2::TaskList]
|
1226
|
+
#
|
1227
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
1228
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
1229
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
1230
|
+
def list_tasks(table_id, max_results: nil, page_token: nil, start_index: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
1231
|
+
path = 'tables/{tableId}/tasks'
|
1232
|
+
command = make_simple_command(:get, path, options)
|
1233
|
+
command.response_representation = Google::Apis::FusiontablesV2::TaskList::Representation
|
1234
|
+
command.response_class = Google::Apis::FusiontablesV2::TaskList
|
1235
|
+
command.params['tableId'] = table_id unless table_id.nil?
|
1236
|
+
command.query['maxResults'] = max_results unless max_results.nil?
|
1237
|
+
command.query['pageToken'] = page_token unless page_token.nil?
|
1238
|
+
command.query['startIndex'] = start_index unless start_index.nil?
|
1239
|
+
command.query['fields'] = fields unless fields.nil?
|
1240
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
1241
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
1242
|
+
execute_or_queue_command(command, &block)
|
1243
|
+
end
|
1244
|
+
|
1245
|
+
# Deletes a template
|
1246
|
+
# @param [String] table_id
|
1247
|
+
# Table from which the template is being deleted
|
1248
|
+
# @param [Fixnum] template_id
|
1249
|
+
# Identifier for the template which is being deleted
|
1250
|
+
# @param [String] fields
|
1251
|
+
# Selector specifying which fields to include in a partial response.
|
1252
|
+
# @param [String] quota_user
|
1253
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
1254
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
1255
|
+
# Overrides userIp if both are provided.
|
1256
|
+
# @param [String] user_ip
|
1257
|
+
# IP address of the site where the request originates. Use this if you want to
|
1258
|
+
# enforce per-user limits.
|
1259
|
+
# @param [Google::Apis::RequestOptions] options
|
1260
|
+
# Request-specific options
|
1261
|
+
#
|
1262
|
+
# @yield [result, err] Result & error if block supplied
|
1263
|
+
# @yieldparam result [NilClass] No result returned for this method
|
1264
|
+
# @yieldparam err [StandardError] error object if request failed
|
1265
|
+
#
|
1266
|
+
# @return [void]
|
1267
|
+
#
|
1268
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
1269
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
1270
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
1271
|
+
def delete_template(table_id, template_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
1272
|
+
path = 'tables/{tableId}/templates/{templateId}'
|
1273
|
+
command = make_simple_command(:delete, path, options)
|
1274
|
+
command.params['tableId'] = table_id unless table_id.nil?
|
1275
|
+
command.params['templateId'] = template_id unless template_id.nil?
|
1276
|
+
command.query['fields'] = fields unless fields.nil?
|
1277
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
1278
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
1279
|
+
execute_or_queue_command(command, &block)
|
1280
|
+
end
|
1281
|
+
|
1282
|
+
# Retrieves a specific template by its id
|
1283
|
+
# @param [String] table_id
|
1284
|
+
# Table to which the template belongs
|
1285
|
+
# @param [Fixnum] template_id
|
1286
|
+
# Identifier for the template that is being requested
|
1287
|
+
# @param [String] fields
|
1288
|
+
# Selector specifying which fields to include in a partial response.
|
1289
|
+
# @param [String] quota_user
|
1290
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
1291
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
1292
|
+
# Overrides userIp if both are provided.
|
1293
|
+
# @param [String] user_ip
|
1294
|
+
# IP address of the site where the request originates. Use this if you want to
|
1295
|
+
# enforce per-user limits.
|
1296
|
+
# @param [Google::Apis::RequestOptions] options
|
1297
|
+
# Request-specific options
|
1298
|
+
#
|
1299
|
+
# @yield [result, err] Result & error if block supplied
|
1300
|
+
# @yieldparam result [Google::Apis::FusiontablesV2::Template] parsed result object
|
1301
|
+
# @yieldparam err [StandardError] error object if request failed
|
1302
|
+
#
|
1303
|
+
# @return [Google::Apis::FusiontablesV2::Template]
|
1304
|
+
#
|
1305
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
1306
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
1307
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
1308
|
+
def get_template(table_id, template_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
1309
|
+
path = 'tables/{tableId}/templates/{templateId}'
|
1310
|
+
command = make_simple_command(:get, path, options)
|
1311
|
+
command.response_representation = Google::Apis::FusiontablesV2::Template::Representation
|
1312
|
+
command.response_class = Google::Apis::FusiontablesV2::Template
|
1313
|
+
command.params['tableId'] = table_id unless table_id.nil?
|
1314
|
+
command.params['templateId'] = template_id unless template_id.nil?
|
1315
|
+
command.query['fields'] = fields unless fields.nil?
|
1316
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
1317
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
1318
|
+
execute_or_queue_command(command, &block)
|
1319
|
+
end
|
1320
|
+
|
1321
|
+
# Creates a new template for the table.
|
1322
|
+
# @param [String] table_id
|
1323
|
+
# Table for which a new template is being created
|
1324
|
+
# @param [Google::Apis::FusiontablesV2::Template] template_object
|
1325
|
+
# @param [String] fields
|
1326
|
+
# Selector specifying which fields to include in a partial response.
|
1327
|
+
# @param [String] quota_user
|
1328
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
1329
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
1330
|
+
# Overrides userIp if both are provided.
|
1331
|
+
# @param [String] user_ip
|
1332
|
+
# IP address of the site where the request originates. Use this if you want to
|
1333
|
+
# enforce per-user limits.
|
1334
|
+
# @param [Google::Apis::RequestOptions] options
|
1335
|
+
# Request-specific options
|
1336
|
+
#
|
1337
|
+
# @yield [result, err] Result & error if block supplied
|
1338
|
+
# @yieldparam result [Google::Apis::FusiontablesV2::Template] parsed result object
|
1339
|
+
# @yieldparam err [StandardError] error object if request failed
|
1340
|
+
#
|
1341
|
+
# @return [Google::Apis::FusiontablesV2::Template]
|
1342
|
+
#
|
1343
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
1344
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
1345
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
1346
|
+
def insert_template(table_id, template_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
1347
|
+
path = 'tables/{tableId}/templates'
|
1348
|
+
command = make_simple_command(:post, path, options)
|
1349
|
+
command.request_representation = Google::Apis::FusiontablesV2::Template::Representation
|
1350
|
+
command.request_object = template_object
|
1351
|
+
command.response_representation = Google::Apis::FusiontablesV2::Template::Representation
|
1352
|
+
command.response_class = Google::Apis::FusiontablesV2::Template
|
1353
|
+
command.params['tableId'] = table_id unless table_id.nil?
|
1354
|
+
command.query['fields'] = fields unless fields.nil?
|
1355
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
1356
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
1357
|
+
execute_or_queue_command(command, &block)
|
1358
|
+
end
|
1359
|
+
|
1360
|
+
# Retrieves a list of templates.
|
1361
|
+
# @param [String] table_id
|
1362
|
+
# Identifier for the table whose templates are being requested
|
1363
|
+
# @param [Fixnum] max_results
|
1364
|
+
# Maximum number of templates to return. Optional. Default is 5.
|
1365
|
+
# @param [String] page_token
|
1366
|
+
# Continuation token specifying which results page to return. Optional.
|
1367
|
+
# @param [String] fields
|
1368
|
+
# Selector specifying which fields to include in a partial response.
|
1369
|
+
# @param [String] quota_user
|
1370
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
1371
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
1372
|
+
# Overrides userIp if both are provided.
|
1373
|
+
# @param [String] user_ip
|
1374
|
+
# IP address of the site where the request originates. Use this if you want to
|
1375
|
+
# enforce per-user limits.
|
1376
|
+
# @param [Google::Apis::RequestOptions] options
|
1377
|
+
# Request-specific options
|
1378
|
+
#
|
1379
|
+
# @yield [result, err] Result & error if block supplied
|
1380
|
+
# @yieldparam result [Google::Apis::FusiontablesV2::TemplateList] parsed result object
|
1381
|
+
# @yieldparam err [StandardError] error object if request failed
|
1382
|
+
#
|
1383
|
+
# @return [Google::Apis::FusiontablesV2::TemplateList]
|
1384
|
+
#
|
1385
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
1386
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
1387
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
1388
|
+
def list_templates(table_id, max_results: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
1389
|
+
path = 'tables/{tableId}/templates'
|
1390
|
+
command = make_simple_command(:get, path, options)
|
1391
|
+
command.response_representation = Google::Apis::FusiontablesV2::TemplateList::Representation
|
1392
|
+
command.response_class = Google::Apis::FusiontablesV2::TemplateList
|
1393
|
+
command.params['tableId'] = table_id unless table_id.nil?
|
1394
|
+
command.query['maxResults'] = max_results unless max_results.nil?
|
1395
|
+
command.query['pageToken'] = page_token unless page_token.nil?
|
1396
|
+
command.query['fields'] = fields unless fields.nil?
|
1397
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
1398
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
1399
|
+
execute_or_queue_command(command, &block)
|
1400
|
+
end
|
1401
|
+
|
1402
|
+
# Updates an existing template. This method supports patch semantics.
|
1403
|
+
# @param [String] table_id
|
1404
|
+
# Table to which the updated template belongs
|
1405
|
+
# @param [Fixnum] template_id
|
1406
|
+
# Identifier for the template that is being updated
|
1407
|
+
# @param [Google::Apis::FusiontablesV2::Template] template_object
|
1408
|
+
# @param [String] fields
|
1409
|
+
# Selector specifying which fields to include in a partial response.
|
1410
|
+
# @param [String] quota_user
|
1411
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
1412
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
1413
|
+
# Overrides userIp if both are provided.
|
1414
|
+
# @param [String] user_ip
|
1415
|
+
# IP address of the site where the request originates. Use this if you want to
|
1416
|
+
# enforce per-user limits.
|
1417
|
+
# @param [Google::Apis::RequestOptions] options
|
1418
|
+
# Request-specific options
|
1419
|
+
#
|
1420
|
+
# @yield [result, err] Result & error if block supplied
|
1421
|
+
# @yieldparam result [Google::Apis::FusiontablesV2::Template] parsed result object
|
1422
|
+
# @yieldparam err [StandardError] error object if request failed
|
1423
|
+
#
|
1424
|
+
# @return [Google::Apis::FusiontablesV2::Template]
|
1425
|
+
#
|
1426
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
1427
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
1428
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
1429
|
+
def patch_template(table_id, template_id, template_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
1430
|
+
path = 'tables/{tableId}/templates/{templateId}'
|
1431
|
+
command = make_simple_command(:patch, path, options)
|
1432
|
+
command.request_representation = Google::Apis::FusiontablesV2::Template::Representation
|
1433
|
+
command.request_object = template_object
|
1434
|
+
command.response_representation = Google::Apis::FusiontablesV2::Template::Representation
|
1435
|
+
command.response_class = Google::Apis::FusiontablesV2::Template
|
1436
|
+
command.params['tableId'] = table_id unless table_id.nil?
|
1437
|
+
command.params['templateId'] = template_id unless template_id.nil?
|
1438
|
+
command.query['fields'] = fields unless fields.nil?
|
1439
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
1440
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
1441
|
+
execute_or_queue_command(command, &block)
|
1442
|
+
end
|
1443
|
+
|
1444
|
+
# Updates an existing template
|
1445
|
+
# @param [String] table_id
|
1446
|
+
# Table to which the updated template belongs
|
1447
|
+
# @param [Fixnum] template_id
|
1448
|
+
# Identifier for the template that is being updated
|
1449
|
+
# @param [Google::Apis::FusiontablesV2::Template] template_object
|
1450
|
+
# @param [String] fields
|
1451
|
+
# Selector specifying which fields to include in a partial response.
|
1452
|
+
# @param [String] quota_user
|
1453
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
1454
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
1455
|
+
# Overrides userIp if both are provided.
|
1456
|
+
# @param [String] user_ip
|
1457
|
+
# IP address of the site where the request originates. Use this if you want to
|
1458
|
+
# enforce per-user limits.
|
1459
|
+
# @param [Google::Apis::RequestOptions] options
|
1460
|
+
# Request-specific options
|
1461
|
+
#
|
1462
|
+
# @yield [result, err] Result & error if block supplied
|
1463
|
+
# @yieldparam result [Google::Apis::FusiontablesV2::Template] parsed result object
|
1464
|
+
# @yieldparam err [StandardError] error object if request failed
|
1465
|
+
#
|
1466
|
+
# @return [Google::Apis::FusiontablesV2::Template]
|
1467
|
+
#
|
1468
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
1469
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
1470
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
1471
|
+
def update_template(table_id, template_id, template_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
1472
|
+
path = 'tables/{tableId}/templates/{templateId}'
|
1473
|
+
command = make_simple_command(:put, path, options)
|
1474
|
+
command.request_representation = Google::Apis::FusiontablesV2::Template::Representation
|
1475
|
+
command.request_object = template_object
|
1476
|
+
command.response_representation = Google::Apis::FusiontablesV2::Template::Representation
|
1477
|
+
command.response_class = Google::Apis::FusiontablesV2::Template
|
1478
|
+
command.params['tableId'] = table_id unless table_id.nil?
|
1479
|
+
command.params['templateId'] = template_id unless template_id.nil?
|
1480
|
+
command.query['fields'] = fields unless fields.nil?
|
1481
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
1482
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
1483
|
+
execute_or_queue_command(command, &block)
|
1484
|
+
end
|
1485
|
+
|
1486
|
+
protected
|
1487
|
+
|
1488
|
+
def apply_command_defaults(command)
|
1489
|
+
command.query['key'] = key unless key.nil?
|
1490
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
1491
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
1492
|
+
end
|
1493
|
+
end
|
1494
|
+
end
|
1495
|
+
end
|
1496
|
+
end
|