Skip to content

Commit e692401

Browse files
authored
Merge pull request #148 from Microsoft/users/tedchamb/dev
regen after adding support for methods that return header values as part of the payload.
2 parents bdf3271 + 1ba9274 commit e692401

File tree

68 files changed

+1524
-1788
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

68 files changed

+1524
-1788
lines changed

vsts/vsts/accounts/v4_0/accounts_client.py

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -74,9 +74,8 @@ def get_accounts(self, owner_id=None, member_id=None, properties=None):
7474
response = self._send(http_method='GET',
7575
location_id='229a6a53-b428-4ffb-a835-e8f36b5b4b1e',
7676
version='4.0',
77-
query_parameters=query_parameters,
78-
returns_collection=True)
79-
return self._deserialize('[Account]', response)
77+
query_parameters=query_parameters)
78+
return self._deserialize('[Account]', self._unwrap_collection(response))
8079

8180
def get_account_settings(self):
8281
"""GetAccountSettings.
@@ -85,7 +84,6 @@ def get_account_settings(self):
8584
"""
8685
response = self._send(http_method='GET',
8786
location_id='4e012dd4-f8e1-485d-9bb3-c50d83c5b71b',
88-
version='4.0-preview.1',
89-
returns_collection=True)
90-
return self._deserialize('{str}', response)
87+
version='4.0-preview.1')
88+
return self._deserialize('{str}', self._unwrap_collection(response))
9189

vsts/vsts/accounts/v4_1/accounts_client.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# --------------------------------------------------------------------------------------------
1+
# --------------------------------------------------------------------------------------------
22
# Copyright (c) Microsoft Corporation. All rights reserved.
33
# Licensed under the MIT License. See License.txt in the project root for license information.
44
# --------------------------------------------------------------------------------------------
@@ -43,7 +43,6 @@ def get_accounts(self, owner_id=None, member_id=None, properties=None):
4343
response = self._send(http_method='GET',
4444
location_id='229a6a53-b428-4ffb-a835-e8f36b5b4b1e',
4545
version='4.1',
46-
query_parameters=query_parameters,
47-
returns_collection=True)
48-
return self._deserialize('[Account]', response)
46+
query_parameters=query_parameters)
47+
return self._deserialize('[Account]', self._unwrap_collection(response))
4948

vsts/vsts/build/v4_0/build_client.py

Lines changed: 54 additions & 81 deletions
Large diffs are not rendered by default.

vsts/vsts/build/v4_1/build_client.py

Lines changed: 65 additions & 97 deletions
Large diffs are not rendered by default.

vsts/vsts/cloud_load_test/v4_1/cloud_load_test_client.py

Lines changed: 13 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# --------------------------------------------------------------------------------------------
1+
# --------------------------------------------------------------------------------------------
22
# Copyright (c) Microsoft Corporation. All rights reserved.
33
# Licensed under the MIT License. See License.txt in the project root for license information.
44
# --------------------------------------------------------------------------------------------
@@ -128,9 +128,8 @@ def get_applications(self, type=None):
128128
response = self._send(http_method='GET',
129129
location_id='2c986dce-8e8d-4142-b541-d016d5aff764',
130130
version='4.1',
131-
query_parameters=query_parameters,
132-
returns_collection=True)
133-
return self._deserialize('[Application]', response)
131+
query_parameters=query_parameters)
132+
return self._deserialize('[Application]', self._unwrap_collection(response))
134133

135134
def get_counters(self, test_run_id, group_names, include_summary=None):
136135
"""GetCounters.
@@ -151,9 +150,8 @@ def get_counters(self, test_run_id, group_names, include_summary=None):
151150
location_id='29265ea4-b5a5-4b2e-b054-47f5f6f00183',
152151
version='4.1',
153152
route_values=route_values,
154-
query_parameters=query_parameters,
155-
returns_collection=True)
156-
return self._deserialize('[TestRunCounterInstance]', response)
153+
query_parameters=query_parameters)
154+
return self._deserialize('[TestRunCounterInstance]', self._unwrap_collection(response))
157155

158156
def get_application_counters(self, application_id=None, plugintype=None):
159157
"""GetApplicationCounters.
@@ -169,9 +167,8 @@ def get_application_counters(self, application_id=None, plugintype=None):
169167
response = self._send(http_method='GET',
170168
location_id='c1275ce9-6d26-4bc6-926b-b846502e812d',
171169
version='4.1',
172-
query_parameters=query_parameters,
173-
returns_collection=True)
174-
return self._deserialize('[ApplicationCounters]', response)
170+
query_parameters=query_parameters)
171+
return self._deserialize('[ApplicationCounters]', self._unwrap_collection(response))
175172

