google-api-client 0.10.3 → 0.11.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +12 -18
- data/CHANGELOG.md +22 -2
- data/Gemfile +5 -7
- data/MIGRATING.md +33 -0
- data/README.md +10 -2
- data/Rakefile +1 -0
- data/bin/generate-api +7 -1
- data/dl.rb +0 -0
- data/generated/google/apis/acceleratedmobilepageurl_v1/classes.rb +6 -6
- data/generated/google/apis/acceleratedmobilepageurl_v1/representations.rb +1 -1
- data/generated/google/apis/acceleratedmobilepageurl_v1/service.rb +1 -0
- data/generated/google/apis/adexchangebuyer2_v2beta1.rb +1 -1
- data/generated/google/apis/adexchangebuyer2_v2beta1/classes.rb +759 -759
- data/generated/google/apis/adexchangebuyer2_v2beta1/representations.rb +152 -152
- data/generated/google/apis/adexchangebuyer2_v2beta1/service.rb +376 -375
- data/generated/google/apis/adexchangebuyer_v1_4/classes.rb +58 -58
- data/generated/google/apis/adexchangebuyer_v1_4/representations.rb +45 -45
- data/generated/google/apis/adexchangebuyer_v1_4/service.rb +22 -21
- data/generated/google/apis/adexchangeseller_v2_0/classes.rb +5 -5
- data/generated/google/apis/adexchangeseller_v2_0/representations.rb +5 -5
- data/generated/google/apis/adexchangeseller_v2_0/service.rb +1 -0
- data/generated/google/apis/admin_datatransfer_v1/classes.rb +2 -2
- data/generated/google/apis/admin_datatransfer_v1/representations.rb +2 -2
- data/generated/google/apis/admin_datatransfer_v1/service.rb +2 -1
- data/generated/google/apis/admin_directory_v1/classes.rb +11 -11
- data/generated/google/apis/admin_directory_v1/representations.rb +11 -11
- data/generated/google/apis/admin_directory_v1/service.rb +1 -0
- data/generated/google/apis/admin_reports_v1/classes.rb +5 -5
- data/generated/google/apis/admin_reports_v1/representations.rb +4 -4
- data/generated/google/apis/admin_reports_v1/service.rb +1 -0
- data/generated/google/apis/adsense_v1_4.rb +1 -1
- data/generated/google/apis/adsense_v1_4/classes.rb +2 -2
- data/generated/google/apis/adsense_v1_4/representations.rb +2 -2
- data/generated/google/apis/adsense_v1_4/service.rb +1 -0
- data/generated/google/apis/adsensehost_v4_1.rb +1 -1
- data/generated/google/apis/adsensehost_v4_1/classes.rb +1 -1
- data/generated/google/apis/adsensehost_v4_1/representations.rb +1 -1
- data/generated/google/apis/adsensehost_v4_1/service.rb +1 -0
- data/generated/google/apis/analytics_v3/classes.rb +10 -10
- data/generated/google/apis/analytics_v3/representations.rb +10 -10
- data/generated/google/apis/analytics_v3/service.rb +1 -0
- data/generated/google/apis/analyticsreporting_v4/classes.rb +933 -933
- data/generated/google/apis/analyticsreporting_v4/representations.rb +197 -197
- data/generated/google/apis/analyticsreporting_v4/service.rb +5 -4
- data/generated/google/apis/androidenterprise_v1.rb +1 -1
- data/generated/google/apis/androidenterprise_v1/classes.rb +1 -1
- data/generated/google/apis/androidenterprise_v1/representations.rb +1 -1
- data/generated/google/apis/androidenterprise_v1/service.rb +1 -0
- data/generated/google/apis/androidpublisher_v2/classes.rb +13 -13
- data/generated/google/apis/androidpublisher_v2/representations.rb +13 -13
- data/generated/google/apis/androidpublisher_v2/service.rb +3 -2
- data/generated/google/apis/appengine_v1/classes.rb +2 -2
- data/generated/google/apis/appengine_v1/representations.rb +2 -2
- data/generated/google/apis/appengine_v1/service.rb +1 -0
- data/generated/google/apis/appsactivity_v1/classes.rb +1 -1
- data/generated/google/apis/appsactivity_v1/representations.rb +1 -1
- data/generated/google/apis/appsactivity_v1/service.rb +1 -0
- data/generated/google/apis/appsmarket_v2.rb +35 -0
- data/generated/google/apis/appsmarket_v2/classes.rb +396 -0
- data/generated/google/apis/appsmarket_v2/representations.rb +180 -0
- data/generated/google/apis/appsmarket_v2/service.rb +187 -0
- data/generated/google/apis/appstate_v1.rb +1 -1
- data/generated/google/apis/appstate_v1/service.rb +1 -0
- data/generated/google/apis/bigquery_v2/classes.rb +39 -39
- data/generated/google/apis/bigquery_v2/representations.rb +38 -38
- data/generated/google/apis/bigquery_v2/service.rb +3 -2
- data/generated/google/apis/blogger_v3/classes.rb +2 -2
- data/generated/google/apis/blogger_v3/representations.rb +2 -2
- data/generated/google/apis/blogger_v3/service.rb +1 -0
- data/generated/google/apis/books_v1/classes.rb +5 -5
- data/generated/google/apis/books_v1/representations.rb +4 -4
- data/generated/google/apis/books_v1/service.rb +1 -0
- data/generated/google/apis/calendar_v3/classes.rb +1 -1
- data/generated/google/apis/calendar_v3/representations.rb +1 -1
- data/generated/google/apis/calendar_v3/service.rb +1 -0
- data/generated/google/apis/civicinfo_v2/classes.rb +6 -6
- data/generated/google/apis/civicinfo_v2/representations.rb +6 -6
- data/generated/google/apis/civicinfo_v2/service.rb +2 -1
- data/generated/google/apis/classroom_v1/service.rb +1 -0
- data/generated/google/apis/cloudbilling_v1/service.rb +1 -0
- data/generated/google/apis/cloudbuild_v1.rb +1 -1
- data/generated/google/apis/cloudbuild_v1/classes.rb +626 -626
- data/generated/google/apis/cloudbuild_v1/representations.rb +109 -109
- data/generated/google/apis/cloudbuild_v1/service.rb +159 -158
- data/generated/google/apis/clouddebugger_v2/classes.rb +358 -358
- data/generated/google/apis/clouddebugger_v2/representations.rb +99 -99
- data/generated/google/apis/clouddebugger_v2/service.rb +42 -41
- data/generated/google/apis/clouderrorreporting_v1beta1.rb +1 -1
- data/generated/google/apis/clouderrorreporting_v1beta1/classes.rb +220 -220
- data/generated/google/apis/clouderrorreporting_v1beta1/representations.rb +52 -52
- data/generated/google/apis/clouderrorreporting_v1beta1/service.rb +59 -58
- data/generated/google/apis/cloudfunctions_v1/classes.rb +7 -7
- data/generated/google/apis/cloudfunctions_v1/representations.rb +1 -1
- data/generated/google/apis/cloudfunctions_v1/service.rb +5 -4
- data/generated/google/apis/cloudkms_v1/classes.rb +311 -311
- data/generated/google/apis/cloudkms_v1/representations.rb +87 -87
- data/generated/google/apis/cloudkms_v1/service.rb +168 -167
- data/generated/google/apis/cloudmonitoring_v2beta2/classes.rb +4 -4
- data/generated/google/apis/cloudmonitoring_v2beta2/representations.rb +4 -4
- data/generated/google/apis/cloudmonitoring_v2beta2/service.rb +1 -0
- data/generated/google/apis/cloudresourcemanager_v1.rb +3 -3
- data/generated/google/apis/cloudresourcemanager_v1/classes.rb +341 -341
- data/generated/google/apis/cloudresourcemanager_v1/representations.rb +62 -62
- data/generated/google/apis/cloudresourcemanager_v1/service.rb +458 -457
- data/generated/google/apis/cloudresourcemanager_v1beta1/classes.rb +327 -327
- data/generated/google/apis/cloudresourcemanager_v1beta1/representations.rb +71 -71
- data/generated/google/apis/cloudresourcemanager_v1beta1/service.rb +237 -236
- data/generated/google/apis/cloudtrace_v1.rb +3 -3
- data/generated/google/apis/cloudtrace_v1/classes.rb +38 -38
- data/generated/google/apis/cloudtrace_v1/representations.rb +13 -13
- data/generated/google/apis/cloudtrace_v1/service.rb +14 -13
- data/generated/google/apis/clouduseraccounts_beta/classes.rb +4 -4
- data/generated/google/apis/clouduseraccounts_beta/representations.rb +4 -4
- data/generated/google/apis/clouduseraccounts_beta/service.rb +1 -0
- data/generated/google/apis/compute_beta/classes.rb +52 -52
- data/generated/google/apis/compute_beta/representations.rb +52 -52
- data/generated/google/apis/compute_beta/service.rb +2 -1
- data/generated/google/apis/compute_v1/classes.rb +48 -48
- data/generated/google/apis/compute_v1/representations.rb +48 -48
- data/generated/google/apis/compute_v1/service.rb +2 -1
- data/generated/google/apis/container_v1/service.rb +1 -0
- data/generated/google/apis/content_v2.rb +1 -1
- data/generated/google/apis/content_v2/classes.rb +38 -660
- data/generated/google/apis/content_v2/representations.rb +37 -303
- data/generated/google/apis/content_v2/service.rb +63 -279
- data/generated/google/apis/customsearch_v1/classes.rb +2 -2
- data/generated/google/apis/customsearch_v1/representations.rb +2 -2
- data/generated/google/apis/customsearch_v1/service.rb +1 -0
- data/generated/google/apis/dataflow_v1b3/classes.rb +3281 -3281
- data/generated/google/apis/dataflow_v1b3/representations.rb +777 -777
- data/generated/google/apis/dataflow_v1b3/service.rb +106 -105
- data/generated/google/apis/dataproc_v1/classes.rb +395 -395
- data/generated/google/apis/dataproc_v1/representations.rb +91 -91
- data/generated/google/apis/dataproc_v1/service.rb +356 -355
- data/generated/google/apis/datastore_v1/classes.rb +506 -506
- data/generated/google/apis/datastore_v1/representations.rb +147 -147
- data/generated/google/apis/datastore_v1/service.rb +46 -45
- data/generated/google/apis/deploymentmanager_v2/classes.rb +6 -6
- data/generated/google/apis/deploymentmanager_v2/representations.rb +6 -6
- data/generated/google/apis/deploymentmanager_v2/service.rb +1 -0
- data/generated/google/apis/dfareporting_v2_6/classes.rb +280 -280
- data/generated/google/apis/dfareporting_v2_6/representations.rb +266 -266
- data/generated/google/apis/dfareporting_v2_6/service.rb +421 -420
- data/generated/google/apis/dfareporting_v2_7/classes.rb +280 -280
- data/generated/google/apis/dfareporting_v2_7/representations.rb +266 -266
- data/generated/google/apis/dfareporting_v2_7/service.rb +423 -422
- data/generated/google/apis/discovery_v1/service.rb +1 -0
- data/generated/google/apis/dns_v1/classes.rb +2 -2
- data/generated/google/apis/dns_v1/representations.rb +2 -2
- data/generated/google/apis/dns_v1/service.rb +1 -0
- data/generated/google/apis/dns_v2beta1/classes.rb +2 -2
- data/generated/google/apis/dns_v2beta1/representations.rb +2 -2
- data/generated/google/apis/dns_v2beta1/service.rb +1 -0
- data/generated/google/apis/doubleclickbidmanager_v1/classes.rb +15 -15
- data/generated/google/apis/doubleclickbidmanager_v1/representations.rb +13 -13
- data/generated/google/apis/doubleclickbidmanager_v1/service.rb +5 -4
- data/generated/google/apis/doubleclicksearch_v2/classes.rb +28 -28
- data/generated/google/apis/doubleclicksearch_v2/representations.rb +28 -28
- data/generated/google/apis/doubleclicksearch_v2/service.rb +13 -12
- data/generated/google/apis/drive_v2/classes.rb +17 -17
- data/generated/google/apis/drive_v2/representations.rb +17 -17
- data/generated/google/apis/drive_v2/service.rb +5 -4
- data/generated/google/apis/drive_v3/classes.rb +13 -13
- data/generated/google/apis/drive_v3/representations.rb +12 -12
- data/generated/google/apis/drive_v3/service.rb +1 -0
- data/generated/google/apis/firebasedynamiclinks_v1.rb +1 -1
- data/generated/google/apis/firebasedynamiclinks_v1/classes.rb +81 -81
- data/generated/google/apis/firebasedynamiclinks_v1/representations.rb +24 -24
- data/generated/google/apis/firebasedynamiclinks_v1/service.rb +1 -0
- data/generated/google/apis/firebaserules_v1/classes.rb +201 -201
- data/generated/google/apis/firebaserules_v1/representations.rb +61 -61
- data/generated/google/apis/firebaserules_v1/service.rb +1 -0
- data/generated/google/apis/fitness_v1/classes.rb +18 -18
- data/generated/google/apis/fitness_v1/representations.rb +18 -18
- data/generated/google/apis/fitness_v1/service.rb +6 -5
- data/generated/google/apis/fusiontables_v2/classes.rb +2 -2
- data/generated/google/apis/fusiontables_v2/representations.rb +2 -2
- data/generated/google/apis/fusiontables_v2/service.rb +1 -0
- data/generated/google/apis/games_configuration_v1configuration.rb +1 -1
- data/generated/google/apis/games_configuration_v1configuration/classes.rb +2 -2
- data/generated/google/apis/games_configuration_v1configuration/representations.rb +2 -2
- data/generated/google/apis/games_configuration_v1configuration/service.rb +1 -0
- data/generated/google/apis/games_management_v1management.rb +1 -1
- data/generated/google/apis/games_management_v1management/classes.rb +6 -6
- data/generated/google/apis/games_management_v1management/representations.rb +6 -6
- data/generated/google/apis/games_management_v1management/service.rb +1 -0
- data/generated/google/apis/games_v1.rb +1 -1
- data/generated/google/apis/games_v1/classes.rb +47 -47
- data/generated/google/apis/games_v1/representations.rb +47 -47
- data/generated/google/apis/games_v1/service.rb +58 -57
- data/generated/google/apis/genomics_v1.rb +6 -6
- data/generated/google/apis/genomics_v1/classes.rb +2354 -2354
- data/generated/google/apis/genomics_v1/representations.rb +487 -487
- data/generated/google/apis/genomics_v1/service.rb +1188 -1187
- data/generated/google/apis/gmail_v1/classes.rb +11 -11
- data/generated/google/apis/gmail_v1/representations.rb +11 -11
- data/generated/google/apis/gmail_v1/service.rb +2 -1
- data/generated/google/apis/groupsmigration_v1/service.rb +1 -0
- data/generated/google/apis/groupssettings_v1/service.rb +1 -0
- data/generated/google/apis/iam_v1/classes.rb +437 -437
- data/generated/google/apis/iam_v1/representations.rb +95 -95
- data/generated/google/apis/iam_v1/service.rb +87 -86
- data/generated/google/apis/identitytoolkit_v3/classes.rb +20 -20
- data/generated/google/apis/identitytoolkit_v3/representations.rb +20 -20
- data/generated/google/apis/identitytoolkit_v3/service.rb +1 -0
- data/generated/google/apis/kgsearch_v1/service.rb +9 -8
- data/generated/google/apis/language_v1.rb +1 -1
- data/generated/google/apis/language_v1/classes.rb +245 -245
- data/generated/google/apis/language_v1/representations.rb +65 -65
- data/generated/google/apis/language_v1/service.rb +1 -0
- data/generated/google/apis/language_v1beta1.rb +1 -1
- data/generated/google/apis/language_v1beta1/classes.rb +277 -277
- data/generated/google/apis/language_v1beta1/representations.rb +83 -83
- data/generated/google/apis/language_v1beta1/service.rb +31 -30
- data/generated/google/apis/licensing_v1/service.rb +1 -0
- data/generated/google/apis/logging_v2/classes.rb +408 -408
- data/generated/google/apis/logging_v2/representations.rb +93 -93
- data/generated/google/apis/logging_v2/service.rb +408 -407
- data/generated/google/apis/logging_v2beta1.rb +3 -3
- data/generated/google/apis/logging_v2beta1/classes.rb +892 -892
- data/generated/google/apis/logging_v2beta1/representations.rb +128 -128
- data/generated/google/apis/logging_v2beta1/service.rb +89 -88
- data/generated/google/apis/manufacturers_v1/classes.rb +309 -309
- data/generated/google/apis/manufacturers_v1/representations.rb +64 -64
- data/generated/google/apis/manufacturers_v1/service.rb +1 -0
- data/generated/google/apis/mirror_v1/service.rb +1 -0
- data/generated/google/apis/ml_v1/classes.rb +1185 -1185
- data/generated/google/apis/ml_v1/representations.rb +171 -171
- data/generated/google/apis/ml_v1/service.rb +282 -281
- data/generated/google/apis/monitoring_v3.rb +3 -3
- data/generated/google/apis/monitoring_v3/classes.rb +334 -334
- data/generated/google/apis/monitoring_v3/representations.rb +86 -86
- data/generated/google/apis/monitoring_v3/service.rb +344 -343
- data/generated/google/apis/mybusiness_v3/service.rb +1 -0
- data/generated/google/apis/oauth2_v2/service.rb +1 -0
- data/generated/google/apis/pagespeedonline_v2/classes.rb +8 -8
- data/generated/google/apis/pagespeedonline_v2/representations.rb +8 -8
- data/generated/google/apis/pagespeedonline_v2/service.rb +1 -0
- data/generated/google/apis/partners_v2/classes.rb +1466 -1466
- data/generated/google/apis/partners_v2/representations.rb +371 -371
- data/generated/google/apis/partners_v2/service.rb +530 -529
- data/generated/google/apis/people_v1.rb +4 -4
- data/generated/google/apis/people_v1/classes.rb +1009 -1009
- data/generated/google/apis/people_v1/representations.rb +249 -249
- data/generated/google/apis/people_v1/service.rb +13 -12
- data/generated/google/apis/plus_domains_v1/classes.rb +2 -2
- data/generated/google/apis/plus_domains_v1/representations.rb +2 -2
- data/generated/google/apis/plus_domains_v1/service.rb +1 -0
- data/generated/google/apis/plus_v1/service.rb +1 -0
- data/generated/google/apis/prediction_v1_6/classes.rb +9 -9
- data/generated/google/apis/prediction_v1_6/representations.rb +9 -9
- data/generated/google/apis/prediction_v1_6/service.rb +1 -0
- data/generated/google/apis/proximitybeacon_v1beta1/classes.rb +221 -221
- data/generated/google/apis/proximitybeacon_v1beta1/representations.rb +55 -55
- data/generated/google/apis/proximitybeacon_v1beta1/service.rb +378 -377
- data/generated/google/apis/pubsub_v1/classes.rb +99 -99
- data/generated/google/apis/pubsub_v1/representations.rb +25 -25
- data/generated/google/apis/pubsub_v1/service.rb +236 -235
- data/generated/google/apis/qpx_express_v1/service.rb +1 -0
- data/generated/google/apis/replicapool_v1beta2/classes.rb +3 -3
- data/generated/google/apis/replicapool_v1beta2/representations.rb +3 -3
- data/generated/google/apis/replicapool_v1beta2/service.rb +1 -0
- data/generated/google/apis/replicapoolupdater_v1beta1/classes.rb +2 -2
- data/generated/google/apis/replicapoolupdater_v1beta1/representations.rb +2 -2
- data/generated/google/apis/replicapoolupdater_v1beta1/service.rb +1 -0
- data/generated/google/apis/reseller_v1/classes.rb +5 -5
- data/generated/google/apis/reseller_v1/representations.rb +5 -5
- data/generated/google/apis/reseller_v1/service.rb +1 -0
- data/generated/google/apis/resourceviews_v1beta2/classes.rb +2 -2
- data/generated/google/apis/resourceviews_v1beta2/representations.rb +2 -2
- data/generated/google/apis/resourceviews_v1beta2/service.rb +1 -0
- data/generated/google/apis/runtimeconfig_v1.rb +3 -3
- data/generated/google/apis/runtimeconfig_v1/classes.rb +28 -28
- data/generated/google/apis/runtimeconfig_v1/representations.rb +3 -3
- data/generated/google/apis/runtimeconfig_v1/service.rb +53 -52
- data/generated/google/apis/script_v1.rb +18 -18
- data/generated/google/apis/script_v1/classes.rb +84 -84
- data/generated/google/apis/script_v1/representations.rb +18 -18
- data/generated/google/apis/script_v1/service.rb +11 -10
- data/generated/google/apis/searchconsole_v1/classes.rb +75 -75
- data/generated/google/apis/searchconsole_v1/representations.rb +32 -32
- data/generated/google/apis/searchconsole_v1/service.rb +11 -10
- data/generated/google/apis/servicecontrol_v1/classes.rb +582 -582
- data/generated/google/apis/servicecontrol_v1/representations.rb +113 -113
- data/generated/google/apis/servicecontrol_v1/service.rb +71 -70
- data/generated/google/apis/servicemanagement_v1.rb +3 -3
- data/generated/google/apis/servicemanagement_v1/classes.rb +3725 -3725
- data/generated/google/apis/servicemanagement_v1/representations.rb +255 -255
- data/generated/google/apis/servicemanagement_v1/service.rb +179 -178
- data/generated/google/apis/serviceuser_v1.rb +3 -3
- data/generated/google/apis/serviceuser_v1/classes.rb +2845 -2845
- data/generated/google/apis/serviceuser_v1/representations.rb +228 -228
- data/generated/google/apis/serviceuser_v1/service.rb +47 -46
- data/generated/google/apis/sheets_v4.rb +1 -1
- data/generated/google/apis/sheets_v4/classes.rb +4456 -4456
- data/generated/google/apis/sheets_v4/representations.rb +859 -859
- data/generated/google/apis/sheets_v4/service.rb +180 -179
- data/generated/google/apis/site_verification_v1/service.rb +1 -0
- data/generated/google/apis/slides_v1.rb +1 -1
- data/generated/google/apis/slides_v1/classes.rb +2856 -2856
- data/generated/google/apis/slides_v1/representations.rb +683 -683
- data/generated/google/apis/slides_v1/service.rb +27 -26
- data/generated/google/apis/sourcerepo_v1/classes.rb +281 -281
- data/generated/google/apis/sourcerepo_v1/representations.rb +79 -79
- data/generated/google/apis/sourcerepo_v1/service.rb +112 -111
- data/generated/google/apis/spanner_v1/classes.rb +2177 -2177
- data/generated/google/apis/spanner_v1/representations.rb +325 -325
- data/generated/google/apis/spanner_v1/service.rb +374 -373
- data/generated/google/apis/speech_v1beta1/classes.rb +197 -197
- data/generated/google/apis/speech_v1beta1/representations.rb +36 -36
- data/generated/google/apis/speech_v1beta1/service.rb +27 -26
- data/generated/google/apis/sqladmin_v1beta4/classes.rb +14 -14
- data/generated/google/apis/sqladmin_v1beta4/representations.rb +14 -14
- data/generated/google/apis/sqladmin_v1beta4/service.rb +3 -2
- data/generated/google/apis/storage_v1.rb +1 -1
- data/generated/google/apis/storage_v1/classes.rb +11 -11
- data/generated/google/apis/storage_v1/representations.rb +11 -11
- data/generated/google/apis/storage_v1/service.rb +65 -64
- data/generated/google/apis/storagetransfer_v1/classes.rb +239 -239
- data/generated/google/apis/storagetransfer_v1/representations.rb +79 -79
- data/generated/google/apis/storagetransfer_v1/service.rb +133 -132
- data/generated/google/apis/surveys_v2/classes.rb +4 -4
- data/generated/google/apis/surveys_v2/representations.rb +4 -4
- data/generated/google/apis/surveys_v2/service.rb +1 -0
- data/generated/google/apis/tagmanager_v1/classes.rb +7 -7
- data/generated/google/apis/tagmanager_v1/representations.rb +7 -7
- data/generated/google/apis/tagmanager_v1/service.rb +1 -0
- data/generated/google/apis/tagmanager_v2/classes.rb +6 -6
- data/generated/google/apis/tagmanager_v2/representations.rb +6 -6
- data/generated/google/apis/tagmanager_v2/service.rb +1 -0
- data/generated/google/apis/taskqueue_v1beta2/classes.rb +5 -5
- data/generated/google/apis/taskqueue_v1beta2/representations.rb +5 -5
- data/generated/google/apis/taskqueue_v1beta2/service.rb +1 -0
- data/generated/google/apis/tasks_v1/service.rb +3 -2
- data/generated/google/apis/toolresults_v1beta3.rb +1 -1
- data/generated/google/apis/toolresults_v1beta3/classes.rb +4 -4
- data/generated/google/apis/toolresults_v1beta3/representations.rb +4 -4
- data/generated/google/apis/toolresults_v1beta3/service.rb +1 -0
- data/generated/google/apis/tracing_v1/classes.rb +421 -421
- data/generated/google/apis/tracing_v1/representations.rb +86 -86
- data/generated/google/apis/tracing_v1/service.rb +60 -59
- data/generated/google/apis/translate_v2/service.rb +1 -0
- data/generated/google/apis/urlshortener_v1/classes.rb +3 -3
- data/generated/google/apis/urlshortener_v1/representations.rb +3 -3
- data/generated/google/apis/urlshortener_v1/service.rb +1 -0
- data/generated/google/apis/vision_v1/classes.rb +1290 -1290
- data/generated/google/apis/vision_v1/representations.rb +184 -184
- data/generated/google/apis/vision_v1/service.rb +11 -10
- data/generated/google/apis/webfonts_v1/service.rb +1 -0
- data/generated/google/apis/webmasters_v3/classes.rb +5 -5
- data/generated/google/apis/webmasters_v3/representations.rb +5 -5
- data/generated/google/apis/webmasters_v3/service.rb +1 -0
- data/generated/google/apis/youtube_analytics_v1/classes.rb +1 -1
- data/generated/google/apis/youtube_analytics_v1/representations.rb +1 -1
- data/generated/google/apis/youtube_analytics_v1/service.rb +1 -0
- data/generated/google/apis/youtube_partner_v1/classes.rb +13 -13
- data/generated/google/apis/youtube_partner_v1/representations.rb +13 -13
- data/generated/google/apis/youtube_partner_v1/service.rb +1 -0
- data/generated/google/apis/youtube_v3/classes.rb +31 -31
- data/generated/google/apis/youtube_v3/representations.rb +31 -31
- data/generated/google/apis/youtube_v3/service.rb +2 -1
- data/generated/google/apis/youtubereporting_v1.rb +4 -4
- data/generated/google/apis/youtubereporting_v1/classes.rb +73 -73
- data/generated/google/apis/youtubereporting_v1/representations.rb +18 -18
- data/generated/google/apis/youtubereporting_v1/service.rb +77 -76
- data/google-api-client.gemspec +4 -6
- data/lib/google/apis/core/api_command.rb +8 -3
- data/lib/google/apis/core/base_service.rb +47 -18
- data/lib/google/apis/core/batch.rb +13 -18
- data/lib/google/apis/core/composite_io.rb +97 -0
- data/lib/google/apis/core/download.rb +24 -20
- data/lib/google/apis/core/http_command.rb +49 -38
- data/lib/google/apis/core/json_representation.rb +5 -1
- data/lib/google/apis/core/multipart.rb +43 -95
- data/lib/google/apis/core/upload.rb +59 -84
- data/lib/google/apis/generator/model.rb +2 -0
- data/lib/google/apis/generator/templates/_representation.tmpl +1 -1
- data/lib/google/apis/generator/templates/service.rb.tmpl +1 -0
- data/lib/google/apis/options.rb +24 -12
- data/lib/google/apis/version.rb +1 -1
- data/samples/web/Gemfile +0 -1
- metadata +39 -37
- data/lib/google/apis/core/http_client_adapter.rb +0 -82
- data/third_party/hurley_patches.rb +0 -103
@@ -55,7 +55,7 @@ module Google
|
|
55
55
|
def if_fn(name)
|
56
56
|
ivar_name = "@#{name}".to_sym
|
57
57
|
lambda do |opts|
|
58
|
-
if opts[:
|
58
|
+
if opts[:user_options] && opts[:user_options][:skip_undefined]
|
59
59
|
if respond_to?(:key?)
|
60
60
|
self.key?(name) || instance_variable_defined?(ivar_name)
|
61
61
|
else
|
@@ -72,6 +72,10 @@ module Google
|
|
72
72
|
options[:render_filter] = ->(value, _doc, *_args) { value.nil? ? nil : Base64.urlsafe_encode64(value) }
|
73
73
|
options[:parse_filter] = ->(fragment, _doc, *_args) { Base64.urlsafe_decode64(fragment) }
|
74
74
|
end
|
75
|
+
if options[:numeric_string]
|
76
|
+
options[:render_filter] = ->(value, _doc, *_args) { value.nil? ? nil : value.to_s}
|
77
|
+
options[:parse_filter] = ->(fragment, _doc, *_args) { fragment.to_i }
|
78
|
+
end
|
75
79
|
if options[:type] == DateTime
|
76
80
|
options[:render_filter] = ->(value, _doc, *_args) { value.nil? ? nil : value.is_a?(DateTime) ? value.rfc3339(3) : value.to_s }
|
77
81
|
options[:parse_filter] = ->(fragment, _doc, *_args) { DateTime.parse(fragment) }
|
@@ -12,7 +12,6 @@
|
|
12
12
|
# See the License for the specific language governing permissions and
|
13
13
|
# limitations under the License.
|
14
14
|
|
15
|
-
require 'hurley'
|
16
15
|
|
17
16
|
module Google
|
18
17
|
module Apis
|
@@ -21,108 +20,60 @@ module Google
|
|
21
20
|
#
|
22
21
|
# @private
|
23
22
|
class JsonPart
|
24
|
-
include Hurley::Multipart::Part
|
25
23
|
|
26
|
-
# @return [Fixnum]
|
27
|
-
# Length of part
|
28
|
-
attr_reader :length
|
29
|
-
|
30
|
-
# @param [String] boundary
|
31
|
-
# Multipart boundary
|
32
24
|
# @param [String] value
|
33
25
|
# JSON content
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
@
|
26
|
+
# @param [Hash] header
|
27
|
+
# Additional headers
|
28
|
+
def initialize(value, header = {})
|
29
|
+
@value = value
|
30
|
+
@header = header
|
38
31
|
end
|
39
32
|
|
40
|
-
|
41
|
-
|
42
|
-
# Format the part
|
43
|
-
#
|
44
|
-
# @param [String] boundary
|
45
|
-
# Multipart boundary
|
46
|
-
# @param [String] value
|
47
|
-
# JSON content
|
48
|
-
# @return [String]
|
49
|
-
def build_part(boundary, value)
|
33
|
+
def to_io(boundary)
|
50
34
|
part = ''
|
51
35
|
part << "--#{boundary}\r\n"
|
52
36
|
part << "Content-Type: application/json\r\n"
|
37
|
+
@header.each do |(k, v)|
|
38
|
+
part << "#{k}: #{v}\r\n"
|
39
|
+
end
|
53
40
|
part << "\r\n"
|
54
|
-
part << "#{value}\r\n"
|
41
|
+
part << "#{@value}\r\n"
|
42
|
+
StringIO.new(part)
|
55
43
|
end
|
44
|
+
|
56
45
|
end
|
57
46
|
|
58
|
-
# Part of a multipart request for holding arbitrary content.
|
59
|
-
# from Hurley::Multipart::FilePart to remove Content-Disposition
|
47
|
+
# Part of a multipart request for holding arbitrary content.
|
60
48
|
#
|
61
49
|
# @private
|
62
50
|
class FilePart
|
63
|
-
|
64
|
-
|
65
|
-
# @return [Fixnum]
|
66
|
-
# Length of part
|
67
|
-
attr_reader :length
|
68
|
-
|
69
|
-
# @param [String] boundary
|
70
|
-
# Multipart boundary
|
71
|
-
# @param [Google::Apis::Core::UploadIO] io
|
51
|
+
# @param [IO] io
|
72
52
|
# IO stream
|
73
53
|
# @param [Hash] header
|
74
54
|
# Additional headers
|
75
|
-
def initialize(
|
76
|
-
|
77
|
-
|
78
|
-
@
|
79
|
-
io.respond_to?(:opts) ? io.opts.merge(header) : header)
|
80
|
-
|
81
|
-
@length = @head.bytesize + file_length + FOOT.length
|
82
|
-
@io = Hurley::CompositeReadIO.new(@length, StringIO.new(@head), io, StringIO.new(FOOT))
|
55
|
+
def initialize(io, header = {})
|
56
|
+
@io = io
|
57
|
+
@header = header
|
58
|
+
@length = io.respond_to?(:size) ? io.size : nil
|
83
59
|
end
|
84
60
|
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
# Multipart boundary
|
91
|
-
# @param [String] type
|
92
|
-
# Content type for the part
|
93
|
-
# @param [Fixnum] content_len
|
94
|
-
# Length of the part
|
95
|
-
# @param [Hash] header
|
96
|
-
# Headers for the part
|
97
|
-
def build_head(boundary, type, content_len, header)
|
98
|
-
content_id = ''
|
99
|
-
if header[:content_id]
|
100
|
-
content_id = sprintf(CID_FORMAT, header[:content_id])
|
61
|
+
def to_io(boundary)
|
62
|
+
head = ''
|
63
|
+
head << "--#{boundary}\r\n"
|
64
|
+
@header.each do |(k, v)|
|
65
|
+
head << "#{k}: #{v}\r\n"
|
101
66
|
end
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
header[:content_type] || type,
|
107
|
-
header[:content_transfer_encoding] || DEFAULT_TR_ENCODING)
|
67
|
+
head << "Content-Length: #{@length}\r\n" unless @length.nil?
|
68
|
+
head << "Content-Transfer-Encoding: binary\r\n"
|
69
|
+
head << "\r\n"
|
70
|
+
Google::Apis::Core::CompositeIO.new(StringIO.new(head), @io, StringIO.new("\r\n"))
|
108
71
|
end
|
109
|
-
|
110
|
-
DEFAULT_TR_ENCODING = 'binary'.freeze
|
111
|
-
FOOT = "\r\n".freeze
|
112
|
-
CID_FORMAT = "Content-ID: %s\r\n"
|
113
|
-
HEAD_FORMAT = <<-END
|
114
|
-
--%s\r
|
115
|
-
Content-Length: %d\r
|
116
|
-
%sContent-Type: %s\r
|
117
|
-
Content-Transfer-Encoding: %s\r
|
118
|
-
\r
|
119
|
-
END
|
120
72
|
end
|
121
73
|
|
122
74
|
# Helper for building multipart requests
|
123
75
|
class Multipart
|
124
76
|
MULTIPART_RELATED = 'multipart/related'
|
125
|
-
DEFAULT_BOUNDARY = 'RubyApiClientMultiPart'
|
126
77
|
|
127
78
|
# @return [String]
|
128
79
|
# Content type header
|
@@ -135,8 +86,8 @@ Content-Transfer-Encoding: %s\r
|
|
135
86
|
|
136
87
|
def initialize(content_type: MULTIPART_RELATED, boundary: nil)
|
137
88
|
@parts = []
|
138
|
-
@boundary = boundary ||
|
139
|
-
@content_type = "#{content_type}; boundary=#{boundary}"
|
89
|
+
@boundary = boundary || Digest::SHA1.hexdigest(SecureRandom.random_bytes(8))
|
90
|
+
@content_type = "#{content_type}; boundary=#{@boundary}"
|
140
91
|
end
|
141
92
|
|
142
93
|
# Append JSON data part
|
@@ -147,23 +98,26 @@ Content-Transfer-Encoding: %s\r
|
|
147
98
|
# Optional unique ID of this part
|
148
99
|
# @return [self]
|
149
100
|
def add_json(body, content_id: nil)
|
150
|
-
header = {
|
151
|
-
|
101
|
+
header = {}
|
102
|
+
header['Content-ID'] = content_id unless content_id.nil?
|
103
|
+
@parts << Google::Apis::Core::JsonPart.new(body, header).to_io(@boundary)
|
152
104
|
self
|
153
105
|
end
|
154
106
|
|
155
107
|
# Append arbitrary data as a part
|
156
108
|
#
|
157
|
-
# @param [
|
109
|
+
# @param [IO] upload_io
|
158
110
|
# IO stream
|
159
111
|
# @param [String] content_id
|
160
112
|
# Optional unique ID of this part
|
161
113
|
# @return [self]
|
162
|
-
def add_upload(upload_io, content_id: nil)
|
163
|
-
header = {
|
164
|
-
|
165
|
-
|
166
|
-
|
114
|
+
def add_upload(upload_io, content_type: nil, content_id: nil)
|
115
|
+
header = {
|
116
|
+
'Content-Type' => content_type || 'application/octet-stream'
|
117
|
+
}
|
118
|
+
header['Content-Id'] = content_id unless content_id.nil?
|
119
|
+
@parts << Google::Apis::Core::FilePart.new(upload_io,
|
120
|
+
header).to_io(@boundary)
|
167
121
|
self
|
168
122
|
end
|
169
123
|
|
@@ -172,16 +126,10 @@ Content-Transfer-Encoding: %s\r
|
|
172
126
|
# @return [IO]
|
173
127
|
# IO stream
|
174
128
|
def assemble
|
175
|
-
@parts <<
|
176
|
-
|
177
|
-
len = 0
|
178
|
-
@parts.each do |part|
|
179
|
-
len += part.length
|
180
|
-
ios << part.to_io
|
181
|
-
end
|
182
|
-
Hurley::CompositeReadIO.new(len, *ios)
|
129
|
+
@parts << StringIO.new("--#{@boundary}--\r\n\r\n")
|
130
|
+
Google::Apis::Core::CompositeIO.new(*@parts)
|
183
131
|
end
|
184
132
|
end
|
185
133
|
end
|
186
134
|
end
|
187
|
-
end
|
135
|
+
end
|
@@ -18,58 +18,18 @@ require 'google/apis/core/api_command'
|
|
18
18
|
require 'google/apis/errors'
|
19
19
|
require 'addressable/uri'
|
20
20
|
require 'tempfile'
|
21
|
-
|
22
|
-
require 'mime/types/columnar'
|
23
|
-
rescue LoadError
|
24
|
-
# Temporary until next major bump when we can tighten
|
25
|
-
# dependency to mime-types >-=3.0
|
26
|
-
require 'mime-types'
|
27
|
-
end
|
21
|
+
require 'mime-types'
|
28
22
|
|
29
23
|
module Google
|
30
24
|
module Apis
|
31
25
|
module Core
|
32
|
-
# Extension of Hurley's UploadIO to add length accessor
|
33
|
-
class UploadIO < Hurley::UploadIO
|
34
|
-
OCTET_STREAM_CONTENT_TYPE = 'application/octet-stream'
|
35
|
-
|
36
|
-
# Get the length of the stream
|
37
|
-
# @return [Fixnum]
|
38
|
-
def length
|
39
|
-
io.respond_to?(:length) ? io.length : File.size(local_path)
|
40
|
-
end
|
41
|
-
|
42
|
-
# Create a new instance given a file path
|
43
|
-
# @param [String, File] file_name
|
44
|
-
# Path to file
|
45
|
-
# @param [String] content_type
|
46
|
-
# Optional content type. If nil, will attempt to auto-detect
|
47
|
-
# @return [Google::Apis::Core::UploadIO]
|
48
|
-
def self.from_file(file_name, content_type: nil)
|
49
|
-
if content_type.nil?
|
50
|
-
type = MIME::Types.of(file_name)
|
51
|
-
content_type = type.first.content_type unless type.nil? || type.empty?
|
52
|
-
end
|
53
|
-
new(file_name, content_type || OCTET_STREAM_CONTENT_TYPE)
|
54
|
-
end
|
55
|
-
|
56
|
-
# Wraps an IO stream in UploadIO
|
57
|
-
# @param [#read] io
|
58
|
-
# IO to wrap
|
59
|
-
# @param [String] content_type
|
60
|
-
# Optional content type.
|
61
|
-
# @return [Google::Apis::Core::UploadIO]
|
62
|
-
def self.from_io(io, content_type: OCTET_STREAM_CONTENT_TYPE)
|
63
|
-
new(io, content_type)
|
64
|
-
end
|
65
|
-
end
|
66
|
-
|
67
26
|
# Base upload command. Not intended to be used directly
|
68
27
|
# @private
|
69
28
|
class BaseUploadCommand < ApiCommand
|
70
29
|
UPLOAD_PROTOCOL_HEADER = 'X-Goog-Upload-Protocol'
|
71
30
|
UPLOAD_CONTENT_TYPE_HEADER = 'X-Goog-Upload-Header-Content-Type'
|
72
31
|
UPLOAD_CONTENT_LENGTH = 'X-Goog-Upload-Header-Content-Length'
|
32
|
+
CONTENT_TYPE_HEADER = 'Content-Type'
|
73
33
|
|
74
34
|
# File name or IO containing the content to upload
|
75
35
|
# @return [String, File, #read]
|
@@ -83,21 +43,29 @@ module Google
|
|
83
43
|
# @return [Google::Apis::Core::UploadIO]
|
84
44
|
attr_accessor :upload_io
|
85
45
|
|
86
|
-
# Ensure the content is readable and wrapped in an
|
46
|
+
# Ensure the content is readable and wrapped in an IO instance.
|
87
47
|
#
|
88
48
|
# @return [void]
|
89
49
|
# @raise [Google::Apis::ClientError] if upload source is invalid
|
90
50
|
def prepare!
|
91
51
|
super
|
92
52
|
if streamable?(upload_source)
|
93
|
-
self.upload_io =
|
53
|
+
self.upload_io = upload_source
|
94
54
|
@close_io_on_finish = false
|
95
|
-
elsif upload_source.is_a?(String)
|
96
|
-
self.upload_io =
|
55
|
+
elsif self.upload_source.is_a?(String)
|
56
|
+
self.upload_io = File.new(upload_source, 'r')
|
57
|
+
if self.upload_content_type.nil?
|
58
|
+
type = MIME::Types.of(upload_source)
|
59
|
+
self.upload_content_type = type.first.content_type unless type.nil? || type.empty?
|
60
|
+
end
|
97
61
|
@close_io_on_finish = true
|
98
62
|
else
|
99
63
|
fail Google::Apis::ClientError, 'Invalid upload source'
|
100
64
|
end
|
65
|
+
if self.upload_content_type.nil? || self.upload_content_type.empty?
|
66
|
+
self.upload_content_type = 'application/octet-stream'
|
67
|
+
end
|
68
|
+
puts self.upload_content_type.inspect
|
101
69
|
end
|
102
70
|
|
103
71
|
# Close IO stream when command done. Only closes the stream if it was opened by the command.
|
@@ -124,13 +92,12 @@ module Google
|
|
124
92
|
super
|
125
93
|
self.body = upload_io
|
126
94
|
header[UPLOAD_PROTOCOL_HEADER] = RAW_PROTOCOL
|
127
|
-
header[UPLOAD_CONTENT_TYPE_HEADER] =
|
95
|
+
header[UPLOAD_CONTENT_TYPE_HEADER] = upload_content_type
|
128
96
|
end
|
129
97
|
end
|
130
98
|
|
131
99
|
# Implementation of the multipart upload protocol
|
132
100
|
class MultipartUploadCommand < BaseUploadCommand
|
133
|
-
UPLOAD_BOUNDARY = 'RubyApiClientUpload'
|
134
101
|
MULTIPART_PROTOCOL = 'multipart'
|
135
102
|
MULTIPART_RELATED = 'multipart/related'
|
136
103
|
|
@@ -140,11 +107,11 @@ module Google
|
|
140
107
|
# @raise [Google::Apis::ClientError] if upload source is invalid
|
141
108
|
def prepare!
|
142
109
|
super
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
self.body =
|
147
|
-
header[
|
110
|
+
multipart = Multipart.new
|
111
|
+
multipart.add_json(body)
|
112
|
+
multipart.add_upload(upload_io, content_type: upload_content_type)
|
113
|
+
self.body = multipart.assemble
|
114
|
+
header['Content-Type'] = multipart.content_type
|
148
115
|
header[UPLOAD_PROTOCOL_HEADER] = MULTIPART_PROTOCOL
|
149
116
|
end
|
150
117
|
end
|
@@ -179,7 +146,7 @@ module Google
|
|
179
146
|
#
|
180
147
|
# @param [Fixnum] status
|
181
148
|
# HTTP status code of response
|
182
|
-
# @param [
|
149
|
+
# @param [HTTP::Message::Headers] header
|
183
150
|
# Response headers
|
184
151
|
# @param [String, #read] body
|
185
152
|
# Response body
|
@@ -189,9 +156,9 @@ module Google
|
|
189
156
|
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
190
157
|
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
191
158
|
def process_response(status, header, body)
|
192
|
-
@offset = Integer(header[BYTES_RECEIVED_HEADER])
|
193
|
-
@upload_url = header[UPLOAD_URL_HEADER]
|
194
|
-
upload_status = header[UPLOAD_STATUS_HEADER]
|
159
|
+
@offset = Integer(header[BYTES_RECEIVED_HEADER].first) unless header[BYTES_RECEIVED_HEADER].empty?
|
160
|
+
@upload_url = header[UPLOAD_URL_HEADER].first unless header[UPLOAD_URL_HEADER].empty?
|
161
|
+
upload_status = header[UPLOAD_STATUS_HEADER].first
|
195
162
|
logger.debug { sprintf('Upload status %s', upload_status) }
|
196
163
|
if upload_status == STATUS_ACTIVE
|
197
164
|
@state = :active
|
@@ -204,61 +171,69 @@ module Google
|
|
204
171
|
super(status, header, body)
|
205
172
|
end
|
206
173
|
|
207
|
-
# Send the start command to initiate the upload
|
208
|
-
#
|
209
|
-
# @param [Hurley::Client] client
|
210
|
-
# HTTP client
|
211
|
-
# @return [Hurley::Response]
|
212
|
-
# @raise [Google::Apis::ServerError] Unable to send the request
|
213
174
|
def send_start_command(client)
|
214
175
|
logger.debug { sprintf('Sending upload start command to %s', url) }
|
215
|
-
|
216
|
-
|
217
|
-
|
218
|
-
|
219
|
-
|
220
|
-
|
221
|
-
|
176
|
+
|
177
|
+
request_header = header.dup
|
178
|
+
apply_request_options(request_header)
|
179
|
+
request_header[UPLOAD_PROTOCOL_HEADER] = RESUMABLE
|
180
|
+
request_header[UPLOAD_COMMAND_HEADER] = START_COMMAND
|
181
|
+
request_header[UPLOAD_CONTENT_LENGTH] = upload_io.size.to_s
|
182
|
+
request_header[UPLOAD_CONTENT_TYPE_HEADER] = upload_content_type
|
183
|
+
|
184
|
+
client.request(method.to_s.upcase,
|
185
|
+
url.to_s, query: nil,
|
186
|
+
body: body,
|
187
|
+
header: request_header,
|
188
|
+
follow_redirect: true)
|
222
189
|
rescue => e
|
223
190
|
raise Google::Apis::ServerError, e.message
|
224
191
|
end
|
225
192
|
|
226
193
|
# Query for the status of an incomplete upload
|
227
194
|
#
|
228
|
-
# @param [
|
195
|
+
# @param [HTTPClient] client
|
229
196
|
# HTTP client
|
230
|
-
# @return [
|
197
|
+
# @return [HTTP::Message]
|
231
198
|
# @raise [Google::Apis::ServerError] Unable to send the request
|
232
199
|
def send_query_command(client)
|
233
200
|
logger.debug { sprintf('Sending upload query command to %s', @upload_url) }
|
234
|
-
|
235
|
-
|
236
|
-
|
237
|
-
|
201
|
+
|
202
|
+
request_header = header.dup
|
203
|
+
apply_request_options(request_header)
|
204
|
+
request_header[UPLOAD_COMMAND_HEADER] = QUERY_COMMAND
|
205
|
+
|
206
|
+
client.post(@upload_url, body: '', header: request_header, follow_redirect: true)
|
238
207
|
end
|
239
208
|
|
209
|
+
|
240
210
|
# Send the actual content
|
241
211
|
#
|
242
|
-
# @param [
|
212
|
+
# @param [HTTPClient] client
|
243
213
|
# HTTP client
|
244
|
-
# @return [
|
214
|
+
# @return [HTTP::Message]
|
245
215
|
# @raise [Google::Apis::ServerError] Unable to send the request
|
246
216
|
def send_upload_command(client)
|
247
217
|
logger.debug { sprintf('Sending upload command to %s', @upload_url) }
|
218
|
+
|
248
219
|
content = upload_io
|
249
220
|
content.pos = @offset
|
250
|
-
|
251
|
-
|
252
|
-
|
253
|
-
|
254
|
-
|
221
|
+
|
222
|
+
request_header = header.dup
|
223
|
+
apply_request_options(request_header)
|
224
|
+
request_header[UPLOAD_COMMAND_HEADER] = QUERY_COMMAND
|
225
|
+
request_header[UPLOAD_COMMAND_HEADER] = UPLOAD_COMMAND
|
226
|
+
request_header[UPLOAD_OFFSET_HEADER] = @offset.to_s
|
227
|
+
request_header[CONTENT_TYPE_HEADER] = upload_content_type
|
228
|
+
|
229
|
+
client.post(@upload_url, body: content, header: request_header, follow_redirect: true)
|
255
230
|
end
|
256
231
|
|
257
232
|
# Execute the upload request once. This will typically perform two HTTP requests -- one to initiate or query
|
258
233
|
# for the status of the upload, the second to send the (remaining) content.
|
259
234
|
#
|
260
235
|
# @private
|
261
|
-
# @param [
|
236
|
+
# @param [HTTPClient] client
|
262
237
|
# HTTP client
|
263
238
|
# @yield [result, err] Result or error if block supplied
|
264
239
|
# @return [Object]
|