Skip to content

xopbatgh/da-centrifugo-client

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 

Repository files navigation

da-centrifugo-client

Is a event-based nodejs client for Centrifugo Donation Alerts API

See the full example at /da-centrifugo-client/example.js

Step 1. Init

var daClientItem = new DaClient(da_user_id, socket_connection_token, access_token);

Step 2. Setup events

Available events:

#####— onConnected (daClientItem) is fired on connection successful and ready to receive messages

#####— onFailed (daClientItem) is fired on connection failed and client is not ready and never become so

#####— onNewMessage (daClientItem, message) on any new message from DA Centrifugo received

#####— onNewDonationMessage (daClientItem, message) on donation message received only

Example:

daClientItem.onConnected(function(client){

    console.log('Success: ' + client.user_id);

});

Feel free to contribute

About

Is a nodejs client for Centrifugo Donation Alerts API

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published