176173
def get_counter_samples(self, counter_sample_query_details, test_run_id):
177174
"""GetCounterSamples.
@@ -226,9 +223,8 @@ def get_test_run_messages(self, test_run_id):
226223
response = self._send(http_method='GET',
227224
location_id='2e7ba122-f522-4205-845b-2d270e59850a',
228225
version='4.1',
229-
route_values=route_values,
230-
returns_collection=True)
231-
return self._deserialize('[Microsoft.VisualStudio.TestService.WebApiModel.TestRunMessage]', response)
226+
route_values=route_values)
227+
return self._deserialize('[Microsoft.VisualStudio.TestService.WebApiModel.TestRunMessage]', self._unwrap_collection(response))
232228

233229
def get_plugin(self, type):
234230
"""GetPlugin.
@@ -250,9 +246,8 @@ def get_plugins(self):
250246
"""
251247
response = self._send(http_method='GET',
252248
location_id='7dcb0bb2-42d5-4729-9958-c0401d5e7693',
253-
version='4.1',
254-
returns_collection=True)
255-
return self._deserialize('[ApplicationType]', response)
249+
version='4.1')
250+
return self._deserialize('[ApplicationType]', self._unwrap_collection(response))
256251

257252
def get_load_test_result(self, test_run_id):
258253
"""GetLoadTestResult.
@@ -311,9 +306,8 @@ def get_test_definitions(self, from_date=None, to_date=None, top=None):
311306
response = self._send(http_method='GET',
312307
location_id='a8f9b135-f604-41ea-9d74-d9a5fd32fcd8',
313308
version='4.1',
314-
query_parameters=query_parameters,
315-
returns_collection=True)
316-
return self._deserialize('[TestDefinitionBasic]', response)
309+
query_parameters=query_parameters)
310+
return self._deserialize('[TestDefinitionBasic]', self._unwrap_collection(response))
317311

318312
def update_test_definition(self, test_definition):
319313
"""UpdateTestDefinition.

vsts/vsts/contributions/v4_0/contributions_client.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -71,9 +71,8 @@ def get_installed_extensions(self, contribution_ids=None, include_disabled_apps=
7171
response = self._send(http_method='GET',
7272
location_id='2648442b-fd63-4b9a-902f-0c913510f139',
7373
version='4.0-preview.1',
74-
query_parameters=query_parameters,
75-
returns_collection=True)
76-
return self._deserialize('[InstalledExtension]', response)
74+
query_parameters=query_parameters)
75+
return self._deserialize('[InstalledExtension]', self._unwrap_collection(response))
7776

7877
def get_installed_extension_by_name(self, publisher_name, extension_name, asset_types=None):
7978
"""GetInstalledExtensionByName.

vsts/vsts/contributions/v4_1/contributions_client.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# --------------------------------------------------------------------------------------------
1+
# --------------------------------------------------------------------------------------------
22
# Copyright (c) Microsoft Corporation. All rights reserved.
33
# Licensed under the MIT License. See License.txt in the project root for license information.
44
# --------------------------------------------------------------------------------------------
@@ -79,9 +79,8 @@ def get_installed_extensions(self, contribution_ids=None, include_disabled_apps=
7979
response = self._send(http_method='GET',
8080
location_id='2648442b-fd63-4b9a-902f-0c913510f139',
8181
version='4.1-preview.1',
82-
query_parameters=query_parameters,
83-
returns_collection=True)
84-
return self._deserialize('[InstalledExtension]', response)
82+
query_parameters=query_parameters)
83+
return self._deserialize('[InstalledExtension]', self._unwrap_collection(response))
8584

8685
def get_installed_extension_by_name(self, publisher_name, extension_name, asset_types=None):
8786
"""GetInstalledExtensionByName.

vsts/vsts/core/v4_0/core_client.py

Lines changed: 20 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -78,9 +78,8 @@ def get_connected_services(self, project_id, kind=None):
7878
location_id='b4f70219-e18b-42c5-abe3-98b07d35525e',
7979
version='4.0-preview.1',
8080
route_values=route_values,
81-
query_parameters=query_parameters,
82-
returns_collection=True)
83-
return self._deserialize('[WebApiConnectedService]', response)
81+
query_parameters=query_parameters)
82+
return self._deserialize('[WebApiConnectedService]', self._unwrap_collection(response))
8483

8584
def create_identity_mru(self, mru_data, mru_name):
8685
"""CreateIdentityMru.
@@ -110,9 +109,8 @@ def get_identity_mru(self, mru_name):
110109
response = self._send(http_method='GET',
111110
location_id='5ead0b70-2572-4697-97e9-f341069a783a',
112111
version='4.0-preview.1',
113-
route_values=route_values,
114-
returns_collection=True)
115-
return self._deserialize('[IdentityRef]', response)
112+
route_values=route_values)
113+
return self._deserialize('[IdentityRef]', self._unwrap_collection(response))
116114

