-
Notifications
You must be signed in to change notification settings - Fork 31
/
Copy pathmodule.yml
219 lines (208 loc) · 7.52 KB
/
module.yml
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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
---
openapi: 3.0.0
info:
title: LINE Messaging API
version: "0.0.1"
description:
This document describes LINE Messaging API.
servers:
- url: "https://api.line.me"
security:
- Bearer: []
tags:
- name: line-module
paths:
"/v2/bot/channel/detach":
post:
externalDocs:
url: https://developers.line.biz/en/reference/partner-docs/#unlink-detach-module-channel-by-operation-mc-admin
tags:
- line-module
operationId: detachModule
description: "The module channel admin calls the Detach API to detach the module channel from a LINE Official Account."
requestBody:
content:
application/json:
schema:
"$ref": "#/components/schemas/DetachModuleRequest"
responses:
"200":
description: "OK"
"/v2/bot/chat/{chatId}/control/acquire":
post:
externalDocs:
url: https://developers.line.biz/en/reference/partner-docs/#acquire-control-api
tags:
- line-module
operationId: acquireChatControl
description: |+
If the Standby Channel wants to take the initiative (Chat Control), it calls the Acquire Control API.
The channel that was previously an Active Channel will automatically switch to a Standby Channel.
parameters:
- name: chatId
in: path
required: true
description: "The `userId`, `roomId`, or `groupId`"
schema:
type: string
requestBody:
content:
application/json:
schema:
"$ref": "#/components/schemas/AcquireChatControlRequest"
responses:
"200":
description: "OK"
"/v2/bot/chat/{chatId}/control/release":
post:
externalDocs:
url: https://developers.line.biz/en/reference/partner-docs/#release-control-api
tags:
- line-module
operationId: releaseChatControl
description: |+
To return the initiative (Chat Control) of Active Channel to Primary Channel, call the Release Control API.
parameters:
- name: chatId
in: path
required: true
description: "The `userId`, `roomId`, or `groupId`"
schema:
type: string
responses:
"200":
description: "OK"
"/v2/bot/list":
get:
externalDocs:
url: https://developers.line.biz/en/reference/partner-docs/#get-multiple-bot-info-api
tags:
- line-module
operationId: getModules
description: "Gets a list of basic information about the bots of multiple LINE Official Accounts that have attached module channels."
parameters:
- name: start
in: query
required: false
description: |+
Value of the continuation token found in the next property of the JSON object returned in the response.
If you can't get all basic information about the bots in one request, include this parameter to get the remaining array.
schema:
type: string
- name: limit
in: query
required: false
description: |+
Specify the maximum number of bots that you get basic information from. The default value is 100.
Max value: 100
schema:
type: integer
format: int32
default: 100
maximum: 100
responses:
"200":
description: "OK"
content:
"application/json":
schema:
"$ref": "#/components/schemas/GetModulesResponse"
example:
bots:
- userId: Uf2dd6e8b081d2ff9c05c98a8a8b269c9
basicId: "@628..."
displayName: Test01
pictureUrl: https://profile.line-scdn.net/0hyxytJNAlJldEDQzlatVZAHhIKDoz...
- userId: Ua831d37bfe8232808202b85127663f70
basicId: "@076lu..."
displayName: Test02
pictureUrl: https://profile.line-scdn.net/0hohnizdyzMEdTECbnVo9PEG9VPiok...
- userId: Ub77ea431fba86f7c159a0c0f5be43d9f
basicId: "@290n..."
displayName: Test03
- userId: Ub8ec80a14e879e9c6833fb4cee0e632b
basicId: "@793j..."
displayName: Test04
components:
securitySchemes:
Bearer:
type: http
scheme: bearer
description: "Channel access token"
schemas:
DetachModuleRequest:
externalDocs:
url: https://developers.line.biz/en/reference/partner-docs/#unlink-detach-module-channel-by-operation-mc-admin
type: object
description: "Unlink (detach) the module channel by the operation of the module channel administrator"
properties:
botId:
description: "User ID of the LINE Official Account bot attached to the module channel."
type: string
AcquireChatControlRequest:
externalDocs:
url: https://developers.line.biz/en/reference/partner-docs/#acquire-control-api
description: "Request entity of the Acquire Control API"
type: object
properties:
expired:
type: boolean
description: |+
`True`: After the time limit (ttl) has passed, the initiative (Chat Control) will return to the Primary Channel. (Default)
`False`: There's no time limit and the initiative (Chat Control) doesn't change over time.
example: true
ttl:
type: integer
format: int32
# one year = 3600*24*365
maximum: 31536000
description: |+
The time it takes for initiative (Chat Control) to return to the Primary Channel (the time that the module channel stays on the Active Channel).
The value is specified in seconds. The maximum value is one year (3600 * 24 * 365).
The default value is 3600 (1 hour).
* Ignored if the value of expired is false.
example: 3600
GetModulesResponse:
externalDocs:
url: https://developers.line.biz/en/reference/partner-docs/#get-multiple-bot-info-api
description: "List of bots to which the module is attached"
required:
- bots
type: object
properties:
bots:
type: array
items:
"$ref": "#/components/schemas/ModuleBot"
description: "Array of Bot list Item objects representing basic information about the bot."
next:
type: string
description: |+
Continuation token.
Used to get the next array of basic bot information.
This property is only returned if there are more unreturned results.
ModuleBot:
externalDocs:
url: https://developers.line.biz/en/reference/partner-docs/#get-multiple-bot-info-api
description: "basic information about the bot."
required:
- userId
- basicId
- displayName
type: object
properties:
userId:
type: string
description: "Bot's user ID"
basicId:
type: string
description: "Bot's basic ID"
premiumId:
type: string
description: "Bot's premium ID. Not included in the response if the premium ID isn't set."
displayName:
type: string
description: "Bot's display name"
pictureUrl:
type: string
description: "Profile image URL. Image URL starting with `https://`. Not included in the response if the bot doesn't have a profile image."