@@ -1023,7 +1023,7 @@ def where_now(self, uuid=None, callback=None, error=None):
10231023 callback = self ._return_wrapped_callback (callback ),
10241024 error = self ._return_wrapped_callback (error ))
10251025
1026- def here_now (self , channel , uuids = True , state = False ,
1026+ def here_now (self , channel = None , channel_group = None , uuids = True , state = False ,
10271027 callback = None , error = None ):
10281028 """Get here now data.
10291029
@@ -1036,8 +1036,14 @@ def here_now(self, channel, uuids=True, state=False,
10361036 Args:
10371037 channel: (string) (optional)
10381038 Specifies the channel name to return occupancy
1039- results. If channel is not provided, here_now will
1040- return data for all channels.
1039+ results. If channel and channel group are not
1040+ provided, here_now will return data for all
1041+ channels. If both channel and channel group are
1042+ provided, the function will return error.
1043+
1044+ channel_group: (string) (optional)
1045+ Specifies the channel group name to return
1046+ occupancy results.
10411047
10421048 callback: (optional)
10431049 A callback method should be passed to the method.
@@ -1089,6 +1095,11 @@ def here_now(self, channel, uuids=True, state=False,
10891095
10901096 data = {'auth' : self .auth_key , 'pnsdk' : self .pnsdk }
10911097
1098+ if channel_group is not None and len (channel_group ) > 0 :
1099+ urlcomponents .append ('channel' )
1100+ urlcomponents .append (',' )
1101+ data ['channel-group' ] = channel_group
1102+
10921103 if state is True :
10931104 data ['state' ] = '1'
10941105
0 commit comments