@@ -320,6 +320,42 @@ def get_widget(self, team_context, dashboard_id, widget_id):
320
320
route_values = route_values )
321
321
return self ._deserialize ('Widget' , response )
322
322
323
+ def get_widgets (self , team_context , dashboard_id , eTag = None ):
324
+ """GetWidgets.
325
+ [Preview API]
326
+ :param :class:`<TeamContext> <dashboard.v4_0.models.TeamContext>` team_context: The team context for the operation
327
+ :param str dashboard_id:
328
+ :param String eTag: Dashboard Widgets Version
329
+ :rtype: :class:`<WidgetsVersionedList> <dashboard.v4_0.models.WidgetsVersionedList>`
330
+ """
331
+ project = None
332
+ team = None
333
+ if team_context is not None :
334
+ if team_context .project_id :
335
+ project = team_context .project_id
336
+ else :
337
+ project = team_context .project
338
+ if team_context .team_id :
339
+ team = team_context .team_id
340
+ else :
341
+ team = team_context .team
342
+
343
+ route_values = {}
344
+ if project is not None :
345
+ route_values ['project' ] = self ._serialize .url ('project' , project , 'string' )
346
+ if team is not None :
347
+ route_values ['team' ] = self ._serialize .url ('team' , team , 'string' )
348
+ if dashboard_id is not None :
349
+ route_values ['dashboardId' ] = self ._serialize .url ('dashboard_id' , dashboard_id , 'str' )
350
+ response = self ._send (http_method = 'GET' ,
351
+ location_id = 'bdcff53a-8355-4172-a00a-40497ea23afc' ,
352
+ version = '4.0-preview.2' ,
353
+ route_values = route_values )
354
+ response_object = models .WidgetsVersionedList ()
355
+ response_object .widgets = self ._deserialize ('[Widget]' , self ._unwrap_collection (response ))
356
+ response_object .eTag = response .headers .get ('ETag' )
357
+ return response_object
358
+
323
359
def replace_widget (self , widget , team_context , dashboard_id , widget_id ):
324
360
"""ReplaceWidget.
325
361
[Preview API]
@@ -358,6 +394,45 @@ def replace_widget(self, widget, team_context, dashboard_id, widget_id):
358
394
content = content )
359
395
return self ._deserialize ('Widget' , response )
360
396
397
+ def replace_widgets (self , widgets , team_context , dashboard_id , eTag = None ):
398
+ """ReplaceWidgets.
399
+ [Preview API]
400
+ :param [Widget] widgets:
401
+ :param :class:`<TeamContext> <dashboard.v4_0.models.TeamContext>` team_context: The team context for the operation
402
+ :param str dashboard_id:
403
+ :param String eTag: Dashboard Widgets Version
404
+ :rtype: :class:`<WidgetsVersionedList> <dashboard.v4_0.models.WidgetsVersionedList>`
405
+ """
406
+ project = None
407
+ team = None
408
+ if team_context is not None :
409
+ if team_context .project_id :
410
+ project = team_context .project_id
411
+ else :
412
+ project = team_context .project
413
+ if team_context .team_id :
414
+ team = team_context .team_id
415
+ else :
416
+ team = team_context .team
417
+
418
+ route_values = {}
419
+ if project is not None :
420
+ route_values ['project' ] = self ._serialize .url ('project' , project , 'string' )
421
+ if team is not None :
422
+ route_values ['team' ] = self ._serialize .url ('team' , team , 'string' )
423
+ if dashboard_id is not None :
424
+ route_values ['dashboardId' ] = self ._serialize .url ('dashboard_id' , dashboard_id , 'str' )
425
+ content = self ._serialize .body (widgets , '[Widget]' )
426
+ response = self ._send (http_method = 'PUT' ,
427
+ location_id = 'bdcff53a-8355-4172-a00a-40497ea23afc' ,
428
+ version = '4.0-preview.2' ,
429
+ route_values = route_values ,
430
+ content = content )
431
+ response_object = models .WidgetsVersionedList ()
432
+ response_object .widgets = self ._deserialize ('[Widget]' , self ._unwrap_collection (response ))
433
+ response_object .eTag = response .headers .get ('ETag' )
434
+ return response_object
435
+
361
436
def update_widget (self , widget , team_context , dashboard_id , widget_id ):
362
437
"""UpdateWidget.
363
438
[Preview API]
@@ -396,6 +471,45 @@ def update_widget(self, widget, team_context, dashboard_id, widget_id):
396
471
content = content )
397
472
return self ._deserialize ('Widget' , response )
398
473
474
+ def update_widgets (self , widgets , team_context , dashboard_id , eTag = None ):
475
+ """UpdateWidgets.
476
+ [Preview API]
477
+ :param [Widget] widgets:
478
+ :param :class:`<TeamContext> <dashboard.v4_0.models.TeamContext>` team_context: The team context for the operation
479
+ :param str dashboard_id:
480
+ :param String eTag: Dashboard Widgets Version
481
+ :rtype: :class:`<WidgetsVersionedList> <dashboard.v4_0.models.WidgetsVersionedList>`
482
+ """
483
+ project = None
484
+ team = None
485
+ if team_context is not None :
486
+ if team_context .project_id :
487
+ project = team_context .project_id
488
+ else :
489
+ project = team_context .project
490
+ if team_context .team_id :
491
+ team = team_context .team_id
492
+ else :
493
+ team = team_context .team
494
+
495
+ route_values = {}
496
+ if project is not None :
497
+ route_values ['project' ] = self ._serialize .url ('project' , project , 'string' )
498
+ if team is not None :
499
+ route_values ['team' ] = self ._serialize .url ('team' , team , 'string' )
500
+ if dashboard_id is not None :
501
+ route_values ['dashboardId' ] = self ._serialize .url ('dashboard_id' , dashboard_id , 'str' )
502
+ content = self ._serialize .body (widgets , '[Widget]' )
503
+ response = self ._send (http_method = 'PATCH' ,
504
+ location_id = 'bdcff53a-8355-4172-a00a-40497ea23afc' ,
505
+ version = '4.0-preview.2' ,
506
+ route_values = route_values ,
507
+ content = content )
508
+ response_object = models .WidgetsVersionedList ()
509
+ response_object .widgets = self ._deserialize ('[Widget]' , self ._unwrap_collection (response ))
510
+ response_object .eTag = response .headers .get ('ETag' )
511
+ return response_object
512
+
399
513
def get_widget_metadata (self , contribution_id ):
400
514
"""GetWidgetMetadata.
401
515
[Preview API]
0 commit comments