1.0.0 • Published 8 years ago

diphenhydramine v1.0.0

Weekly downloads
3
License
BSD-3-Clause
Repository
github
Last release
8 years ago

Diphenhydramine

Chat with channels and long-ephemeral messages.

Installation

npm install

Usage

var diphenhydramine = new Diphenhydramine();

Add a chat message

diphenhydramine.addChat('test message', 'channelname',  {
  media: 'http://someimage.jpg',
  fingerprint: '111'
}, function (err, c) {
  if (!err) {
    console.log(c);
  }
});

Note: 'channelname' cannot be empty and must only contain alphanumeric characters. Any other characters will be removed automatically.

Get all chats

diphenhydramine.getChats(<reverse>, 'channelname', function (err, c) {
  if (!err) {
    console.log(c);
  }
});

reverse is an optional boolean to reverse the chat history from latest -> earliest. Defaults at earliest -> latest.

Tests

make test
1.0.0

8 years ago

0.0.5

10 years ago

0.0.4

10 years ago

0.0.3

10 years ago

0.0.2

10 years ago

0.0.1

10 years ago

0.0.0

10 years ago