@@ -529,6 +529,11 @@ def update(self, **kwds):
529529 # updates the channel 'existingCh' with the new provided properties and tags
530530 # without affecting the other tags and properties of this channel
531531
532+ update(channels = channels)
533+ >>> update(channels=[{'name':'existingCh','owner':'chOwner', 'tags':[...], 'properties':[...]}, {...}])
534+ # updates the channels in batch given with the new provided properties and tags
535+ # without affecting the other tags and properties of this channel
536+
532537 update(property = Property, channelName = String)
533538 >>> update(property={'name':'propName', 'owner':'propOwner', 'value':'propValue'},
534539 channelName='ch1')
@@ -585,6 +590,7 @@ def __handleSingleUpdateParameter(self, **kwds):
585590 Handle single update. It accepts key-value pair as parameters.
586591 The keys could be one of the following:
587592 - channel
593+ - channels
588594 - property
589595 - tag
590596 - tags
@@ -599,6 +605,14 @@ def __handleSingleUpdateParameter(self, **kwds):
599605 verify = False ,
600606 auth = self .__auth )
601607 r .raise_for_status ()
608+ elif 'channels' in kwds :
609+ chs = kwds ['channels' ]
610+ r = self .__session .post (self .__baseURL + self .__channelsResource ,
611+ data = JSONEncoder ().encode (chs ),
612+ headers = copy (self .__jsonheader ),
613+ verify = False ,
614+ auth = self .__auth )
615+ r .raise_for_status ()
602616 elif 'property' in kwds :
603617 property = kwds ['property' ]
604618 r = self .__session .post (self .__baseURL + self .__propertiesResource + '/' + property [u'name' ],
0 commit comments