1.1.9 • Published 7 years ago

welitejs v1.1.9

Weekly downloads
4
License
MIT
Repository
github
Last release
7 years ago

welitejs

A lightweight JavaScript library for WeYouMe

Install

npm install welitejs --save

Usage

var welitejs = require('welitejs');

// Init WebSocket client
var client = new welitejs.Client('wss://peer.WeYouMe.io:8090');

// Get accounts
client.call('get_accounts', ['fabien'], function(err, result) {
  console.log(err, result);
});

Promises

You can also use welitejs with promises by promisifying welitejs with bluebird as in:

var welitejs = require('welitejs');
bluebird.promisifyAll(welitejs.Client.prototype);

It'll add a Async to all welitejs functions (e.g. return client.callAsync().then())

// So instead of writing client.request('get_accounts', ['fabien'], cb); you have to write:
return client.callAsync('get_accounts', ['fabien']).then(function(result) {
  console.log(result); // => [{ id: 26921, name: 'fabien' ...]
});

License

MIT.

1.1.9

7 years ago

1.1.8

7 years ago

1.1.7

7 years ago

1.1.6

7 years ago

1.1.5

7 years ago

1.1.4

7 years ago

1.1.3

7 years ago

1.1.130

7 years ago

1.1.129

7 years ago

1.1.128

7 years ago

1.1.127

7 years ago

1.1.126

7 years ago

1.1.125

7 years ago

1.1.124

7 years ago

1.1.122

7 years ago

1.1.121

7 years ago

1.1.120

7 years ago

1.1.119

7 years ago

1.1.118

7 years ago

1.1.117

7 years ago

1.1.116

7 years ago

1.1.115

7 years ago

1.1.114

7 years ago

1.1.113

7 years ago

1.1.111

7 years ago

1.1.11

7 years ago