forked from pubnub/javascript
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathhistory.js
More file actions
47 lines (41 loc) · 1003 Bytes
/
Copy pathhistory.js
File metadata and controls
47 lines (41 loc) · 1003 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
/* ---------------------------------------------------------------------------
Init PubNub and Get your PubNub API Keys:
http://www.pubnub.com/account#api-keys
--------------------------------------------------------------------------- */
var PUBNUB = require("./../pubnub.js");
var channel = 'my_channel1';
var pubnub = PUBNUB.init({
publish_key : "demo",
subscribe_key : "demo",
cipher_key : "enigma"
});
var pubnub1 = PUBNUB.init({
publish_key : "demo",
subscribe_key : "demo"
});
pubnub.history({
'channel' : channel,
'callback' : function(r) {
console.log(JSON.stringify(r));
},
'error' : function(r) {
}
});
pubnub.history({
'include_token' : true,
'channel' : channel,
'callback' : function(r) {
console.log(JSON.stringify(r));
},
'error' : function(r) {
}
});
pubnub1.history({
'include_token' : true,
'channel' : channel,
'callback' : function(r) {
console.log(JSON.stringify(r));
},
'error' : function(r) {
}
});