From 41468d5f60a7a33c7d9a5cf9f8427ccbf16fa1bf Mon Sep 17 00:00:00 2001 From: kaminaka rikuya Date: Mon, 20 Sep 2021 23:03:17 +0900 Subject: [PATCH] VideoPlayCompleteEvent -> VideoViewingCompleteEvent --- .../Webhooks/Event/VidepPlayCompleteEvent.cs | 4 ++-- src/line-bot-sdk-csharp/Webhooks/Event/WebhookEvent.cs | 2 +- src/line-bot-sdk-csharp/Webhooks/WebhookApplication.cs | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/line-bot-sdk-csharp/Webhooks/Event/VidepPlayCompleteEvent.cs b/src/line-bot-sdk-csharp/Webhooks/Event/VidepPlayCompleteEvent.cs index e820335..8d311fc 100644 --- a/src/line-bot-sdk-csharp/Webhooks/Event/VidepPlayCompleteEvent.cs +++ b/src/line-bot-sdk-csharp/Webhooks/Event/VidepPlayCompleteEvent.cs @@ -1,10 +1,10 @@ namespace LineMessagingAPI.Webhooks { - public class VideoPlayCompleteEvent : ReplyableEvent + public class VideoViewingCompleteEvent : ReplyableEvent { public VideoPlayComplete VideoPlayComplete; - public VideoPlayCompleteEvent(WebhookEventSource source, long timestamp, string mode, string replyToken, VideoPlayComplete videoPlayComplete) : base(WebhookEventType.VideoPlayComplete, source, timestamp, replyToken, mode) + public VideoViewingCompleteEvent(WebhookEventSource source, long timestamp, string mode, string replyToken, VideoPlayComplete videoPlayComplete) : base(WebhookEventType.VideoPlayComplete, source, timestamp, replyToken, mode) { VideoPlayComplete = videoPlayComplete; } diff --git a/src/line-bot-sdk-csharp/Webhooks/Event/WebhookEvent.cs b/src/line-bot-sdk-csharp/Webhooks/Event/WebhookEvent.cs index 18e52d5..68c62ab 100644 --- a/src/line-bot-sdk-csharp/Webhooks/Event/WebhookEvent.cs +++ b/src/line-bot-sdk-csharp/Webhooks/Event/WebhookEvent.cs @@ -77,7 +77,7 @@ internal static WebhookEvent CreateFrom(dynamic dynamicObject) return new PostbackEvent(eventSource, (long)dynamicObject.timestamp, (string)dynamicObject.replyToken, postback, (string)dynamicObject.mode); case WebhookEventType.VideoPlayComplete: var videoPlayComplete = new VideoPlayComplete((string)dynamicObject.videoPlayComplete?.trackingId); - return new VideoPlayCompleteEvent(eventSource, (long)dynamicObject.timestamp, (string)dynamicObject.mode, (string)dynamicObject.replyToken, videoPlayComplete); + return new VideoViewingCompleteEvent(eventSource, (long)dynamicObject.timestamp, (string)dynamicObject.mode, (string)dynamicObject.replyToken, videoPlayComplete); case WebhookEventType.Beacon: if (!Enum.TryParse((string)dynamicObject.beacon.type, true, out BeaconType beaconType)) { diff --git a/src/line-bot-sdk-csharp/Webhooks/WebhookApplication.cs b/src/line-bot-sdk-csharp/Webhooks/WebhookApplication.cs index f7054d2..2f7dc7d 100644 --- a/src/line-bot-sdk-csharp/Webhooks/WebhookApplication.cs +++ b/src/line-bot-sdk-csharp/Webhooks/WebhookApplication.cs @@ -35,7 +35,7 @@ public async Task RunAsync(IEnumerable events) case PostbackEvent postback: await OnPostbackAsync(postback).ConfigureAwait(false); break; - case VideoPlayCompleteEvent videoPlayCompleteEvent: + case VideoViewingCompleteEvent videoPlayCompleteEvent: await OnVideoPlayCompleteAsync(videoPlayCompleteEvent).ConfigureAwait(false); break; case BeaconEvent beacon: @@ -71,7 +71,7 @@ public async Task RunAsync(IEnumerable events) protected virtual Task OnUnfollowAsync(UnfollowEvent ev) => Task.CompletedTask; - protected virtual Task OnVideoPlayCompleteAsync(VideoPlayCompleteEvent ev) => Task.CompletedTask; + protected virtual Task OnVideoPlayCompleteAsync(VideoViewingCompleteEvent ev) => Task.CompletedTask; protected virtual Task OnBeaconAsync(BeaconEvent ev) => Task.CompletedTask;