From e0b8230e747cac84fef69ecb261523f768f3616d Mon Sep 17 00:00:00 2001 From: Devendra Date: Wed, 31 Dec 2014 02:27:47 +0530 Subject: modiying comments for docs --- docs/build/html/index.html | 1086 +++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 1080 insertions(+), 6 deletions(-) (limited to 'docs/build/html/index.html') diff --git a/docs/build/html/index.html b/docs/build/html/index.html index 26bff5e..8d4e139 100644 --- a/docs/build/html/index.html +++ b/docs/build/html/index.html @@ -124,6 +124,298 @@ The dict returned contains values with keys ‘message’ and ‘pay
pubnub.audit (‘my_channel’); # Sync Mode
+
+
+channel_group_list_channels(channel_group, callback=None, error=None)
+

Get list of channels for a group.

+

Using this method, list of channels for a group, can be obtained.

+
+
Args:
+
+
channel_group: (string) (optional)
+
Channel Group name. It can also contain namespace. +If namespace is also specified, then the parameter +will be in format namespace:channel_group
+
callback: (optional)
+
A callback method should be passed to the method. +If set, the api works in async mode. +Required argument when working with twisted or tornado.
+
error: (optional)
+
Optional variable. An error method can be passed to the method. +If set, the api works in async mode. +Required argument when working with twisted or tornado.
+
+
+
Returns:
+

Sync Mode: dict +channel_group_list_channels method returns a dict which contains list of channels +in payload field +{

+
+
u’status’: 200, +u’payload’: {“channels”: [“hi”], “group”: “abcd”}, +u’service’: u’channel-registry’, +u’error’: False
+

}

+

Async Mode: None ( callback gets the response as parameter )

+

Response Format:

+

The callback passed to channel_group_list_channels gets the a dict containing list of channels +under payload field

+
+
{
+
u’payload’: {“channels”: [“hi”], “group”: “abcd”}
+
+

}

+
+
+
+ +
+
+channel_group_list_groups(namespace=None, callback=None, error=None)
+

Get list of groups.

+

Using this method, list of groups for the subscribe key associated with PubNub +object, can be obtained. If namespace is provided, groups within the namespace +only are listed

+
+
Args:
+

namespace: (string) (optional) namespace +callback: (optional)

+
+
A callback method should be passed to the method. +If set, the api works in async mode. +Required argument when working with twisted or tornado .
+
+
error: (optional)
+
Optional variable. An error method can be passed to the method. +If set, the api works in async mode. +Required argument when working with twisted or tornado .
+
+
+
Returns:
+

Sync Mode: dict +channel_group_list_groups method returns a dict which contains list of groups +in payload field +{

+
+
u’status’: 200, +u’payload’: {“namespace”: “dev”, “groups”: [“abcd”]}, +u’service’: u’channel-registry’, +u’error’: False
+

}

+

Async Mode: None ( callback gets the response as parameter )

+

Response Format:

+

The callback passed to channel_group_list_namespaces gets the a dict containing list of groups +under payload field

+
+
{
+
u’payload’: {“namespace”: “dev”, “groups”: [“abcd”]}
+
+

}

+
+
+
+ +
+
+channel_group_list_namespaces(callback=None, error=None)
+

Get list of namespaces.

+

You can obtain list of namespaces for the subscribe key associated with PubNub +object using this method.

+
+
Args:
+
+
callback: (optional)
+
A callback method should be passed to the method. +If set, the api works in async mode. +Required argument when working with twisted or tornado.
+
error: (optional)
+
Optional variable. An error method can be passed to the method. +If set, the api works in async mode. +Required argument when working with twisted or tornado.
+
+
+
Returns:
+

Sync Mode: dict +channel_group_list_namespaces method returns a dict which contains list of namespaces +in payload field +{

+
+

u’status’: 200, +u’payload’: {

+
+
u’sub_key’: u’demo’, +u’namespaces’: [u’dev’, u’foo’]
+

}, +u’service’: u’channel-registry’, +u’error’: False

+
+

}

+

Async Mode: None (callback gets the response as parameter)

+

Response Format:

+

The callback passed to channel_group_list_namespaces gets the a dict containing list of namespaces +under payload field

