File tree Expand file tree Collapse file tree 4 files changed +42
-0
lines changed Expand file tree Collapse file tree 4 files changed +42
-0
lines changed Original file line number Diff line number Diff line change @@ -77,6 +77,9 @@ def reply_content(event, messages)
7777 when Line ::Bot ::Event ::Things
7878 reply_text ( event , "[THINGS]\n #{ JSON . generate ( event [ 'things' ] ) } " )
7979
80+ when Line ::Bot ::Event ::VideoPlayComplete
81+ reply_text ( event , "[VIDEOPLAYCOMPLETE]\n #{ JSON . generate ( event [ 'videoPlayComplete' ] ) } " )
82+
8083 else
8184 reply_text ( event , "Unknown event type: #{ event } " )
8285 end
Original file line number Diff line number Diff line change 2525require 'line/bot/event/member_joined'
2626require 'line/bot/event/member_left'
2727require 'line/bot/event/things'
28+ require 'line/bot/event/video_play_complete'
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+ # Event for when a user finishes viewing a video at least once with the specified trackingId sent by the LINE Official Account.
19+ #
20+ # https://developers.line.biz/en/reference/messaging-api/#video-viewing-complete
21+ class VideoPlayComplete < Base
22+ end
23+ end
24+ end
25+ end
Original file line number Diff line number Diff line change 285285 "unsend": {
286286 "messageId": "325708"
287287 }
288+ },
289+ {
290+ "type": "videoPlayComplete",
291+ "replyToken": "nHuyWi...",
292+ "source": {
293+ "type": "user",
294+ "userId": "U4af4980629..."
295+ },
296+ "timestamp": 12345678901234,
297+ "videoPlayComplete": {
298+ "trackingId": "track_id"
299+ }
288300 }
289301 ]
290302}
@@ -417,6 +429,7 @@ def generate_client
417429 expect ( events [ 18 ] . device_id ) . to eq ( 'deviceid4' )
418430
419431 expect ( events [ 19 ] ) . to be_a ( Line ::Bot ::Event ::Unsend )
432+ expect ( events [ 20 ] ) . to be_a ( Line ::Bot ::Event ::VideoPlayComplete )
420433 end
421434
422435 it 'parses unknown event' do
You can’t perform that action at this time.
0 commit comments