2.0.10 • Published 4 years ago

kakao-message-template v2.0.10

Weekly downloads
1
License
MIT
Repository
github
Last release
4 years ago

KAKAO-MESSAGE-TEMPLATE

A kakao custom message template builder

Getting Started

Installation

This is a module available by the npm registry.
Tested on Node.js v10.16.2, Node.js 8.0 or higher is required.
Installation can be done by using the npm install command.
Make sure to create package.json by npm init command.

$ npm install kakao-message-template

Features

  • Creating Custom Message Template
  • Full Customizable Message Template

Examples

Sending Feed Message

const {MessageTemplate, MessageInfo, MessageType, FeedContent, Button} = require('kakao-message-template');

const Header = new MessageInfo(MessageType.FEED, 'http://example.com', 'App Name', 'http://example.com/icon.png');

const Content = new FeedContent('My Feed Message', 'Using kakao-message-template', 'https://example.com/mypage');
Content.Buttons.push(new Button('Homepage', 'http://example.com/'));
Content.Buttons.push(new Button('Signup', 'http://example.com/signup'));

const Message = new MessageTemplate(Header, Content);

// Sending attachment by node-kakao
const attachment = new AttachmentTemplate(Message);
chat.replyAttachment(attachment);

Sending List Message

const {MessageTemplate, MessageInfo, MessageType, ListContent, ArticleListItem} = require('kakao-message-template');

const Header = new MessageInfo(MessageType.LIST, 'http://example.com', 'App Name', 'http://example.com/icon.png');

const Content = new ListContent('Top 3');
Content.ArticleList.push(
    new ArticleListItem('Alice', 'HTML', 'http://example.com/alice'),
    new ArticleListItem('Bob', 'CSS', 'http://example.com/bob'),
    new ArticleListItem('Carol', 'JAVASCRIPT', 'http://example.com/carol')
);

const Message = new MessageTemplate(Header, Content);

// Sending attachment by node-kakao
const attachment = new AttachmentTemplate(Message);
chat.replyAttachment(attachment);

License (MIT)

License

2.0.10

4 years ago

2.0.9

4 years ago

2.0.8

4 years ago

2.0.7

4 years ago

2.0.6

4 years ago

2.0.3

4 years ago

2.0.5

4 years ago

2.0.4

4 years ago

2.0.1

4 years ago

2.0.0

4 years ago

1.0.5

4 years ago

1.0.4

4 years ago

1.0.3

4 years ago

1.0.2

4 years ago

1.0.1

4 years ago

1.0.0

4 years ago