google-api-client 0.9.13 → 0.9.14

Sign up to get free protection for your applications and to get access to all the features.
Files changed (70) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +5 -0
  3. data/generated/google/apis/adsense_v1_4.rb +1 -1
  4. data/generated/google/apis/adsensehost_v4_1.rb +1 -1
  5. data/generated/google/apis/androidenterprise_v1.rb +1 -1
  6. data/generated/google/apis/androidenterprise_v1/classes.rb +8 -8
  7. data/generated/google/apis/appsactivity_v1.rb +1 -1
  8. data/generated/google/apis/appstate_v1.rb +1 -1
  9. data/generated/google/apis/bigquery_v2.rb +1 -1
  10. data/generated/google/apis/bigquery_v2/classes.rb +2 -6
  11. data/generated/google/apis/bigquery_v2/representations.rb +1 -1
  12. data/generated/google/apis/bigquery_v2/service.rb +4 -5
  13. data/generated/google/apis/books_v1.rb +1 -1
  14. data/generated/google/apis/books_v1/service.rb +5 -1
  15. data/generated/google/apis/calendar_v3.rb +1 -1
  16. data/generated/google/apis/cloudbuild_v1.rb +1 -1
  17. data/generated/google/apis/cloudbuild_v1/classes.rb +32 -19
  18. data/generated/google/apis/cloudbuild_v1/representations.rb +5 -3
  19. data/generated/google/apis/cloudbuild_v1/service.rb +4 -1
  20. data/generated/google/apis/compute_beta.rb +1 -1
  21. data/generated/google/apis/compute_beta/classes.rb +226 -11
  22. data/generated/google/apis/compute_beta/representations.rb +85 -0
  23. data/generated/google/apis/compute_beta/service.rb +465 -0
  24. data/generated/google/apis/compute_v1.rb +1 -1
  25. data/generated/google/apis/compute_v1/classes.rb +654 -11
  26. data/generated/google/apis/compute_v1/representations.rb +231 -0
  27. data/generated/google/apis/compute_v1/service.rb +574 -0
  28. data/generated/google/apis/content_v2.rb +1 -1
  29. data/generated/google/apis/content_v2/classes.rb +6 -0
  30. data/generated/google/apis/content_v2/representations.rb +1 -0
  31. data/generated/google/apis/deploymentmanager_v2.rb +1 -1
  32. data/generated/google/apis/doubleclicksearch_v2.rb +1 -1
  33. data/generated/google/apis/drive_v2.rb +1 -1
  34. data/generated/google/apis/drive_v3.rb +1 -1
  35. data/generated/google/apis/drive_v3/classes.rb +30 -16
  36. data/generated/google/apis/fitness_v1.rb +1 -1
  37. data/generated/google/apis/fitness_v1/classes.rb +8 -1
  38. data/generated/google/apis/fitness_v1/representations.rb +1 -0
  39. data/generated/google/apis/games_configuration_v1configuration.rb +1 -1
  40. data/generated/google/apis/games_management_v1management.rb +1 -1
  41. data/generated/google/apis/games_v1.rb +1 -1
  42. data/generated/google/apis/genomics_v1.rb +1 -1
  43. data/generated/google/apis/genomics_v1/classes.rb +7 -7
  44. data/generated/google/apis/genomics_v1/service.rb +1 -1
  45. data/generated/google/apis/identitytoolkit_v3.rb +1 -1
  46. data/generated/google/apis/identitytoolkit_v3/classes.rb +63 -4
  47. data/generated/google/apis/identitytoolkit_v3/representations.rb +20 -0
  48. data/generated/google/apis/language_v1beta1.rb +1 -1
  49. data/generated/google/apis/monitoring_v3.rb +2 -2
  50. data/generated/google/apis/monitoring_v3/classes.rb +14 -10
  51. data/generated/google/apis/monitoring_v3/service.rb +1 -1
  52. data/generated/google/apis/oauth2_v2.rb +1 -1
  53. data/generated/google/apis/plus_domains_v1.rb +1 -1
  54. data/generated/google/apis/plus_v1.rb +1 -1
  55. data/generated/google/apis/sheets_v4.rb +1 -1
  56. data/generated/google/apis/speech_v1beta1.rb +1 -1
  57. data/generated/google/apis/speech_v1beta1/classes.rb +9 -0
  58. data/generated/google/apis/speech_v1beta1/representations.rb +1 -0
  59. data/generated/google/apis/speech_v1beta1/service.rb +2 -2
  60. data/generated/google/apis/sqladmin_v1beta4.rb +1 -1
  61. data/generated/google/apis/storage_v1.rb +1 -1
  62. data/generated/google/apis/storage_v1/classes.rb +0 -34
  63. data/generated/google/apis/storage_v1/representations.rb +0 -16
  64. data/generated/google/apis/storage_v1/service.rb +3 -18
  65. data/generated/google/apis/youtube_partner_v1.rb +1 -1
  66. data/lib/google/apis/core/api_command.rb +4 -0
  67. data/lib/google/apis/core/download.rb +7 -2
  68. data/lib/google/apis/core/http_command.rb +5 -1
  69. data/lib/google/apis/version.rb +1 -1
  70. metadata +2 -2
