moleculer-typetalk
Moleculer addon that posts message to Typetalk.
Last updated a month ago by is2ei .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install moleculer-typetalk 
SYNC missed versions from official npm registry.

Moleculer logo

moleculer-typetalk

Build Status Coverage Status npm version

Install

$ npm i --save moleculer-typetalk

Usage

const {ServiceBroker} = require("moleculer"),
    TypetalkService = require("moleculer-typetalk"),
    config = require("./config");

// Create broker
const broker = new ServiceBroker({logger: console});

// Load my service
broker.createService({
    mixins: [TypetalkService],
    name: "typetalk",
    settings: {
        token: config.token,
        topicID: config.topicID
    }
});

// Start server
broker.start().then(() => {
    broker
        .call("typetalk.post", {
            message: "Hello, Typetalk!"
        })
        .then(() => {
            // Do something...
        })
        .catch(() => {
            // Do something...
        });
});

For working example, see this repository.

Settings

Property Type Default Description
token String required Typetalk token.
topicID String required Topic ID to post to.

Current Tags

  • 1.0.0                                ...           latest (a month ago)

6 Versions

  • 1.0.0                                ...           a month ago
  • 0.1.5                                ...           a month ago
  • 0.1.3                                ...           6 months ago
  • 0.1.2                                ...           6 months ago
  • 0.1.1                                ...           6 months ago
  • 0.1.0                                ...           6 months ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 47
Dependencies (1)
Dev Dependencies (7)
Dependents (0)
None

Copyright 2014 - 2017 © taobao.org |