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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +5 -0
- data/generated/google/apis/adsense_v1_4.rb +1 -1
- data/generated/google/apis/adsensehost_v4_1.rb +1 -1
- data/generated/google/apis/androidenterprise_v1.rb +1 -1
- data/generated/google/apis/androidenterprise_v1/classes.rb +8 -8
- data/generated/google/apis/appsactivity_v1.rb +1 -1
- data/generated/google/apis/appstate_v1.rb +1 -1
- data/generated/google/apis/bigquery_v2.rb +1 -1
- data/generated/google/apis/bigquery_v2/classes.rb +2 -6
- data/generated/google/apis/bigquery_v2/representations.rb +1 -1
- data/generated/google/apis/bigquery_v2/service.rb +4 -5
- data/generated/google/apis/books_v1.rb +1 -1
- data/generated/google/apis/books_v1/service.rb +5 -1
- data/generated/google/apis/calendar_v3.rb +1 -1
- data/generated/google/apis/cloudbuild_v1.rb +1 -1
- data/generated/google/apis/cloudbuild_v1/classes.rb +32 -19
- data/generated/google/apis/cloudbuild_v1/representations.rb +5 -3
- data/generated/google/apis/cloudbuild_v1/service.rb +4 -1
- data/generated/google/apis/compute_beta.rb +1 -1
- data/generated/google/apis/compute_beta/classes.rb +226 -11
- data/generated/google/apis/compute_beta/representations.rb +85 -0
- data/generated/google/apis/compute_beta/service.rb +465 -0
- data/generated/google/apis/compute_v1.rb +1 -1
- data/generated/google/apis/compute_v1/classes.rb +654 -11
- data/generated/google/apis/compute_v1/representations.rb +231 -0
- data/generated/google/apis/compute_v1/service.rb +574 -0
- data/generated/google/apis/content_v2.rb +1 -1
- data/generated/google/apis/content_v2/classes.rb +6 -0
- data/generated/google/apis/content_v2/representations.rb +1 -0
- data/generated/google/apis/deploymentmanager_v2.rb +1 -1
- data/generated/google/apis/doubleclicksearch_v2.rb +1 -1
- data/generated/google/apis/drive_v2.rb +1 -1
- data/generated/google/apis/drive_v3.rb +1 -1
- data/generated/google/apis/drive_v3/classes.rb +30 -16
- data/generated/google/apis/fitness_v1.rb +1 -1
- data/generated/google/apis/fitness_v1/classes.rb +8 -1
- data/generated/google/apis/fitness_v1/representations.rb +1 -0
- data/generated/google/apis/games_configuration_v1configuration.rb +1 -1
- data/generated/google/apis/games_management_v1management.rb +1 -1
- data/generated/google/apis/games_v1.rb +1 -1
- data/generated/google/apis/genomics_v1.rb +1 -1
- data/generated/google/apis/genomics_v1/classes.rb +7 -7
- data/generated/google/apis/genomics_v1/service.rb +1 -1
- data/generated/google/apis/identitytoolkit_v3.rb +1 -1
- data/generated/google/apis/identitytoolkit_v3/classes.rb +63 -4
- data/generated/google/apis/identitytoolkit_v3/representations.rb +20 -0
- data/generated/google/apis/language_v1beta1.rb +1 -1
- data/generated/google/apis/monitoring_v3.rb +2 -2
- data/generated/google/apis/monitoring_v3/classes.rb +14 -10
- data/generated/google/apis/monitoring_v3/service.rb +1 -1
- data/generated/google/apis/oauth2_v2.rb +1 -1
- data/generated/google/apis/plus_domains_v1.rb +1 -1
- data/generated/google/apis/plus_v1.rb +1 -1
- data/generated/google/apis/sheets_v4.rb +1 -1
- data/generated/google/apis/speech_v1beta1.rb +1 -1
- data/generated/google/apis/speech_v1beta1/classes.rb +9 -0
- data/generated/google/apis/speech_v1beta1/representations.rb +1 -0
- data/generated/google/apis/speech_v1beta1/service.rb +2 -2
- data/generated/google/apis/sqladmin_v1beta4.rb +1 -1
- data/generated/google/apis/storage_v1.rb +1 -1
- data/generated/google/apis/storage_v1/classes.rb +0 -34
- data/generated/google/apis/storage_v1/representations.rb +0 -16
- data/generated/google/apis/storage_v1/service.rb +3 -18
- data/generated/google/apis/youtube_partner_v1.rb +1 -1
- data/lib/google/apis/core/api_command.rb +4 -0
- data/lib/google/apis/core/download.rb +7 -2
- data/lib/google/apis/core/http_command.rb +5 -1
- data/lib/google/apis/version.rb +1 -1
- 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 = '
|
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'
|
@@ -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(
|
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
|
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?
|
data/lib/google/apis/version.rb
CHANGED
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.
|
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-
|
14
|
+
date: 2016-09-19 00:00:00.000000000 Z
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
17
17
|
name: representable
|