Skip to content

Commit

Permalink
added README.md to SmartTV platform folder.
Browse files Browse the repository at this point in the history
  • Loading branch information
stephenlb committed May 24, 2013
1 parent 1eba5c9 commit 68b040b
Show file tree
Hide file tree
Showing 4 changed files with 130 additions and 1 deletion.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
node_modules
javascript.iml
*.js-e
upload/*
.idea
*.iml
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@ You may access the latest PubNub JavaScript SDK on The PubNub Network CDN.
#### Subscribe Only mode (exclude Publish Key)

In the case where the client will never publish and for security considerations,
In the case where the client will never publish
and for security considerations,
use this following method for initialization:

```html
Expand Down
82 changes: 82 additions & 0 deletions node.js/tests/test2.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
var assert = require('assert');
var PUBNUB = require('../pubnub.js');

var pubnub = PUBNUB.init({
publish_key : 'demo',
subscribe_key : 'demo'
});

var channel = 'javascript-test-channel';
var count = 0;

var message_string = 'Hi from Javascript';

describe('Pubnub', function() {
this.timeout(40000);
describe('#publish()', function(){
it('should publish json arrays without error 1', function(done){
pubnub.publish({channel: channel , message : message_string,
callback : function(response) {
done()
}
});

})
it('should publish json arrays without error 1', function(done){
pubnub.publish({channel: channel , message : message_string,
callback : function(response) {
done()
}
});

})
it('should publish json arrays without error 1', function(done){
pubnub.publish({channel: channel , message : message_string,
callback : function(response) {
done()
}
});

})
it('should publish json arrays without error 1', function(done){
pubnub.publish({channel: channel , message : message_string,
callback : function(response) {
done()
}
});

})
it('should publish json arrays without error 1', function(done){
pubnub.publish({channel: channel , message : message_string,
callback : function(response) {
done()
}
});

})
it('should publish json arrays without error 1', function(done){
pubnub.publish({channel: channel , message : message_string,
callback : function(response) {
done()
}
});

})
it('should publish json arrays without error 1', function(done){
pubnub.publish({channel: channel , message : message_string,
callback : function(response) {
done()
}
});

})
it('should publish json arrays without error 1', function(done){
pubnub.publish({channel: channel , message : message_string,
callback : function(response) {
done()
}
});

})
})
})
45 changes: 45 additions & 0 deletions smart-tv/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
# SmartTV JavaScript SDK for Sony, Philips, LG, Samsung and more!

## PubNub JavaScript SDK Usage

You may access the latest PubNub JavaScript SDK on The PubNub Network CDN.

```html
<script src=pubnub.min.js ></script>
<script>(function(){
var pubnub = PUBNUB.init({
publish_key : 'demo',
subscribe_key : 'demo'
});
})();</script>
```

## SIMPLE EXAMPLE

>**NOTE:** Copy and paste this example into a *blank* HTML file.
```html
<div id=pubnub pub-key=demo sub-key=demo></div>
<script src=http://cdn.pubnub.com/pubnub-3.4.8.min.js ></script>
<script>
// LISTEN
PUBNUB.subscribe({
channel : "hello_world",
message : function(m){ alert(m) },
connect : publish
})
// SEND
function publish() {
PUBNUB.publish({
channel : "hello_world",
message : "Hi."
})
}
</script>
```

0 comments on commit 68b040b

Please sign in to comment.