+
+
{
+
+
u’payload’: {
+
u’sub_key’: u’demo’, +u’namespaces’: [u’dev’, u’foo’]
+
+

}

+
+
+

}

+

namespaces is the list of namespaces for the given subscribe key

+
+
+
+ +
+
+channel_group_remove_channel(channel_group, channel, callback=None, error=None)
+

Remove channel.

+

A channel can be removed from a group method.

+
+
Args:
+
+
channel_group: (string)
+
Channel Group name. It can also contain namespace. +If namespace is also specified, then the parameter +will be in format namespace:channel_group
+
channel: (string)
+
Can be a channel name, a list of channel names, +or a comma separated list of channel names
+
callback: (optional)
+
A callback method should be passed to the method. +If set, the api works in async mode. +Required argument when working with twisted or tornado .
+
error: (optional)
+
Optional variable. An error method can be passed to the method. +If set, the api works in async mode. +Required argument when working with twisted or tornado .
+
+
+
Returns:
+

Sync Mode: dict +channel_group_remove_channel method returns a dict indicating status of the request

+
+
{
+
u’status’: 200, +u’message’: ‘OK’, +u’service’: u’channel-registry’, +u’error’: False
+
+

}

+

Async Mode: None ( callback gets the response as parameter )

+

Response Format:

+

The callback passed to channel_group_remove_channel gets the a dict indicating status of the request

+
+
{
+
u’status’: 200, +u’message’: ‘OK’, +u’service’: u’channel-registry’, +u’error’: False
+
+

}

+
+
+
+ +
+
+channel_group_remove_group(channel_group, callback=None, error=None)
+

Remove channel group.

+

A channel group can be removed using this method.

+
+
Args:
+
+
channel_group: (string)
+
Channel Group name. It can also contain namespace. +If namespace is also specified, then the parameter +will be in format namespace:channel_group
+
callback: (optional)
+
A callback method should be passed to the method. +If set, the api works in async mode. +Required argument when working with twisted or tornado.
+
error: (optional)
+
Optional variable. An error method can be passed to the method. +If set, the api works in async mode. +Required argument when working with twisted or tornado.
+
+
+
Returns:
+

Sync Mode: dict +channel_group_remove_group method returns a dict indicating status of the request

+
+
{
+
u’status’: 200, +u’message’: ‘OK’, +u’service’: u’channel-registry’, +u’error’: False
+
+

}

+

Async Mode: None ( callback gets the response as parameter )

+

Response Format:

+

The callback passed to channel_group_remove_group gets the a dict indicating status of the request

+
+
{
+
u’status’: 200, +u’message’: ‘OK’, +u’service’: u’channel-registry’, +u’error’: False
+
+

}

+
+
+
+ +
+
+channel_group_remove_namespace(namespace, callback=None, error=None)
+

Remove a namespace.

+

A namespace can be deleted using this method.

+
+
Args:
+

namespace: (string) namespace to be deleted +callback: (optional)

+
+
A callback method should be passed to the method. +If set, the api works in async mode. +Required argument when working with twisted or tornado .
+
+
error: (optional)
+
Optional variable. An error method can be passed to the method. +If set, the api works in async mode. +Required argument when working with twisted or tornado .
+
+
+
Returns:
+

Sync Mode: dict +channel_group_remove_namespace method returns a dict indicating status of the request

+
+
{
+
u’status’: 200, +u’message’: ‘OK’, +u’service’: u’channel-registry’, +u’error’: False
+
+

}

+

Async Mode: None ( callback gets the response as parameter )

+

Response Format:

+

The callback passed to channel_group_list_namespaces gets the a dict indicating status of the request

+
+
{
+
u’status’: 200, +u’message’: ‘OK’, +u’service’: u’channel-registry’, +u’error’: False
+
+

}

+
+
+
+
decrypt(message)
@@ -359,6 +651,29 @@ Required argument when working with twisted or tornado .
+
+
+presence_group(channel_group, callback, error=None)
+

Subscribe to presence events on a channel group.

+
+
Only works in async mode
+
+
Args:
+

channel_group: Channel group name ( string ) +callback: A callback method should be passed to the method.