117115
def update_identity_mru(self, mru_data, mru_name):
118116
"""UpdateIdentityMru.
@@ -152,9 +150,8 @@ def get_team_members(self, project_id, team_id, top=None, skip=None):
152150
location_id='294c494c-2600-4d7e-b76c-3dd50c3c95be',
153151
version='4.0',
154152
route_values=route_values,
155-
query_parameters=query_parameters,
156-
returns_collection=True)
157-
return self._deserialize('[IdentityRef]', response)
153+
query_parameters=query_parameters)
154+
return self._deserialize('[IdentityRef]', self._unwrap_collection(response))
158155

159156
def get_process_by_id(self, process_id):
160157
"""GetProcessById.
@@ -178,9 +175,8 @@ def get_processes(self):
178175
"""
179176
response = self._send(http_method='GET',
180177
location_id='93878975-88c5-4e6a-8abb-7ddd77a8a7d8',
181-
version='4.0',
182-
returns_collection=True)
183-
return self._deserialize('[Process]', response)
178+
version='4.0')
179+
return self._deserialize('[Process]', self._unwrap_collection(response))
184180

185181
def get_project_collection(self, collection_id):
186182
"""GetProjectCollection.
@@ -212,9 +208,8 @@ def get_project_collections(self, top=None, skip=None):
212208
response = self._send(http_method='GET',
213209
location_id='8031090f-ef1d-4af6-85fc-698cd75d42bf',
214210
version='4.0',
215-
query_parameters=query_parameters,
216-
returns_collection=True)
217-
return self._deserialize('[TeamProjectCollectionReference]', response)
211+
query_parameters=query_parameters)
212+
return self._deserialize('[TeamProjectCollectionReference]', self._unwrap_collection(response))
218213

219214
def get_project_history_entries(self, min_revision=None):
220215
"""GetProjectHistoryEntries.
@@ -228,9 +223,8 @@ def get_project_history_entries(self, min_revision=None):
228223
response = self._send(http_method='GET',
229224
location_id='6488a877-4749-4954-82ea-7340d36be9f2',
230225
version='4.0-preview.2',
231-
query_parameters=query_parameters,
232-
returns_collection=True)
233-
return self._deserialize('[ProjectInfo]', response)
226+
query_parameters=query_parameters)
227+
return self._deserialize('[ProjectInfo]', self._unwrap_collection(response))
234228

235229
def get_project(self, project_id, include_capabilities=None, include_history=None):
236230
"""GetProject.
@@ -276,9 +270,8 @@ def get_projects(self, state_filter=None, top=None, skip=None, continuation_toke
276270
response = self._send(http_method='GET',
277271
location_id='603fe2ac-9723-48b9-88ad-09305aa6c6e1',
278272
version='4.0',
279-
query_parameters=query_parameters,
280-
returns_collection=True)
281-
return self._deserialize('[TeamProjectReference]', response)
273+
query_parameters=query_parameters)
274+
return self._deserialize('[TeamProjectReference]', self._unwrap_collection(response))
282275

283276
def queue_create_project(self, project_to_create):
284277
"""QueueCreateProject.
@@ -344,9 +337,8 @@ def get_project_properties(self, project_id, keys=None):
344337
location_id='4976a71a-4487-49aa-8aab-a1eda469037a',
345338
version='4.0-preview.1',
346339
route_values=route_values,
347-
query_parameters=query_parameters,
348-
returns_collection=True)
349-
return self._deserialize('[ProjectProperty]', response)
340+
query_parameters=query_parameters)
341+
return self._deserialize('[ProjectProperty]', self._unwrap_collection(response))
350342

351343
def set_project_properties(self, project_id, patch_document):
352344
"""SetProjectProperties.
@@ -406,9 +398,8 @@ def get_proxies(self, proxy_url=None):
406398
response = self._send(http_method='GET',
407399
location_id='ec1f4311-f2b4-4c15-b2b8-8990b80d2908',
408400
version='4.0-preview.2',
409-
query_parameters=query_parameters,
410-
returns_collection=True)
411-
return self._deserialize('[Proxy]', response)
401+
query_parameters=query_parameters)
402+
return self._deserialize('[Proxy]', self._unwrap_collection(response))
412403

413404
def create_team(self, team, project_id):
414405
"""CreateTeam.
@@ -481,9 +472,8 @@ def get_teams(self, project_id, top=None, skip=None):
481472
location_id='d30a3dd1-f8ba-442a-b86a-bd0c0c383e59',
482473
version='4.0',
483474
route_values=route_values,
484-
query_parameters=query_parameters,
485-
returns_collection=True)
486-
return self._deserialize('[WebApiTeam]', response)
475+
query_parameters=query_parameters)
476+
return self._deserialize('[WebApiTeam]', self._unwrap_collection(response))
487477

488478
def update_team(self, team_data, project_id, team_id):
489479
"""UpdateTeam.

0 commit comments

Comments
 (0)