@@ -25,7 +25,7 @@ module Google
25
25
  # @see https://developers.google.com/youtube/partner/
26
26
  module YoutubePartnerV1
27
27
  VERSION = 'V1'
28
- REVISION = '20160823'
28
+ REVISION = '20160913'
29
29
 
30
30
  # View and manage your assets and associated content on YouTube
31
31
  AUTH_YOUTUBEPARTNER = 'https://www.googleapis.com/auth/youtubepartner'
@@ -105,6 +105,10 @@ module Google
105
105
  end
106
106
  end
107
107
 
108
+ def allow_form_encoding?
109
+ request_representation.nil? && super
110
+ end
111
+
108
112
  private
109
113
 
110
114
  # Attempt to parse a JSON error message, returning the first found error
@@ -23,6 +23,7 @@ module Google
23
23
  # Streaming/resumable media download support
24
24
  class DownloadCommand < ApiCommand
25
25
  RANGE_HEADER = 'range'
26
+ OK_STATUS = [200, 201, 206]
26
27
 
27
28
  # File or IO to write content to
28
29
  # @return [String, File, #write]
@@ -65,7 +66,7 @@ module Google
65
66
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
66
67
  # @raise [Google::Apis::AuthorizationError] Authorization is required
67
68
  def execute_once(client, &block)
68
- client.get(@download_url || url) do |req|
69
+ response = client.get(@download_url || url) do |req|
69
70
  apply_request_options(req)
70
71
  check_if_rewind_needed = false
71
72
  if @offset > 0
@@ -73,7 +74,7 @@ module Google
73
74
  req.header[RANGE_HEADER] = sprintf('bytes=%d-', @offset)
74
75
  check_if_rewind_needed = true
75
76
  end
76
- req.on_body(200, 201, 206) do |res, chunk|
77
+ req.on_body(*OK_STATUS) do |res, chunk|
77
78
  check_status(res.status_code, chunk) unless res.status_code.nil?
78
79
  if check_if_rewind_needed && res.status_code != 206
79
80
  # Oh no! Requested a chunk, but received the entire content
@@ -88,6 +89,10 @@ module Google
88
89
  @download_io.flush
89
90
  end
90
91
  end
92
+
93
+ # Since the on_body block only runs on success, check status again just in case it failed
94
+ check_status(response.status_code, response.body) unless OK_STATUS.include?(response.status_code.to_i)
95
+
91
96
  if @close_io_on_finish
92
97
  result = nil
93
98
  else
@@ -146,7 +146,7 @@ module Google
146
146
  self.url = url.expand(params) if url.is_a?(Addressable::Template)
147
147
  url.query_values = query.merge(url.query_values || {})
148
148
 
149
- if [:post, :put].include?(method) && body.nil?
149
+ if allow_form_encoding?
150
150
  @form_encoded = true
151
151
  self.body = Addressable::URI.form_encode(url.query_values(Array))
152
152
  self.header['Content-Type'] = 'application/x-www-form-urlencoded; charset=UTF-8'
@@ -306,6 +306,10 @@ module Google
306
306
  req.options.open_timeout = options.open_timeout_sec
307
307
  end
308
308
 
309
+ def allow_form_encoding?
310
+ [:post, :put].include?(method) && body.nil?
311
+ end
312
+
309
313
  private
310
314
 
311
315
  def form_encoded?
@@ -15,7 +15,7 @@
15
15
  module Google
16
16
  module Apis
17
17
  # Client library version
18
- VERSION = '0.9.13'
18
+ VERSION = '0.9.14'
19
19
 
20
20
  # Current operating system
21
21
  # @private
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: google-api-client
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.13
4
+ version: 0.9.14
5
5
  platform: ruby
6
6
  authors:
7
7
  - Steven Bazyl
@@ -11,7 +11,7 @@ authors:
11
11
  autorequire:
12
12
  bindir: bin
13
13
  cert_chain: []
14
- date: 2016-08-31 00:00:00.000000000 Z
14
+ date: 2016-09-19 00:00:00.000000000 Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
17
  name: representable