@linagora/esn-chat-client
Chat Client for OpenPaaS linagora.esn.chat Module
Last updated 2 years ago by phandd .
AGPL-3.0 · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install @linagora/esn-chat-client 
SYNC missed versions from official npm registry.

esn-chat-client

Client library for linagora.esn.chat module.

Install

npm install @linagora/esn-chat-client

Usage

const WebsocketClient = require('@linagora/esn-chat-client').WebsocketClient;

const client = new WebsocketClient({token, url, userId}));

client.on('message', message => {
  console.log('Got a message on channel', message);
});

client.connect();

or if you do not have your token or userId

const factory = require('@linagora/esn-chat-client').factory;

factory.get({url, username, password}).then(client => {
  client.on('message', message => {
    console.log('Got a message on channel', message);
  });

  client.connect();
});

Current Tags

  • 1.0.0                                ...           latest (2 years ago)

1 Versions

  • 1.0.0                                ...           2 years ago
Downloads
Today 0
This Week 1
This Month 2
Last Day 0
Last Week 1
Last Month 0
Dependencies (3)
Dependents (0)
None

Copyright 2014 - 2017 © taobao.org |