From 9217c4f7fdfb36cc67121d1ab173a1e2305c7a35 Mon Sep 17 00:00:00 2001 From: Devendra Date: Tue, 24 Jun 2014 10:57:35 +0530 Subject: [#73754750 develop] adding examples for grant, revoke, audit --- python-twisted/README.md | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) (limited to 'python-twisted/README.md') diff --git a/python-twisted/README.md b/python-twisted/README.md index ea4173c..c74fb0d 100644 --- a/python-twisted/README.md +++ b/python-twisted/README.md @@ -97,6 +97,38 @@ pubnub.presence(channel, callback=callback, error=callback) pubnub.unsubscribe(channel='hello_world') ``` +#### Grant Example +``` +authkey = "abcd" + +def callback(message): + print(message) + +pubnub.grant(channel, authkey, True, True, callback=callback, error=callback) + +``` + +#### Audit Example +``` +authkey = "abcd" + +def callback(message): + print(message) + +pubnub.audit(channel, authkey, callback=callback, error=callback) +``` + +#### Revoke Example +``` +authkey = "abcd" + +def callback(message): + print(message) + +pubnub.revoke(channel, authkey, callback=callback, error=callback) +``` + + #### IO Event Loop start ``` pubnub.start() -- cgit v1.2.3