Skip to content

Commit 68b040b

Browse files
committed
added README.md to SmartTV platform folder.
1 parent 1eba5c9 commit 68b040b

4 files changed

Lines changed: 130 additions & 1 deletion

File tree

‎.gitignore‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
node_modules
22
javascript.iml
3+
*.js-e
34
upload/*
45
.idea
56
*.iml

‎README.md‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,8 @@ You may access the latest PubNub JavaScript SDK on The PubNub Network CDN.
2929
3030
#### Subscribe Only mode (exclude Publish Key)
3131

32-
In the case where the client will never publish and for security considerations,
32+
In the case where the client will never publish
33+
and for security considerations,
3334
use this following method for initialization:
3435

3536
```html

‎node.js/tests/test2.js‎

Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
var assert = require('assert');
2+
var PUBNUB = require('../pubnub.js');
3+
4+
var pubnub = PUBNUB.init({
5+
publish_key : 'demo',
6+
subscribe_key : 'demo'
7+
});
8+
9+
var channel = 'javascript-test-channel';
10+
var count = 0;
11+
12+
var message_string = 'Hi from Javascript';
13+
14+
describe('Pubnub', function() {
15+
this.timeout(40000);
16+
describe('#publish()', function(){
17+
it('should publish json arrays without error 1', function(done){
18+
pubnub.publish({channel: channel , message : message_string,
19+
callback : function(response) {
20+
done()
21+
}
22+
});
23+
24+
})
25+
it('should publish json arrays without error 1', function(done){
26+
pubnub.publish({channel: channel , message : message_string,
27+
callback : function(response) {
28+
done()
29+
}
30+
});
31+
32+
})
33+
it('should publish json arrays without error 1', function(done){
34+
pubnub.publish({channel: channel , message : message_string,
35+
callback : function(response) {
36+
done()
37+
}
38+
});
39+
40+
})
41+
it('should publish json arrays without error 1', function(done){
42+
pubnub.publish({channel: channel , message : message_string,
43+
callback : function(response) {
44+
done()
45+
}
46+
});
47+
48+
})
49+
it('should publish json arrays without error 1', function(done){
50+
pubnub.publish({channel: channel , message : message_string,
51+
callback : function(response) {
52+
done()
53+
}
54+
});
55+
56+
})
57+
it('should publish json arrays without error 1', function(done){
58+
pubnub.publish({channel: channel , message : message_string,
59+
callback : function(response) {
60+
done()
61+
}
62+
});
63+
64+
})
65+
it('should publish json arrays without error 1', function(done){
66+
pubnub.publish({channel: channel , message : message_string,
67+
callback : function(response) {
68+
done()
69+
}
70+
});
71+
72+
})
73+
it('should publish json arrays without error 1', function(done){
74+
pubnub.publish({channel: channel , message : message_string,
75+
callback : function(response) {
76+
done()
77+
}
78+
});
79+
80+
})
81+
})
82+
})

‎smart-tv/README.md‎

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
# SmartTV JavaScript SDK for Sony, Philips, LG, Samsung and more!
2+
3+
## PubNub JavaScript SDK Usage
4+
5+
You may access the latest PubNub JavaScript SDK on The PubNub Network CDN.
6+
7+
```html
8+
<script src=pubnub.min.js ></script>
9+
<script>(function(){
10+
11+
var pubnub = PUBNUB.init({
12+
publish_key : 'demo',
13+
subscribe_key : 'demo'
14+
});
15+
16+
})();</script>
17+
```
18+
19+
## SIMPLE EXAMPLE
20+
21+
>**NOTE:** Copy and paste this example into a *blank* HTML file.
22+
23+
```html
24+
<div id=pubnub pub-key=demo sub-key=demo></div>
25+
<script src=http://cdn.pubnub.com/pubnub-3.4.8.min.js ></script>
26+
<script>
27+
28+
// LISTEN
29+
PUBNUB.subscribe({
30+
channel : "hello_world",
31+
message : function(m){ alert(m) },
32+
connect : publish
33+
})
34+
35+
// SEND
36+
function publish() {
37+
PUBNUB.publish({
38+
channel : "hello_world",
39+
message : "Hi."
40+
})
41+
}
42+
43+
</script>
44+
```
45+

0 commit comments

Comments
 (0)