azure_mgmt_mobile_engagement 0.6.0 → 0.7.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -52,8 +52,8 @@ module Azure::ARM::MobileEngagement
52
52
  response = list_async(skip, top, orderby, custom_headers).value!
53
53
  unless response.nil?
54
54
  page = response.body
55
- page.next_method = Proc.new do |next_link|
56
- list_next_async(next_link, custom_headers)
55
+ page.next_method = Proc.new do |next_page_link|
56
+ list_next_async(next_page_link, custom_headers)
57
57
  end
58
58
  page
59
59
  end
@@ -157,30 +157,27 @@ module Azure::ARM::MobileEngagement
157
157
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
158
158
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
159
159
  path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileEngagement/appcollections/{appCollection}/apps/{appName}/devices/importTasks'
160
+
161
+ request_url = @base_url || @client.base_url
162
+
160
163
  options = {
161
164
  middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
162
165
  path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => @client.resource_group_name,'appCollection' => @client.app_collection,'appName' => @client.app_name},
163
166
  query_params: {'api-version' => @client.api_version,'$skip' => skip,'$top' => top,'$orderby' => orderby},
164
- headers: request_headers.merge(custom_headers || {})
167
+ headers: request_headers.merge(custom_headers || {}),
168
+ base_url: request_url
165
169
  }
170
+ promise = @client.make_request_async(:get, path_template, options)
166
171
 
167
- request_url = @base_url || @client.base_url
168
-
169
- request = MsRest::HttpOperationRequest.new(request_url, path_template, :get, options)
170
- promise = request.run_promise do |req|
171
- @client.credentials.sign_request(req) unless @client.credentials.nil?
172
- end
173
-
174
- promise = promise.then do |http_response|
172
+ promise = promise.then do |result|
173
+ http_response = result.response
175
174
  status_code = http_response.status
176
175
  response_content = http_response.body
177
176
  unless status_code == 200
178
177
  error_model = JSON.load(response_content)
179
- fail MsRest::HttpOperationError.new(request, http_response, error_model)
178
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
180
179
  end
181
180
 
182
- # Create Result
183
- result = MsRestAzure::AzureOperationResponse.new(request, http_response)
184
181
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
185
182
  # Deserialize Response
186
183
  if status_code == 200
@@ -258,31 +255,28 @@ module Azure::ARM::MobileEngagement
258
255
  request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
259
256
 
260
257
  path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileEngagement/appcollections/{appCollection}/apps/{appName}/devices/importTasks'
258
+
259
+ request_url = @base_url || @client.base_url
260
+
261
261
  options = {
262
262
  middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
263
263
  path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => @client.resource_group_name,'appCollection' => @client.app_collection,'appName' => @client.app_name},
264
264
  query_params: {'api-version' => @client.api_version},
265
265
  body: request_content,
266
- headers: request_headers.merge(custom_headers || {})
266
+ headers: request_headers.merge(custom_headers || {}),
267
+ base_url: request_url
267
268
  }
269
+ promise = @client.make_request_async(:post, path_template, options)
268
270
 
269
- request_url = @base_url || @client.base_url
270
-
271
- request = MsRest::HttpOperationRequest.new(request_url, path_template, :post, options)
272
- promise = request.run_promise do |req|
273
- @client.credentials.sign_request(req) unless @client.credentials.nil?
274
- end
275
-
276
- promise = promise.then do |http_response|
271
+ promise = promise.then do |result|
272
+ http_response = result.response
277
273
  status_code = http_response.status
278
274
  response_content = http_response.body
279
275
  unless status_code == 201 || status_code == 202
280
276
  error_model = JSON.load(response_content)
281
- fail MsRest::HttpOperationError.new(request, http_response, error_model)
277
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
282
278
  end
283
279
 
284
- # Create Result
285
- result = MsRestAzure::AzureOperationResponse.new(request, http_response)
286
280
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
287
281
  # Deserialize Response
288
282
  if status_code == 201
@@ -365,30 +359,27 @@ module Azure::ARM::MobileEngagement
365
359
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
366
360
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
367
361
  path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileEngagement/appcollections/{appCollection}/apps/{appName}/devices/importTasks/{id}'
362
+
363
+ request_url = @base_url || @client.base_url
364
+
368
365
  options = {
369
366
  middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
370
367
  path_params: {'id' => id,'subscriptionId' => @client.subscription_id,'resourceGroupName' => @client.resource_group_name,'appCollection' => @client.app_collection,'appName' => @client.app_name},
371
368
  query_params: {'api-version' => @client.api_version},
372
- headers: request_headers.merge(custom_headers || {})
369
+ headers: request_headers.merge(custom_headers || {}),
370
+ base_url: request_url
373
371
  }
372
+ promise = @client.make_request_async(:get, path_template, options)
374
373
 
375
- request_url = @base_url || @client.base_url
376
-
377
- request = MsRest::HttpOperationRequest.new(request_url, path_template, :get, options)
378
- promise = request.run_promise do |req|
379
- @client.credentials.sign_request(req) unless @client.credentials.nil?
380
- end
381
-
382
- promise = promise.then do |http_response|
374
+ promise = promise.then do |result|
375
+ http_response = result.response
383
376
  status_code = http_response.status
