mirror of
https://github.com/ckaczor/HomeMonitor.git
synced 2026-01-14 01:25:38 -05:00
Add national days API to calendar
This commit is contained in:
12
Calendar/Service/Models/NationalDays/Entry.cs
Normal file
12
Calendar/Service/Models/NationalDays/Entry.cs
Normal file
@@ -0,0 +1,12 @@
|
||||
using JetBrains.Annotations;
|
||||
|
||||
namespace ChrisKaczor.HomeMonitor.Calendar.Service.Models.NationalDays;
|
||||
|
||||
[PublicAPI]
|
||||
public class Entry
|
||||
{
|
||||
public string Name { get; set; } = string.Empty;
|
||||
public string Url { get; set; } = string.Empty;
|
||||
public string Excerpt { get; set; } = string.Empty;
|
||||
public string Type { get; set; } = string.Empty;
|
||||
}
|
||||
17
Calendar/Service/Models/NationalDays/Meta.cs
Normal file
17
Calendar/Service/Models/NationalDays/Meta.cs
Normal file
@@ -0,0 +1,17 @@
|
||||
using JetBrains.Annotations;
|
||||
using System.Text.Json.Serialization;
|
||||
|
||||
namespace ChrisKaczor.HomeMonitor.Calendar.Service.Models.NationalDays;
|
||||
|
||||
[PublicAPI]
|
||||
public class Meta
|
||||
{
|
||||
[JsonPropertyName("cache_status")]
|
||||
public string CacheStatus { get; set; } = string.Empty;
|
||||
|
||||
[JsonPropertyName("response_count")]
|
||||
public int ResponseCount { get; set; }
|
||||
|
||||
[JsonPropertyName("request_type")]
|
||||
public string RequestType { get; set; } = string.Empty;
|
||||
}
|
||||
11
Calendar/Service/Models/NationalDays/Response.cs
Normal file
11
Calendar/Service/Models/NationalDays/Response.cs
Normal file
@@ -0,0 +1,11 @@
|
||||
using JetBrains.Annotations;
|
||||
|
||||
namespace ChrisKaczor.HomeMonitor.Calendar.Service.Models.NationalDays;
|
||||
|
||||
[PublicAPI]
|
||||
public class Response
|
||||
{
|
||||
public int Code { get; set; }
|
||||
public Meta Meta { get; set; } = new();
|
||||
public IEnumerable<Entry> Data { get; set; } = Array.Empty<Entry>();
|
||||
}
|
||||
Reference in New Issue
Block a user