Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 86aaf58

Browse filesBrowse files
committed
Merge branch 'here_now_with_channel_group'
2 parents 24c1ed8 + 26aafa3 commit 86aaf58
Copy full SHA for 86aaf58

File tree

Expand file treeCollapse file tree

1 file changed

+14
-3
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

1 file changed

+14
-3
lines changed
Open diff view settings
Collapse file

‎pubnub.py‎

Copy file name to clipboardExpand all lines: pubnub.py
+14-3Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -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

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.