aboutsummaryrefslogtreecommitdiffstats
path: root/python/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/README.md
parentf04a318d1825d28f24802ea0a5ecc27ea04c4a38 (diff)
downloadpubnub-python-9217c4f7fdfb36cc67121d1ab173a1e2305c7a35.tar.bz2
[#73754750 develop] adding examples for grant, revoke, audit
Diffstat (limited to 'python/README.md')
-rw-r--r--python/README.md52
1 files changed, 52 insertions, 0 deletions
diff --git a/python/README.md b/python/README.md
index 0877535..63548ad 100644
--- a/python/README.md
+++ b/python/README.md
@@ -140,4 +140,56 @@ def callback(message):
pubnub.history(channel, count=2, callback=callback, error=callback)
```
+
+#### GRANT
+
+```
+authkey = "abcd"
+
+# Synchronous usage
+print pubnub.grant(channel, authkey, True, True)
+
+# Asynchronous usage
+
+
+def callback(message):
+ print(message)
+
+pubnub.grant(channel, authkey, True, True, callback=callback, error=callback)
+```
+
+#### AUDIT
+
+```
+authkey = "abcd"
+
+# Synchronous usage
+print pubnub.audit(channel, authkey)
+
+# Asynchronous usage
+
+
+def callback(message):
+ print(message)
+
+pubnub.audit(channel, authkey, callback=callback, error=callback)
+```
+
+#### REVOKE
+
+```
+authkey = "abcd"
+
+# Synchronous usage
+print pubnub.revoke(channel, authkey)
+
+# Asynchronous usage
+
+
+def callback(message):
+ print(message)
+
+pubnub.revoke(channel, authkey, callback=callback, error=callback)
+```
+
## Contact support@pubnub.com for all questions