File tree Expand file tree Collapse file tree 4 files changed +91
-0
lines changed Expand file tree Collapse file tree 4 files changed +91
-0
lines changed Original file line number Diff line number Diff line change 21
21
require 'line/bot/event/message'
22
22
require 'line/bot/event/postback'
23
23
require 'line/bot/event/unfollow'
24
+ require 'line/bot/event/member_joined'
25
+ require 'line/bot/event/member_left'
Original file line number Diff line number Diff line change
1
+ # Copyright 2016 LINE
2
+ #
3
+ # LINE Corporation licenses this file to you under the Apache License,
4
+ # version 2.0 (the "License"); you may not use this file except in compliance
5
+ # with the License. You may obtain a copy of the License at:
6
+ #
7
+ # http://www.apache.org/licenses/LICENSE-2.0
8
+ #
9
+ # Unless required by applicable law or agreed to in writing, software
10
+ # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
11
+ # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
12
+ # License for the specific language governing permissions and limitations
13
+ # under the License.
14
+
15
+ module Line
16
+ module Bot
17
+ module Event
18
+ class MemberJoined < Base
19
+ end
20
+ end
21
+ end
22
+ end
Original file line number Diff line number Diff line change
1
+ # Copyright 2016 LINE
2
+ #
3
+ # LINE Corporation licenses this file to you under the Apache License,
4
+ # version 2.0 (the "License"); you may not use this file except in compliance
5
+ # with the License. You may obtain a copy of the License at:
6
+ #
7
+ # http://www.apache.org/licenses/LICENSE-2.0
8
+ #
9
+ # Unless required by applicable law or agreed to in writing, software
10
+ # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
11
+ # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
12
+ # License for the specific language governing permissions and limitations
13
+ # under the License.
14
+
15
+ module Line
16
+ module Bot
17
+ module Event
18
+ class MemberLeft < Base
19
+ end
20
+ end
21
+ end
22
+ end
Original file line number Diff line number Diff line change 158
158
"result": "ok",
159
159
"nonce": "nonce"
160
160
}
161
+ },
162
+ {
163
+ "type": "memberJoined",
164
+ "replyToken": "replyToken",
165
+ "source": {
166
+ "type": "user",
167
+ "groupId": "groupId"
168
+ },
169
+ "timestamp": 12345678901234,
170
+ "joined": {
171
+ "members": [
172
+ {
173
+ "type": "user",
174
+ "userId": "U4af4980629..."
175
+ },
176
+ {
177
+ "type": "user",
178
+ "userId": "U91eeaf62d9..."
179
+ }
180
+ ]
181
+ }
182
+ },
183
+ {
184
+ "type": "memberLeft",
185
+ "replyToken": "replyToken",
186
+ "source": {
187
+ "type": "user",
188
+ "groupId": "groupId"
189
+ },
190
+ "timestamp": 12345678901234,
191
+ "left": {
192
+ "members": [
193
+ {
194
+ "type": "user",
195
+ "userId": "U4af4980629..."
196
+ },
197
+ {
198
+ "type": "user",
199
+ "userId": "U91eeaf62d9..."
200
+ }
201
+ ]
202
+ }
161
203
}
162
204
]
163
205
}
@@ -268,6 +310,9 @@ def generate_client
268
310
expect ( events [ 12 ] ) . to be_a ( Line ::Bot ::Event ::AccountLink )
269
311
expect ( events [ 12 ] . result ) . to eq ( "ok" )
270
312
expect ( events [ 12 ] . nonce ) . to eq ( "nonce" )
313
+
314
+ expect ( events [ 13 ] ) . to be_a ( Line ::Bot ::Event ::MemberJoined )
315
+ expect ( events [ 14 ] ) . to be_a ( Line ::Bot ::Event ::MemberLeft )
271
316
end
272
317
273
318
it 'parses unknown event' do
You can’t perform that action at this time.
0 commit comments