aboutsummaryrefslogtreecommitdiffstats
path: root/python-twisted/README.md
diff options
context:
space:
mode:
authorDevendra2014-06-24 10:57:35 +0530
committerDevendra2014-06-24 10:57:35 +0530
commit9217c4f7fdfb36cc67121d1ab173a1e2305c7a35 (patch)
tree9f4c1c08abe1455c1c92e5549e892f5603f8dfba /python-twisted/README.md
parentf04a318d1825d28f24802ea0a5ecc27ea04c4a38 (diff)
downloadpubnub-python-9217c4f7fdfb36cc67121d1ab173a1e2305c7a35.tar.bz2
[#73754750 develop] adding examples for grant, revoke, audit
Diffstat (limited to 'python-twisted/README.md')
-rw-r--r--python-twisted/README.md32
1 files changed, 32 insertions, 0 deletions
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()