Add image generation

This commit is contained in:
2025-07-15 02:42:16 +02:00
parent 9cfbdc21d0
commit 480a38baac
17 changed files with 635 additions and 12 deletions

View File

@@ -5,6 +5,7 @@ public class ApiConfiguration
public Keys Keys { get; set; } = new();
public BaseUrls BaseUrls { get; set; } = new();
public string DefaultCity { get; set; } = "Vega stockholms lan";
public string DefaultStation { get; set; } = "Vega station";
}
public class BaseUrls
@@ -12,6 +13,7 @@ public class BaseUrls
public string Weather { get; set; } = string.Empty;
public string Nominatim { get; set; } = string.Empty;
public string Aurora { get; set; } = string.Empty;
public string ResRobot { get; set; } = string.Empty;
}
public class Keys
@@ -19,4 +21,5 @@ public class Keys
public string Weather { get; set; } = string.Empty;
public string Nominatim { get; set; } = string.Empty;
public string Aurora { get; set; } = string.Empty;
public string ResRobot { get; set; } = string.Empty;
}

View File

@@ -0,0 +1,7 @@
namespace HomeApi.Models;
public class Image
{
public WeatherInformation Weather { get; set; }
public List<TimeTable> TimeTable { get; set; }
}

View File

@@ -0,0 +1,88 @@
using System.Text.Json.Serialization;
public class LocationNameResponse
{
[JsonPropertyName("stopLocationOrCoordLocation")]
public List<StopLocationOrCoordLocation> StopLocationOrCoordLocation { get; set; }
[JsonPropertyName("TechnicalMessages")]
public TechnicalMessages TechnicalMessages { get; set; }
[JsonPropertyName("serverVersion")]
public string ServerVersion { get; set; }
[JsonPropertyName("dialectVersion")]
public string DialectVersion { get; set; }
[JsonPropertyName("requestId")]
public string RequestId { get; set; }
}
public class StopLocationOrCoordLocation
{
[JsonPropertyName("StopLocation")]
public StopLocation StopLocation { get; set; }
}
public class StopLocation
{
[JsonPropertyName("productAtStop")]
public List<ProductAtStop> ProductAtStop { get; set; }
[JsonPropertyName("timezoneOffset")]
public int TimezoneOffset { get; set; }
[JsonPropertyName("id")]
public string Id { get; set; }
[JsonPropertyName("extId")]
public string ExtId { get; set; }
[JsonPropertyName("name")]
public string Name { get; set; }
[JsonPropertyName("lon")]
public double Lon { get; set; }
[JsonPropertyName("lat")]
public double Lat { get; set; }
[JsonPropertyName("weight")]
public int Weight { get; set; }
[JsonPropertyName("products")]
public int Products { get; set; }
[JsonPropertyName("minimumChangeDuration")]
public string MinimumChangeDuration { get; set; }
}
public class ProductAtStop
{
[JsonPropertyName("icon")]
public Icon Icon { get; set; }
[JsonPropertyName("cls")]
public string Cls { get; set; }
}
public class Icon
{
[JsonPropertyName("res")]
public string Res { get; set; }
}
public class TechnicalMessages
{
[JsonPropertyName("TechnicalMessage")]
public List<TechnicalMessage> TechnicalMessage { get; set; }
}
public class TechnicalMessage
{
[JsonPropertyName("value")]
public string Value { get; set; }
[JsonPropertyName("key")]
public string Key { get; set; }
}

View File

@@ -0,0 +1,84 @@
namespace HomeApi.Models.Response;
public class TrafikLabsApiResponse
{
public List<Departure> Departure { get; set; }
}
public class Departure
{
public JourneyDetailRef JourneyDetailRef { get; set; }
public string JourneyStatus { get; set; }
public ProductDetail ProductAtStop { get; set; }
public List<ProductDetail> Product { get; set; }
public Notes Notes { get; set; }
public string Name { get; set; }
public string Type { get; set; }
public string Stop { get; set; }
public string Stopid { get; set; }
public string StopExtId { get; set; }
public double Lon { get; set; }
public double Lat { get; set; }
public string Time { get; set; }
public string Date { get; set; }
public bool Reachable { get; set; }
public string Direction { get; set; }
public string DirectionFlag { get; set; }
}
public class JourneyDetailRef
{
public string Ref { get; set; }
}
public class ProductDetail
{
public Icon Icon { get; set; }
public OperatorInfo OperatorInfo { get; set; }
public string Name { get; set; }
public string InternalName { get; set; }
public string DisplayNumber { get; set; }
public string Num { get; set; }
public string Line { get; set; }
public string LineId { get; set; }
public string CatOut { get; set; }
public string CatIn { get; set; }
public string CatCode { get; set; }
public string Cls { get; set; }
public string CatOutS { get; set; }
public string CatOutL { get; set; }
public string OperatorCode { get; set; }
public string Operator { get; set; }
public string Admin { get; set; }
public string MatchId { get; set; }
public int? RouteIdxFrom { get; set; }
public int? RouteIdxTo { get; set; }
}
public class Icon
{
public string Res { get; set; }
}
public class OperatorInfo
{
public string Name { get; set; }
public string NameS { get; set; }
public string NameN { get; set; }
public string NameL { get; set; }
public string Id { get; set; }
}
public class Notes
{
public List<Note> Note { get; set; }
}
public class Note
{
public string Value { get; set; }
public string Key { get; set; }
public string Type { get; set; }
public int RouteIdxFrom { get; set; }
public int RouteIdxTo { get; set; }
public string TxtN { get; set; }
}

View File

@@ -0,0 +1,14 @@
namespace HomeApi.Models;
public class TimeTable
{
public string LineNumber { get; set; } // e.g. "43", "832"
public string LineName { get; set; } // e.g. "Länstrafik - Tåg 43"
public string TransportType { get; set; } // e.g. "Tåg", "Buss"
public string Operator { get; set; } // e.g. "SL"
public string StopName { get; set; } // e.g. "Vega station (Haninge kn)"
public string DepartureTime { get; set; } // e.g. 2025-07-15 01:03
public string Direction { get; set; } // e.g. "Farsta Strand station"
public string JourneyDetailRef { get; set; } // e.g. "1|39437|0|1|15072025"
public List<string> Notes { get; set; } // e.g. "Pendeltåg", "Endast 2 klass"
}