+
+
If passed, the api works in async mode. +Required argument when working with twisted or tornado .
+
+
error: Optional variable. An error method can be passed as parameter.
+
If passed, the api works in async mode.
+
+
+
Returns:
+
None
+
+
+
publish(channel, message, callback=None, error=None)
@@ -501,6 +816,38 @@ multiple channels as a comma separated list or andarray.
+
+
+subscribe_group(channel_groups, callback, error=None, connect=None, disconnect=None, reconnect=None, sync=False)
+

Subscribe to data on a channel group.

+

This function causes the client to create an open TCP socket to the +PubNub Real-Time Network and begin listening for messages on a specified channel. +To subscribe to a channel group the client must send the appropriate subscribe_key at +initialization.

+

Only works in async mode

+
+
Args:
+
+
channel_groups: (string/list)
+
Specifies the channel groups to subscribe to. It is possible to specify +multiple channel groups as a comma separated list or andarray.
+
callback: (function)
+
This callback is called on receiving a message from the channel.
+
error: (function) (optional)
+
This callback is called on an error event
+
connect: (function) (optional)
+
This callback is called on a successful connection to the PubNub cloud
+
disconnect: (function) (optional)
+
This callback is called on client disconnect from the PubNub cloud
+
reconnect: (function) (optional)
+
This callback is called on successfully re-connecting to the PubNub cloud
+
+
+
Returns:
+
None
+
+
+
time(callback=None)
@@ -532,7 +879,18 @@ Required argument when working with twisted or tornado .
Unsubscribe from channel .
Only works in async mode
Args:
-
channel: Channel name ( string ) on which to publish message
+
channel: Channel name ( string )
+
+ + +
+
+unsubscribe_group(channel_group)
+
+
Unsubscribe from channel group.
+
Only works in async mode
+
Args:
+
channel_group: Channel group name ( string )
@@ -608,9 +966,301 @@ The dict returned contains values with keys ‘message’ and ‘pay

}

-

Usage:

-
-
pubnub.audit (‘my_channel’); # Sync Mode
+

Usage:

+
+
pubnub.audit (‘my_channel’); # Sync Mode
+ + +
+
+channel_group_list_channels(channel_group, callback=None, error=None)
+

Get list of channels for a group.

+

Using this method, list of channels for a group, can be obtained.

+
+
Args:
+
+
channel_group: (string) (optional)
+
Channel Group name. It can also contain namespace. +If namespace is also specified, then the parameter +will be in format namespace:channel_group
+
callback: (optional)
+
A callback method should be passed to the method. +If set, the api works in async mode. +Required argument when working with twisted or tornado.
+
error: (optional)
+
Optional variable. An error method can be passed to the method. +If set, the api works in async mode. +Required argument when working with twisted or tornado.
+
+
+
Returns:
+

Sync Mode: dict +channel_group_list_channels method returns a dict which contains list of channels +in payload field +{

+
+
u’status’: 200, +u’payload’: {“channels”: [“hi”], “group”: “abcd”}, +u’service’: u’channel-registry’, +u’error’: False
+

}

+

Async Mode: None ( callback gets the response as parameter )

+

Response Format:

+

The callback passed to channel_group_list_channels gets the a dict containing list of channels +under payload field

+
+
{
+
u’payload’: {“channels”: [“hi”], “group”: “abcd”}
+
+

}

+
+
+
+ +
+
+channel_group_list_groups(namespace=None, callback=None, error=None)
+

Get list of groups.

+

Using this method, list of groups for the subscribe key associated with PubNub +object, can be obtained. If namespace is provided, groups within the namespace +only are listed

+
+
Args:
+

namespace: (string) (optional) namespace +callback: (optional)

+
+
A callback method should be passed to the method. +If set, the api works in async mode. +Required argument when working with twisted or tornado .
+
+
error: (optional)
+
Optional variable. An error method can be passed to the method. +If set, the api works in async mode. +Required argument when working with twisted or tornado .
+
+
+
Returns:
+

Sync Mode: dict +channel_group_list_groups method returns a dict which contains list of groups +in payload field +{

+
+
u’status’: 200, +u’payload’: {“namespace”: “dev”, “groups”: [“abcd”]}, +u’service’: u’channel-registry’, +u’error’: False
+

}

+

Async Mode: None ( callback gets the response as parameter )

+

Response Format:

+

