sentaca / rapifire

Rapifire.com websocket API client.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Rapifire Websocket API

Example

<script src="rapifire.min.js"></script>

<script>
 var client = new Rapifire({
   appId: '...',
   authId: '...',
   authKey: '...',
   debug: true,
   url: 'ws://ps.sentaca.com/pubsub',
   onconnect: function() {
     client.subscribe({
       channel:  'test', // or channel: ['a', 'b', 'c'] 
       interactive: true,
       callback: function(message, headers) {
         console.log("Received msg: %O headers: %O", message, headers);
       }
     });
   }
 });

</script>

About

Rapifire.com websocket API client.


Languages

Language:JavaScript 89.3%Language:HTML 10.7%