Route request being made (Needs polling)

This commit is contained in:
luke-else
2021-11-22 13:07:56 +00:00
parent 16543d9c64
commit 0f96994773
7 changed files with 112 additions and 12 deletions

View File

@ -0,0 +1,18 @@
using Newtonsoft.Json;
namespace EFB.Models.JSON
{
public class RouteRequest
{
[JsonProperty]
public string departure { get; set; }
[JsonProperty]
public string destination { get; set; }
[JsonProperty]
public uint preferredminlevel { get; set; }
[JsonProperty]
public uint preferredmaxlevel { get; set; }
[JsonProperty]
public string optimise { get; } = "preferred";
}
}

View File

@ -13,7 +13,9 @@ namespace EFB.Models
Route only becomes populated after route is recieved from autorouter API
*/
public WaypointModel Departure { get; init; } = null;
public string RouteID { get; init; }
public WaypointModel Departure { get; set; } = null;
public WaypointModel Arrival { get; set; } = null;
public IWaypoint Current { get; set; } = null;
public uint Cruise { get; set; } = 0;

View File

@ -10,7 +10,7 @@ namespace EFB.Models
/*
Auto Router API Token Model
*/
public string Token { get; init; }
public string TokenValue { get; init; }
public DateTime Expiration { get; init; }
public bool IsExpired(){