Skip to content

Commit

Permalink
Expose node name in events API for IFTTT (#193)
Browse files Browse the repository at this point in the history
* Expose node name in events API for IFTTT

Signed-off-by: Dave Thaler <[email protected]>

---------

Signed-off-by: Dave Thaler <[email protected]>
  • Loading branch information
dthaler authored Nov 20, 2024
1 parent 378412a commit 2015130
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions OrcanodeMonitor/Models/OrcanodeEvent.cs
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ public class OrcanodeIftttEventDTO
{
public OrcanodeIftttEventDTO(string id, string nodeName, string slug, string type, string value, DateTime timestamp, int severity)
{
NodeName = nodeName;
Slug = slug;
Type = type;
Value = value;
Expand All @@ -37,6 +38,13 @@ public OrcanodeIftttEventDTO(string id, string nodeName, string slug, string typ
}
[JsonPropertyName("slug")]
public string Slug { get; private set; }

/// <summary>
/// The node name used in IFTTT event identification.
/// </summary>
[JsonPropertyName("node_name")]
public string NodeName { get; private set; }

[JsonPropertyName("type")]
public string Type { get; private set; }
[JsonPropertyName("value")]
Expand Down

0 comments on commit 2015130

Please sign in to comment.