The callback passed to channel_group_list_namespaces gets the a dict containing list of groups +under payload field

+
+
{
+
u’payload’: {“namespace”: “dev”, “groups”: [“abcd”]}
+
+

}

+
+
+
+ +
+
+channel_group_list_namespaces(callback=None, error=None)
+

Get list of namespaces.

+

You can obtain list of namespaces for the subscribe key associated with PubNub +object using this method.

+
+
Args:
+
+
callback: (optional)
+
A callback method should be passed to the method. +If set, the api works in async mode. +Required argument when working with twisted or tornado.
+
error: (optional)
+
Optional variable. An error method can be passed to the method. +If set, the api works in async mode. +Required argument when working with twisted or tornado.
+
+
+
Returns:
+

Sync Mode: dict +channel_group_list_namespaces method returns a dict which contains list of namespaces +in payload field +{

+
+

u’status’: 200, +u’payload’: {

+
+
u’sub_key’: u’demo’, +u’namespaces’: [u’dev’, u’foo’]
+

}, +u’service’: u’channel-registry’, +u’error’: False

+
+

}

+

Async Mode: None (callback gets the response as parameter)

+

Response Format:

+

The callback passed to channel_group_list_namespaces gets the a dict containing list of namespaces +under payload field

+
+
{
+
+
u’payload’: {
+
u’sub_key’: u’demo’, +u’namespaces’: [u’dev’, u’foo’]
+
+

}

+
+
+

}

+

namespaces is the list of namespaces for the given subscribe key

+
+
+
+ +
+
+channel_group_remove_channel(channel_group, channel, callback=None, error=None)
+

Remove channel.

+

A channel can be removed from a group method.

+
+
Args:
+
+
channel_group: (string)
+
Channel Group name. It can also contain namespace. +If namespace is also specified, then the parameter +will be in format namespace:channel_group
+
channel: (string)
+
Can be a channel name, a list of channel names, +or a comma separated list of channel names
+
callback: (optional)
+
A callback method should be passed to the method. +If set, the api works in async mode. +Required argument when working with twisted or tornado .
+
error: (optional)
+
Optional variable. An error method can be passed to the method. +If set, the api works in async mode. +Required argument when working with twisted or tornado .
+
+
+
Returns:
+

Sync Mode: dict +channel_group_remove_channel method returns a dict indicating status of the request

+
+
{
+
u’status’: 200, +u’message’: ‘OK’, +u’service’: u’channel-registry’, +u’error’: False
+
+

}

+

Async Mode: None ( callback gets the response as parameter )

+

Response Format:

+

The callback passed to channel_group_remove_channel gets the a dict indicating status of the request

+
+
{
+
u’status’: 200, +u’message’: ‘OK’, +u’service’: u’channel-registry’, +u’error’: False
+
+

}

+
+
+
+ +
+
+channel_group_remove_group(channel_group, callback=None, error=None)
+

Remove channel group.

+

A channel group can be removed using this method.

+
+
Args:
+
+
channel_group: (string)
+
Channel Group name. It can also contain namespace. +If namespace is also specified, then the parameter +will be in format namespace:channel_group
+
callback: (optional)
+
A callback method should be passed to the method. +If set, the api works in async mode. +Required argument when working with twisted or tornado.
+
error: (optional)
+
Optional variable. An error method can be passed to the method. +If set, the api works in async mode. +Required argument when working with twisted or tornado.
+
+
+
Returns:
+

Sync Mode: dict +channel_group_remove_group method returns a dict indicating status of the request

+
+
{
+
u’status’: 200, +u’message’: ‘OK’, +u’service’: u’channel-registry’, +u’error’: False
+
+

}

+

Async Mode: None ( callback gets the response as parameter )

+

Response Format:

+

The callback passed to channel_group_remove_group gets the a dict indicating status of the request

+
+
{
+
u’status’: 200, +u’message’: ‘OK’, +u’service’: u’channel-registry’, +u’error’: False
+
+

}

+
+
+
+ +
+
+channel_group_remove_namespace(namespace, callback=None, error=None)
+

Remove a namespace.

+

A namespace can be deleted using this method.

+
+
Args:
+

namespace: (string) namespace to be deleted +callback: (optional)

