forked from line/line-bot-sdk-nodejs
-
Notifications
You must be signed in to change notification settings - Fork 1
/
api-reference.html
30 lines (28 loc) · 10.7 KB
/
api-reference.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
<!DOCTYPE html>
<html lang="en-US">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1">
<title>API Reference | line-bot-sdk-nodejs</title>
<meta name="description" content="Node.js SDK for LINE Messaging API">
<link rel="icon" href="/line-bot-sdk-nodejs/favicon.ico">
<link rel="preload" href="/line-bot-sdk-nodejs/assets/css/styles.beba238d.css" as="style"><link rel="preload" href="/line-bot-sdk-nodejs/assets/js/app.beba238d.js" as="script"><link rel="preload" href="/line-bot-sdk-nodejs/assets/js/5.6a811e23.js" as="script"><link rel="prefetch" href="/line-bot-sdk-nodejs/assets/js/7.0cadc9bb.js"><link rel="prefetch" href="/line-bot-sdk-nodejs/assets/css/1.styles.5a8ea794.css"><link rel="prefetch" href="/line-bot-sdk-nodejs/assets/js/1.5a8ea794.js"><link rel="prefetch" href="/line-bot-sdk-nodejs/assets/css/2.styles.4217617d.css"><link rel="prefetch" href="/line-bot-sdk-nodejs/assets/js/2.4217617d.js"><link rel="prefetch" href="/line-bot-sdk-nodejs/assets/js/3.00fd5155.js"><link rel="prefetch" href="/line-bot-sdk-nodejs/assets/js/4.0a538e22.js"><link rel="prefetch" href="/line-bot-sdk-nodejs/assets/js/6.db9c4c3b.js"><link rel="prefetch" href="/line-bot-sdk-nodejs/assets/js/8.111766d2.js"><link rel="prefetch" href="/line-bot-sdk-nodejs/assets/js/9.4e1c3eeb.js"><link rel="prefetch" href="/line-bot-sdk-nodejs/assets/js/10.c105c408.js"><link rel="prefetch" href="/line-bot-sdk-nodejs/assets/js/11.36ed3bdb.js"><link rel="prefetch" href="/line-bot-sdk-nodejs/assets/js/12.3292ae03.js"><link rel="prefetch" href="/line-bot-sdk-nodejs/assets/js/13.e721f3ae.js"><link rel="prefetch" href="/line-bot-sdk-nodejs/assets/js/14.b91ba6be.js"><link rel="prefetch" href="/line-bot-sdk-nodejs/assets/js/15.f132f0db.js"><link rel="prefetch" href="/line-bot-sdk-nodejs/assets/js/16.663417a1.js"><link rel="prefetch" href="/line-bot-sdk-nodejs/assets/js/17.bb496f13.js"><link rel="prefetch" href="/line-bot-sdk-nodejs/assets/js/18.884079c0.js">
<link rel="stylesheet" href="/line-bot-sdk-nodejs/assets/css/1.styles.5a8ea794.css"><link rel="stylesheet" href="/line-bot-sdk-nodejs/assets/css/2.styles.4217617d.css"><link rel="stylesheet" href="/line-bot-sdk-nodejs/assets/css/styles.beba238d.css">
</head>
<body>
<div id="app" data-server-rendered="true"><div class="theme-container"><header class="navbar"><div class="sidebar-button"><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" role="img" viewBox="0 0 448 512" class="icon"><path fill="currentColor" d="M436 124H12c-6.627 0-12-5.373-12-12V80c0-6.627 5.373-12 12-12h424c6.627 0 12 5.373 12 12v32c0 6.627-5.373 12-12 12zm0 160H12c-6.627 0-12-5.373-12-12v-32c0-6.627 5.373-12 12-12h424c6.627 0 12 5.373 12 12v32c0 6.627-5.373 12-12 12zm0 160H12c-6.627 0-12-5.373-12-12v-32c0-6.627 5.373-12 12-12h424c6.627 0 12 5.373 12 12v32c0 6.627-5.373 12-12 12z"></path></svg></div> <a href="/line-bot-sdk-nodejs/" class="home-link router-link-active"><!----> <span class="site-name">line-bot-sdk-nodejs</span></a> <div class="links" style="max-width:nullpx;"><div class="search-box"><input aria-label="Search" autocomplete="off" spellcheck="false" value=""> <!----></div> <nav class="nav-links can-hide"><div class="nav-item"><a href="/line-bot-sdk-nodejs/" class="nav-link">Introduction</a></div><div class="nav-item"><a href="/line-bot-sdk-nodejs/getting-started.html" class="nav-link">Getting Started</a></div><div class="nav-item"><a href="/line-bot-sdk-nodejs/guide.html" class="nav-link">Guide</a></div><div class="nav-item"><a href="/line-bot-sdk-nodejs/api-reference.html" class="nav-link router-link-exact-active router-link-active">API Reference</a></div><div class="nav-item"><a href="/line-bot-sdk-nodejs/CONTRIBUTING.html" class="nav-link">Contributing</a></div><div class="nav-item"><a href="https://developers.line.me/en/" target="_blank" rel="noopener noreferrer" class="nav-link external">
LINE Developers
<svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></div><div class="nav-item"><a href="https://github.com/line/line-bot-sdk-nodejs/" target="_blank" rel="noopener noreferrer" class="nav-link external">
GitHub
<svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></div> <!----></nav></div></header> <div class="sidebar-mask"></div> <div class="sidebar"><nav class="nav-links"><div class="nav-item"><a href="/line-bot-sdk-nodejs/" class="nav-link">Introduction</a></div><div class="nav-item"><a href="/line-bot-sdk-nodejs/getting-started.html" class="nav-link">Getting Started</a></div><div class="nav-item"><a href="/line-bot-sdk-nodejs/guide.html" class="nav-link">Guide</a></div><div class="nav-item"><a href="/line-bot-sdk-nodejs/api-reference.html" class="nav-link router-link-exact-active router-link-active">API Reference</a></div><div class="nav-item"><a href="/line-bot-sdk-nodejs/CONTRIBUTING.html" class="nav-link">Contributing</a></div><div class="nav-item"><a href="https://developers.line.me/en/" target="_blank" rel="noopener noreferrer" class="nav-link external">
LINE Developers
<svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></div><div class="nav-item"><a href="https://github.com/line/line-bot-sdk-nodejs/" target="_blank" rel="noopener noreferrer" class="nav-link external">
GitHub
<svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></div> <!----></nav> <ul class="sidebar-links"><li><div class="sidebar-group first"><p class="sidebar-heading open"><span>Introduction</span> <!----></p> <ul class="sidebar-group-items"><li><a href="/line-bot-sdk-nodejs/" class="sidebar-link">LINE Messaging API SDK for nodejs</a></li></ul></div></li><li><div class="sidebar-group"><p class="sidebar-heading"><span>Getting Started</span> <!----></p> <ul class="sidebar-group-items"><li><a href="/line-bot-sdk-nodejs/getting-started/requirements.html" class="sidebar-link">Requirements</a></li><li><a href="/line-bot-sdk-nodejs/getting-started/install.html" class="sidebar-link">Install</a></li><li><a href="/line-bot-sdk-nodejs/getting-started/basic-usage.html" class="sidebar-link">Basic Usage</a></li></ul></div></li><li><div class="sidebar-group"><p class="sidebar-heading"><span>Guide</span> <!----></p> <ul class="sidebar-group-items"><li><a href="/line-bot-sdk-nodejs/guide/webhook.html" class="sidebar-link">Webhook</a></li><li><a href="/line-bot-sdk-nodejs/guide/client.html" class="sidebar-link">Client</a></li><li><a href="/line-bot-sdk-nodejs/guide/typescript.html" class="sidebar-link">TypeScript</a></li></ul></div></li><li><div class="sidebar-group"><p class="sidebar-heading"><span>API Reference</span> <!----></p> <ul class="sidebar-group-items"><li><a href="/line-bot-sdk-nodejs/api-reference/client.html" class="sidebar-link">new Client(config)</a></li><li><a href="/line-bot-sdk-nodejs/api-reference/validate-signature.html" class="sidebar-link">validateSignature(body, channelSecret, signature)</a></li><li><a href="/line-bot-sdk-nodejs/api-reference/middleware.html" class="sidebar-link">middleware(config)</a></li><li><a href="/line-bot-sdk-nodejs/api-reference/exceptions.html" class="sidebar-link">Exceptions</a></li><li><a href="/line-bot-sdk-nodejs/api-reference/message-and-event-objects.html" class="sidebar-link">Message and event objects</a></li></ul></div></li><li><div class="sidebar-group"><p class="sidebar-heading"><span>Contributing</span> <!----></p> <ul class="sidebar-group-items"><li><a href="/line-bot-sdk-nodejs/CONTRIBUTING.html" class="sidebar-link">How to contribute to LINE Bot SDK for Node.js</a></li></ul></div></li></ul> </div> <div class="page"> <div class="content"><h1 id="api-reference"><a href="#api-reference" aria-hidden="true" class="header-anchor">#</a> API Reference</h1> <p>Please import the library via <code>require</code> or <code>import</code>.</p> <div class="language-js extra-class"><pre class="language-js"><code><span class="token comment">// CommonJS</span>
<span class="token keyword">const</span> line <span class="token operator">=</span> <span class="token function">require</span><span class="token punctuation">(</span><span class="token string">'@line/bot-sdk'</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token comment">// ES2015 modules or TypeScript</span>
<span class="token keyword">import</span> <span class="token operator">*</span> <span class="token keyword">as</span> line <span class="token keyword">from</span> <span class="token string">'@line/bot-sdk'</span><span class="token punctuation">;</span>
</code></pre></div><p>For the detailed API reference of each, please refer to their own pages.</p> <ul><li><a href="/line-bot-sdk-nodejs/api-reference/client.html">Client</a></li> <li><a href="/line-bot-sdk-nodejs/api-reference/validate-signature.html">validateSignature</a></li> <li><a href="/line-bot-sdk-nodejs/api-reference/middleware.html">middleware</a></li> <li><a href="/line-bot-sdk-nodejs/api-reference/exceptions.html">Exceptions</a></li> <li><a href="/line-bot-sdk-nodejs/api-reference/message-and-event-objects.html">Message and event objects</a></li></ul></div> <div class="page-edit"><!----> <!----></div> <!----> </div> <!----></div></div>
<script src="/line-bot-sdk-nodejs/assets/js/5.6a811e23.js" defer></script><script src="/line-bot-sdk-nodejs/assets/js/app.beba238d.js" defer></script>
</body>
</html>