diff options
Diffstat (limited to 'python/examples')
| -rw-r--r-- | python/examples/history.py | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/python/examples/history.py b/python/examples/history.py index 5b92828..19593e1 100644 --- a/python/examples/history.py +++ b/python/examples/history.py @@ -33,3 +33,15 @@ def callback(message): print(message) pubnub.history(channel, count=2, callback=callback, error=callback) + +# Synchronous usage + +print pubnub.history(channel, count=2, include_token=True) + +# Asynchronous usage + + +def callback(message): + print(message) + +pubnub.history(channel, count=2, include_token=True, callback=callback, error=callback) |
