@nju33/slack
[![github](https://badgen.net/badge//nju33,slack/000?icon=github&list=1)](https://github.com/nju33/slack) [![npm:version](https://badgen.net/npm/v/@nju33/slack?icon=npm&label=)](https://www.npmjs.com/package/@nju33/slack) [![ci:status](https://badgen.net/
Last updated 7 months ago by nju33 .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install @nju33/slack 
SYNC missed versions from official npm registry.

@nju33/slack

github npm:version ci:status document:typedoc license code style: prettier typescript

Install

yarn add @nju33/slack

Usage

import {useChat} from '@nju33/slack';

const {json, updateText, useAttachment} = useChat('postMessage', 'text');
updateText(text => `update-${text}`);
const {useTitle, useButton} = useAttachment('callback_id');
useTitle('title');
useButton('button name', 'button text', 'button value');

fetch(responseURL, {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json; charset=utf-8'
  },
  body: JSON.stringify(json()),
});
//
// {
//   title: 'update-text',
//   attachments: [
//     {
//       callback_id: 'callback_id',
//       title: 'title',
//       actions: [
//        {
//          type: 'button',
//          name: 'button name',
//          text: 'button text',
//          value: 'button value',
//        }
//      ],
//     },
//   ]
// }
//

Current Tags

  • 1.7.5                                ...           latest (7 months ago)
  • 1.1.0-0                                ...           next (8 months ago)

23 Versions

  • 1.7.5                                ...           7 months ago
  • 1.7.4                                ...           7 months ago
  • 1.7.3                                ...           7 months ago
  • 1.7.2                                ...           7 months ago
  • 1.7.1                                ...           7 months ago
  • 1.7.0                                ...           7 months ago
  • 1.6.6                                ...           7 months ago
  • 1.6.4                                ...           7 months ago
  • 1.6.2                                ...           7 months ago
  • 1.6.0                                ...           7 months ago
  • 1.4.0                                ...           7 months ago
  • 1.2.0                                ...           7 months ago
  • 1.1.0-0                                ...           8 months ago
  • 1.0.0-0                                ...           a year ago
  • 0.4.3                                ...           a year ago
  • 0.4.2                                ...           a year ago
  • 0.4.1                                ...           a year ago
  • 0.4.0                                ...           a year ago
  • 0.3.0                                ...           a year ago
  • 0.2.0                                ...           a year ago
  • 0.1.1                                ...           a year ago
  • 0.1.0                                ...           a year ago
  • 0.0.1                                ...           a year ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 1
Last Day 0
Last Week 1
Last Month 24
Dependencies (2)
Dev Dependencies (18)
Dependents (0)
None

Copyright 2014 - 2016 © taobao.org |