The Wayback Machine - https://web.archive.org/web/20201204003014/https://github.com/zulip/zulip-node
Skip to content
master
Go to file
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
src
 
 
 
 
 
 
 
 
 
 

README.md

Installing

npm install zulip

Using the API

For now, the only fully supported API operation is sending a message. The other API queries work, but are under active development, so please make sure we know you're using them so that we can notify you as we make any changes to them.

You can obtain your Zulip API key, create bots, and manage bots all from your Zulip settings page.

A typical simple bot sending API messages will look as follows:

var zulip = require('zulip');
var client = new zulip.Client({
    email: "your-bot@zulip.com",
    api_key: "your_32_character_api_key",
    verbose: true
});

client.sendMessage({
    type: "stream",
    content: 'Zulip rules!',
    to: ['stream_name'],
    subject: "feedback"
});

Additional examples:

client.sendMessage({
    type: "private",
    content: "Zulip rules!",
    to: ['user1@example.com']
});

client.sendMessage({
    type: "stream",
    content: 'Zulip rules!',
    to: ['stream_name'],
    subject: "feedback"
}, function (error, response) {
    if (error) {
        console.log("Something went wrong!", error);
    } else {
        console.log("Message sent!");
    }
});

About

No description, website, or topics provided.

Resources

Releases

No releases published

Packages

No packages published
You can’t perform that action at this time.