+
+
A callback method should be passed to the method. +If set, the api works in async mode. +Required argument when working with twisted or tornado .
+
+
error: (optional)
+
Optional variable. An error method can be passed to the method. +If set, the api works in async mode. +Required argument when working with twisted or tornado .
+
+
+
Returns:
+

Sync Mode: dict +channel_group_remove_namespace method returns a dict indicating status of the request

+
+
{
+
u’status’: 200, +u’message’: ‘OK’, +u’service’: u’channel-registry’, +u’error’: False
+
+

}

+

Async Mode: None ( callback gets the response as parameter )

+

Response Format:

+

The callback passed to channel_group_list_namespaces gets the a dict indicating status of the request

+
+
{
+
u’status’: 200, +u’message’: ‘OK’, +u’service’: u’channel-registry’, +u’error’: False
+
+

}

+
+
@@ -848,6 +1498,29 @@ Required argument when working with twisted or tornado .
+
+
+presence_group(channel_group, callback, error=None)
+

Subscribe to presence events on a channel group.

+
+
Only works in async mode
+
+
Args:
+

channel_group: Channel group name ( string ) +callback: A callback method should be passed to the method.

+
+
If passed, the api works in async mode. +Required argument when working with twisted or tornado .
+
+
error: Optional variable. An error method can be passed as parameter.
+
If passed, the api works in async mode.
+
+
+
Returns:
+
None
+
+
+
publish(channel, message, callback=None, error=None)
@@ -990,6 +1663,38 @@ multiple channels as a comma separated list or andarray.
+
+
+subscribe_group(channel_groups, callback, error=None, connect=None, disconnect=None, reconnect=None, sync=False)
+

Subscribe to data on a channel group.

+

This function causes the client to create an open TCP socket to the +PubNub Real-Time Network and begin listening for messages on a specified channel. +To subscribe to a channel group the client must send the appropriate subscribe_key at +initialization.

+

Only works in async mode

+
+
Args:
+
+
channel_groups: (string/list)
+
Specifies the channel groups to subscribe to. It is possible to specify +multiple channel groups as a comma separated list or andarray.
+
callback: (function)
+
This callback is called on receiving a message from the channel.
+
error: (function) (optional)
+
This callback is called on an error event
+
connect: (function) (optional)
+
This callback is called on a successful connection to the PubNub cloud
+
disconnect: (function) (optional)
+
This callback is called on client disconnect from the PubNub cloud
+
reconnect: (function) (optional)
+
This callback is called on successfully re-connecting to the PubNub cloud
+
+
+
Returns:
+
None
+
+
+
time(callback=None)
@@ -1021,7 +1726,18 @@ Required argument when working with twisted or tornado .
Unsubscribe from channel .
Only works in async mode
Args:
-
channel: Channel name ( string ) on which to publish message
+
channel: Channel name ( string )
+
+ + +
+
+unsubscribe_group(channel_group)
+
+
Unsubscribe from channel group.
+
Only works in async mode
+
Args:
+
channel_group: Channel group name ( string )
@@ -1102,6 +1818,298 @@ The dict returned contains values with keys ‘message’ and ‘pay
pubnub.audit (‘my_channel’); # Sync Mode
+
+
+channel_group_list_channels(channel_group, callback=None, error=None)
+

Get list of channels for a group.

+

Using this method, list of channels for a group, can be obtained.

+
+
Args:
+
+
channel_group: (string) (optional)
+
Channel Group name. It can also contain namespace. +If namespace is also specified, then the parameter +will be in format namespace:channel_group
+
callback: (optional)
+
A callback method should be passed to the method. +If set, the api works in async mode. +Required argument when working with twisted or tornado.
+
error: (optional)
+
Optional variable. An error method can be passed to the method. +If set, the api works in async mode. +Required argument when working with twisted or tornado.
+
+
+
Returns:
+

Sync Mode: dict +channel_group_list_channels method returns a dict which contains list of channels +in payload field +{

+
+
u’status’: 200, +u’payload’: {“channels”: [“hi”], “group”: “abcd”}, +u’service’: u’channel-registry’, +u’error’: False
+

}

+

Async Mode: None ( callback gets the response as parameter )

+

Response Format:

+

The callback passed to channel_group_list_channels gets the a dict containing list of channels +under payload field

