aboutsummaryrefslogtreecommitdiff
path: root/src/Enmarcha.Sources.Tussa/Response.cs
blob: df941b96bb936646307b161db84d2955aee2d88a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
using System.Text.Json.Serialization;

namespace Enmarcha.Sources.Tussa;

public class MaisbusResponse
{
    [JsonPropertyName("id")] public string Id { get; set; }
    [JsonPropertyName("codigo")] public string Code { get; set; }
    [JsonPropertyName("nombre")] public string Name { get; set; }
    [JsonPropertyName("coordenadas")] public Coordinates Coordinates { get; set; }
    [JsonPropertyName("lineas")] public Route[] Routes { get; set; }
}

public class Coordinates
{
    [JsonPropertyName("latitud")]
    public double Latitude { get; set; }
    [JsonPropertyName("longitud")]
    public double Longitude { get; set; }
}

public class Route
{
    [JsonPropertyName("id")] public string Id { get; set; }
    [JsonPropertyName("sinoptico")] public string Sinoptico { get; set; }
    [JsonPropertyName("nombre")] public string Name { get; set; }
    [JsonPropertyName("estilo")] public string Colour { get; set; }
    /// <example>
    ///   2025-12-28 23:57
    /// </example>
    [JsonPropertyName("proximoPaso")] public string NextArrival { get; set; }
    [JsonPropertyName("minutosProximoPaso")] public int MinutesToArrive { get; set; }
}