fd-slack

    1.0.9 • Public • Published

    Node.js class for slack.com

    Installation

    npm install fd-slack --save

    Usage Example

    1) Add new bot

    2) Create test app

    var Slack = require('fd-slack');
     
    var slack = new Slack('aaaa-000000000000-aaaaaaaaaaaaaaaaaaaaaaaaaa'); //Your skack bot token
     
    slack.query('chat.postMessage', {
        channel: "#general",
        text: "Hello from *Russia*",
        parse: "full"
    }, function(err, data) {
        console.log("Errors: ", err );
        console.log("Response: ", data );
    });

    Methods

    query(method, args, callback)

    • string method - slack.com api method. Full methods list: api.slack.com/methods.
    • object args - POST data
    • callback callback - function(err, res) callback function after a request to the api

    Keywords

    Install

    npm i fd-slack

    DownloadsWeekly Downloads

    9

    Version

    1.0.9

    License

    ISC

    Last publish

    Collaborators

    • superpaintman