+
+
{
+
u’payload’: {“channels”: [“hi”], “group”: “abcd”}
+
+

}

+
+
+
+ +
+
+channel_group_list_groups(namespace=None, callback=None, error=None)
+

Get list of groups.

+

Using this method, list of groups for the subscribe key associated with PubNub +object, can be obtained. If namespace is provided, groups within the namespace +only are listed

+
+
Args:
+

namespace: (string) (optional) namespace +callback: (optional)

+
+
A callback method should be passed to the method. +If set, the api works in async mode. +Required argument when working with twisted or tornado .
+
+
error: (optional)
+
Optional variable. An error method can be passed to the method. +If set, the api works in async mode. +Required argument when working with twisted or tornado .
+
+
+
Returns:
+

Sync Mode: dict +channel_group_list_groups method returns a dict which contains list of groups +in payload field +{

+
+
u’status’: 200, +u’payload’: {“namespace”: “dev”, “groups”: [“abcd”]}, +u’service’: u’channel-registry’, +u’error’: False
+

}

+

Async Mode: None ( callback gets the response as parameter )

+

Response Format:

+

The callback passed to channel_group_list_namespaces gets the a dict containing list of groups +under payload field

+
+
{
+
u’payload’: {“namespace”: “dev”, “groups”: [“abcd”]}
+
+

}

+
+
+
+ +
+
+channel_group_list_namespaces(callback=None, error=None)
+

Get list of namespaces.

+

You can obtain list of namespaces for the subscribe key associated with PubNub +object using this method.

+
+
Args:
+
+
callback: (optional)
+
A callback method should be passed to the method. +If set, the api works in async mode. +Required argument when working with twisted or tornado.
+
error: (optional)
+
Optional variable. An error method can be passed to the method. +If set, the api works in async mode. +Required argument when working with twisted or tornado.
+
+
+
Returns:
+

Sync Mode: dict +channel_group_list_namespaces method returns a dict which contains list of namespaces +in payload field +{

+
+

u’status’: 200, +u’payload’: {

+
+
u’sub_key’: u’demo’, +u’namespaces’: [u’dev’, u’foo’]
+

}, +u’service’: u’channel-registry’, +u’error’: False

+
+

}

+

Async Mode: None (callback gets the response as parameter)

+

Response Format:

+

The callback passed to channel_group_list_namespaces gets the a dict containing list of namespaces +under payload field

+
+
{
+
+
u’payload’: {
+
u’sub_key’: u’demo’, +u’namespaces’: [u’dev’, u’foo’]
+
+

}

+
+
+

}

+

namespaces is the list of namespaces for the given subscribe key

+
+
+
+ +
+
+channel_group_remove_channel(channel_group, channel, callback=None, error=None)
+

Remove channel.

+

A channel can be removed from a group method.

+
+
Args:
+
+
channel_group: (string)
+
Channel Group name. It can also contain namespace. +If namespace is also specified, then the parameter +will be in format namespace:channel_group
+
channel: (string)
+
Can be a channel name, a list of channel names, +or a comma separated list of channel names
+
callback: (optional)
+
A callback method should be passed to the method. +If set, the api works in async mode. +Required argument when working with twisted or tornado .
+
error: (optional)
+
Optional variable. An error method can be passed to the method. +If set, the api works in async mode. +Required argument when working with twisted or tornado .
+
+
+
Returns:
+

Sync Mode: dict +channel_group_remove_channel method returns a dict indicating status of the request

+
+
{
+
u’status’: 200, +u’message’: ‘OK’, +u’service’: u’channel-registry’, +u’error’: False
+
+

}

+

Async Mode: None ( callback gets the response as parameter )

+

Response Format:

+

The callback passed to channel_group_remove_channel gets the a dict indicating status of the request

+
+
{
+
u’status’: 200, +u’message’: ‘OK’, +u’service’: u’channel-registry’, +u’error’: False
+
+

}

+
+
+
+ +
+
+channel_group_remove_group(channel_group, callback=None, error=None)
+

Remove channel group.

+

A channel group can be removed using this method.

