Skip to content

File tree

4 files changed

+9
-33
lines changed

4 files changed

+9
-33
lines changed

docs/api-reference.md

Lines changed: 0 additions & 22 deletions
This file was deleted.

docs/getting-started/basic-usage.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,4 +74,4 @@ app.listen(3000);
7474
The full examples with comments can be found
7575
in [examples](https://github.com/line/line-bot-sdk-nodejs/tree/master/examples/).
7676

77-
For the specifications of API, please refer to [API Reference](../api-reference.md).
77+
For the specifications of API, please refer to [API Reference](../apidocs/modules.md).

docs/guide/client.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
Client is to send messages, get user or content information, or leave chats.
44
A client instance provides functions for [messaging APIs](https://developers.line.biz/en/reference/messaging-api/),
55
so that you do not need to worry about HTTP requests and can focus on data.
6-
For type signatures of the methods, please refer to [its API reference](../api-reference/client.md).
6+
For type signatures of the methods, please refer to [its API reference](../apidocs/modules.md).
77

88
## Create a client
99

@@ -124,5 +124,5 @@ stream.on('error', (err) => {
124124
```
125125

126126
You can check which method returns `Promise` or `ReadableStream` in the API
127-
reference of [`Client`](../api-reference/client.md). For type signatures of the
128-
errors above, please refer to [Exceptions](../api-reference/exceptions.md).
127+
reference of [`Client`](../apidocs/modules.md). For type signatures of the
128+
errors above, please refer to [Exceptions](../apidocs/modules.md).

docs/guide/webhook.md

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,16 +15,14 @@ of the official document.
1515
**Signature validation** is checking if a request is actually sent from real
1616
LINE servers, not a fraud. The validation is conducted by checking
1717
the [X-Line-Signature](https://developers.line.biz/en/reference/messaging-api/#signature-validation) header
18-
and request body. There is a [`validateSignature()`](../api-reference/validate-signature.md)
19-
function to do this.
18+
and request body. There is a `validateSignature()` function to do this.
2019

2120
**Webhook event object parsing** is literally parsing webhook event objects,
2221
which contains information of each webhook event. The objects are provided as
23-
request body in JSON format, so any body parser will work here. For interal
24-
object types in this SDK, please refer to [Message and event objects](../api-reference/message-and-event-objects.md).
22+
request body in JSON format, so any body parser will work here.
2523

2624
There is a function to generate a [connect](https://github.com/senchalabs/connect) middleware,
27-
[`middleware()`](../api-reference/middleware.md), to conduct both of them. If
25+
[`middleware()`](https://github.com/line/line-bot-sdk-nodejs/blob/master/lib/middleware.ts), to conduct both of them. If
2826
your server can make use of connect middlewares, such as [Express](https://expressjs.com/),
2927
using the middleware is a recommended way to build a webhook server.
3028

@@ -115,7 +113,7 @@ However, there are environments where `req.body` is pre-parsed, such as
115113
[Firebase Cloud Functions](https://firebase.google.com/docs/functions/http-events).
116114
If it parses the body into string or buffer, the middleware will use the body
117115
as it is and work just fine. If the pre-parsed body is an object, the webhook
118-
middleware will fail to work. In the case, please use [`validateSignature()`](../api-reference/validate-signature.md)
116+
middleware will fail to work. In the case, please use [`validateSignature()`](https://github.com/line/line-bot-sdk-nodejs/blob/master/lib/validate-signature.ts)
119117
manually with raw body.
120118

121119
## Error handling
@@ -127,7 +125,7 @@ and the other is `JSONParseError`.
127125
- `SignatureValidationFailed` is thrown when a request has a wrong signature.
128126
- `JSONParseError` occurs when a request body cannot be parsed as JSON.
129127

130-
For type references of the errors, please refer to [the API reference](../api-reference/exceptions.md).
128+
For type references of the errors, please refer to [the API reference](../apidocs/modules.md).
131129

132130
The errors can be handled with [error middleware](https://github.com/senchalabs/connect#error-middleware).
133131

0 commit comments

Comments
 (0)