384
377
  response_content = http_response.body
385
378
  unless status_code == 200
386
379
  error_model = JSON.load(response_content)
387
- fail MsRest::HttpOperationError.new(request, http_response, error_model)
380
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
388
381
  end
389
382
 
390
- # Create Result
391
- result = MsRestAzure::AzureOperationResponse.new(request, http_response)
392
383
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
393
384
  # Deserialize Response
394
385
  if status_code == 200
@@ -456,29 +447,26 @@ module Azure::ARM::MobileEngagement
456
447
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
457
448
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
458
449
  path_template = '{nextLink}'
450
+
451
+ request_url = @base_url || @client.base_url
452
+
459
453
  options = {
460
454
  middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
461
455
  skip_encoding_path_params: {'nextLink' => next_page_link},
462
- headers: request_headers.merge(custom_headers || {})
456
+ headers: request_headers.merge(custom_headers || {}),
457
+ base_url: request_url
463
458
  }
459
+ promise = @client.make_request_async(:get, path_template, options)
464
460
 
465
- request_url = @base_url || @client.base_url
466
-
467
- request = MsRest::HttpOperationRequest.new(request_url, path_template, :get, options)
468
- promise = request.run_promise do |req|
469
- @client.credentials.sign_request(req) unless @client.credentials.nil?
470
- end
471
-
472
- promise = promise.then do |http_response|
461
+ promise = promise.then do |result|
462
+ http_response = result.response
473
463
  status_code = http_response.status
474
464
  response_content = http_response.body
475
465
  unless status_code == 200
476
466
  error_model = JSON.load(response_content)
477
- fail MsRest::HttpOperationError.new(request, http_response, error_model)
467
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
478
468
  end
479
469
 
480
- # Create Result
481
- result = MsRestAzure::AzureOperationResponse.new(request, http_response)
482
470
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
483
471
  # Deserialize Response
484
472
  if status_code == 200
@@ -66,30 +66,27 @@ module Azure::ARM::MobileEngagement
66
66
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
67
67
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
68
68
  path_template = '/subscriptions/{subscriptionId}/providers/Microsoft.MobileEngagement/supportedPlatforms'
69
+
70
+ request_url = @base_url || @client.base_url
71
+
69
72
  options = {
70
73
  middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
71
74
  path_params: {'subscriptionId' => @client.subscription_id},
72
75
  query_params: {'api-version' => @client.api_version},
73
- headers: request_headers.merge(custom_headers || {})
76
+ headers: request_headers.merge(custom_headers || {}),
77
+ base_url: request_url
74
78
  }
79
+ promise = @client.make_request_async(:get, path_template, options)
75
80
 
76
- request_url = @base_url || @client.base_url
77
-
78
- request = MsRest::HttpOperationRequest.new(request_url, path_template, :get, options)
79
- promise = request.run_promise do |req|
80
- @client.credentials.sign_request(req) unless @client.credentials.nil?
81
- end
82
-
83
- promise = promise.then do |http_response|
81
+ promise = promise.then do |result|
82
+ http_response = result.response
84
83
  status_code = http_response.status
85
84
  response_content = http_response.body
86
85
  unless status_code == 200
87
86
  error_model = JSON.load(response_content)
88
- fail MsRest::HttpOperationError.new(request, http_response, error_model)
87
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
89
88
  end
90
89
 
91
- # Create Result
92
- result = MsRestAzure::AzureOperationResponse.new(request, http_response)
93
90
  result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
94
91
  # Deserialize Response
95
92
  if status_code == 200
@@ -4,5 +4,5 @@
4
4
  # regenerated.
5
5
 
6
6
  module Azure::ARM::MobileEngagement
7
- VERSION = '0.6.0'
7
+ VERSION = '0.7.0'
8
8
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: azure_mgmt_mobile_engagement
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.0
4
+ version: 0.7.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Microsoft Corporation
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-09-15 00:00:00.000000000 Z
11
+ date: 2016-10-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -72,14 +72,14 @@ dependencies:
72
72
  requirements:
73
73
  - - "~>"
74
74
  - !ruby/object:Gem::Version
75
- version: 0.5.0
75
+ version: 0.6.0
76
76
  type: :runtime
77
77
  prerelease: false
78
78
  version_requirements: !ruby/object:Gem::Requirement
79
79
  requirements:
80
80
  - - "~>"
81
81
  - !ruby/object:Gem::Version
82
- version: 0.5.0
82
+ version: 0.6.0
83
83
  description: Microsoft Azure Mobile Engagement Management Client Library for Ruby
84
84
  email: azrubyteam@microsoft.com
85
85
  executables: []
@@ -199,7 +199,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
199
199
  requirements:
200
200
  - - ">="
201
201
  - !ruby/object:Gem::Version
202
- version: 1.9.3
202
+ version: 2.0.0
203
203
  required_rubygems_version: !ruby/object:Gem::Requirement
204
204
  requirements:
205
205
  - - ">="