+
+
Args:
+
+
channel_group: (string)
+
Channel Group name. It can also contain namespace. +If namespace is also specified, then the parameter +will be in format namespace:channel_group
+
callback: (optional)
+
A callback method should be passed to the method. +If set, the api works in async mode. +Required argument when working with twisted or tornado.
+
error: (optional)
+
Optional variable. An error method can be passed to the method. +If set, the api works in async mode. +Required argument when working with twisted or tornado.
+
+
+
Returns:
+

Sync Mode: dict +channel_group_remove_group method returns a dict indicating status of the request

+
+
{
+
u’status’: 200, +u’message’: ‘OK’, +u’service’: u’channel-registry’, +u’error’: False
+
+

}

+

Async Mode: None ( callback gets the response as parameter )

+

Response Format:

+

The callback passed to channel_group_remove_group gets the a dict indicating status of the request

+
+
{
+
u’status’: 200, +u’message’: ‘OK’, +u’service’: u’channel-registry’, +u’error’: False
+
+

}

+
+
+
+ +
+
+channel_group_remove_namespace(namespace, callback=None, error=None)
+

Remove a namespace.

+

A namespace can be deleted using this method.

+
+
Args:
+

namespace: (string) namespace to be deleted +callback: (optional)

+
+
A callback method should be passed to the method. +If set, the api works in async mode. +Required argument when working with twisted or tornado .
+
+
error: (optional)
+
Optional variable. An error method can be passed to the method. +If set, the api works in async mode. +Required argument when working with twisted or tornado .
+
+
+
Returns:
+

Sync Mode: dict +channel_group_remove_namespace method returns a dict indicating status of the request

+
+
{
+
u’status’: 200, +u’message’: ‘OK’, +u’service’: u’channel-registry’, +u’error’: False
+
+

}

+

Async Mode: None ( callback gets the response as parameter )

+

Response Format:

+

The callback passed to channel_group_list_namespaces gets the a dict indicating status of the request

+
+
{
+
u’status’: 200, +u’message’: ‘OK’, +u’service’: u’channel-registry’, +u’error’: False
+
+

}

+
+
+
+
decrypt(message)
@@ -1337,6 +2345,29 @@ Required argument when working with twisted or tornado .
+
+
+presence_group(channel_group, callback, error=None)
+

Subscribe to presence events on a channel group.

+
+
Only works in async mode
+
+
Args:
+

channel_group: Channel group name ( string ) +callback: A callback method should be passed to the method.

+
+
If passed, the api works in async mode. +Required argument when working with twisted or tornado .
+
+
error: Optional variable. An error method can be passed as parameter.
+
If passed, the api works in async mode.
+
+
+
Returns:
+
None
+
+
+
publish(channel, message, callback=None, error=None)
@@ -1479,6 +2510,38 @@ multiple channels as a comma separated list or andarray.
+
+
+subscribe_group(channel_groups, callback, error=None, connect=None, disconnect=None, reconnect=None, sync=False)
+

Subscribe to data on a channel group.

+

This function causes the client to create an open TCP socket to the +PubNub Real-Time Network and begin listening for messages on a specified channel. +To subscribe to a channel group the client must send the appropriate subscribe_key at +initialization.

+

Only works in async mode

+
+
Args:
+
+
channel_groups: (string/list)
+
Specifies the channel groups to subscribe to. It is possible to specify +multiple channel groups as a comma separated list or andarray.
+
callback: (function)
+
This callback is called on receiving a message from the channel.
+
error: (function) (optional)
+
This callback is called on an error event
+
connect: (function) (optional)
+
This callback is called on a successful connection to the PubNub cloud
+
disconnect: (function) (optional)
+
This callback is called on client disconnect from the PubNub cloud
+
reconnect: (function) (optional)
+
This callback is called on successfully re-connecting to the PubNub cloud
+
+
+
Returns:
+
None
+
+
+
time(callback=None)
@@ -1510,7 +2573,18 @@ Required argument when working with twisted or tornado .
Unsubscribe from channel .
Only works in async mode
Args:
-
channel: Channel name ( string ) on which to publish message
+
channel: Channel name ( string )
+
+ + +
+
+unsubscribe_group(channel_group)
+
+
Unsubscribe from channel group.
+
Only works in async mode
+
Args:
+
channel_group: Channel group name ( string )
-- cgit v1.2.3