Skip to content

Commit

Permalink
VideoPlayCompleteEvent -> VideoViewingCompleteEvent
Browse files Browse the repository at this point in the history
  • Loading branch information
rikupin1105 committed Sep 20, 2021
1 parent a460694 commit 41468d5
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
@@ -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;
}
Expand Down
2 changes: 1 addition & 1 deletion src/line-bot-sdk-csharp/Webhooks/Event/WebhookEvent.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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))
{
Expand Down
4 changes: 2 additions & 2 deletions src/line-bot-sdk-csharp/Webhooks/WebhookApplication.cs
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ public async Task RunAsync(IEnumerable<WebhookEvent> 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:
Expand Down Expand Up @@ -71,7 +71,7 @@ public async Task RunAsync(IEnumerable<WebhookEvent> 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;

Expand Down

0 comments on commit 41468d5

Please sign in to comment.