aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDevendra2014-06-17 03:31:40 +0530
committerDevendra2014-06-17 03:31:40 +0530
commit6363edd8797f914af23612bd576462dcceb408f2 (patch)
tree1b1e6babc2637f4f5b5c6d4829e6557b0a763f29
parent2419ac0419fe74b582b94ed7784b3732049db9f2 (diff)
downloadpubnub-python-6363edd8797f914af23612bd576462dcceb408f2.tar.bz2
readme changes
-rw-r--r--python-tornado/README.md29
1 files changed, 28 insertions, 1 deletions
diff --git a/python-tornado/README.md b/python-tornado/README.md
index 406b556..61146ea 100644
--- a/python-tornado/README.md
+++ b/python-tornado/README.md
@@ -8,8 +8,9 @@ from Pubnub import PubnubTornado as Pubnub
```
#### Init
+```
pubnub = Pubnub(publish_key="demo", subscribe_key="demo", ssl_on=False)
-
+```
#### Publish Example
```
@@ -68,6 +69,32 @@ def callback(message):
pubnub.history(channel, count=2, callback=callback, error=callback)
```
+#### Here Now Example
+```
+def callback(message):
+ print(message)
+
+pubnub.here_now(channel, callback=callback, error=callback)
+```
+
+#### Presence Example
+```
+channel = 'hello_world'
+
+def callback(message, channel):
+ print(message)
+
+
+def error(message):
+ print("ERROR : " + str(message))
+
+pubnub.presence(channel, callback=callback, error=callback)
+```
+
+#### Unsubscribe Example
+```
+pubnub.unsubscribe(channel='hello_world')
+```
#### IO Event Loop start
```