A custom slack library for Node.js
Use the package manager npm to install libslackjs.
npm install libslackjs
const slack = require('libslackjs');
let home = new Slack.UI.Surface.Home();
home.addBlock(
new Slack.UI.Blocks.Section()
.setText("Hello, world!")
);
new Slack.API.views.publish(access_token, user_id, home, (error, response, body) => {
if (error)
return console.log(error);
});
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
Please make sure to update tests as appropriate.