-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Enhance Vimeo OTT project with new features and attributes
Updated project file to include new ASP.NET Core package references for improved web utilities, authorization, and OpenAPI support. Added multiple properties to the `OttCustomer` class for better customer data handling. Introduced `MapVimeoOttWebhook` method in `ExtensionMethods.cs` for enhanced routing of webhook events. Created `VimeoOttWebhookAttribute` to mark methods handling OTT webhooks, facilitating structured event management. Added `OttWebhook` class to represent webhook events from Vimeo, including properties for embedded data and event details.
- Loading branch information
Showing
5 changed files
with
170 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
namespace AITSYS.Vimeo.Ott.Attributes; | ||
|
||
/// <summary> | ||
/// Marks a method to handle a topic for incoming ott webhooks. | ||
/// </summary> | ||
[AttributeUsage(AttributeTargets.Method)] | ||
public sealed class VimeoOttWebhookAttribute : Attribute | ||
{ | ||
/// <summary> | ||
/// Marks a method to handle a topic for incoming ott webhooks. | ||
/// </summary> | ||
/// <param name="topic">The topic to handle.</param> | ||
public VimeoOttWebhookAttribute(string topic) | ||
{ | ||
this.Topic = topic; | ||
} | ||
|
||
/// <summary> | ||
/// Gets the webhooks topic. | ||
/// </summary> | ||
public string Topic { get; } | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
using AITSYS.Vimeo.Ott.Entities.EmbeddedData; | ||
|
||
using Newtonsoft.Json; | ||
|
||
namespace AITSYS.Vimeo.Ott.Entities; | ||
|
||
/// <summary> | ||
/// Represents a webhook event from Vimeo OTT. | ||
/// </summary> | ||
public sealed class OttWebhook | ||
{ | ||
/// <summary> | ||
/// Gets the embedded data related to the webhook event. | ||
/// </summary> | ||
[JsonProperty("_embedded", NullValueHandling = NullValueHandling.Ignore)] | ||
public OttCustomerProductEmbeddedData Embedded { get; set; } | ||
|
||
/// <summary> | ||
/// Gets the topic of the webhook event. | ||
/// </summary> | ||
[JsonProperty("topic", NullValueHandling = NullValueHandling.Ignore)] | ||
public string Topic { get; set; } | ||
|
||
/// <summary> | ||
/// Gets the date and time when the webhook event was created. | ||
/// </summary> | ||
[JsonProperty("created_at", NullValueHandling = NullValueHandling.Ignore)] | ||
public DateTime? CreatedAt { get; set; } | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters