ortcClient.send('ChannelName', 'Message content');
ortcClient.subscribe('ChannelName', true, function (ortc, channel, message) { // Do something cool with the received message });
1 2 3
<!-- Adding the library is easy! --> <script src="xrtml.js" type="text/javascript"/>
1 2 3 4 5 6 7 8
xRTML.ready(function(){ xRTML.ConnectionManager.create({ appkey:"myAppKey", authtoken:"myDevToken", url:"http://ortc-developers.realtime.co/server/2.1/", channels:[{name:"myChannel"}] }); });
xRTML.ready(function(){ xRTML.Templating.inject({ id:"myTemplate", content:'<p data-bind="text: prop"></p>' }); xRTML.TagManager.create({ name: "Repeater", target: "#myTarget", template: "myTemplate", triggers:[{ name: "myTrigger" }] });});
Económico Social is the 1st publication in the world to turn its readers into co-editors... Thanks to a model that should be exported and show that it is possible, in Portugal, to challenge the best.