Basic C# library for interacting with Tesla's Owner API, based on https://tesla-api.timdorr.com/
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
46 lines
1.3 KiB
46 lines
1.3 KiB
|
|
using System.Collections.Generic; |
|
// RootChargingSites myDeserializedClass = JsonConvert.DeserializeObject<RootChargingSites>(myJsonResponse); |
|
|
|
namespace Tesla |
|
{ |
|
public class Location |
|
{ |
|
public double lat { get; set; } |
|
public double @long { get; set; } |
|
} |
|
|
|
public class DestinationCharging |
|
{ |
|
public Location location { get; set; } |
|
public string name { get; set; } |
|
public string type { get; set; } |
|
public double distance_miles { get; set; } |
|
} |
|
|
|
public class Supercharger |
|
{ |
|
public Location location { get; set; } |
|
public string name { get; set; } |
|
public string type { get; set; } |
|
public double distance_miles { get; set; } |
|
public int available_stalls { get; set; } |
|
public int total_stalls { get; set; } |
|
public bool site_closed { get; set; } |
|
} |
|
|
|
public class ChargingSitesResponse |
|
{ |
|
public int congestion_sync_time_utc_secs { get; set; } |
|
public List<DestinationCharging> destination_charging { get; set; } |
|
public List<Supercharger> superchargers { get; set; } |
|
public long timestamp { get; set; } |
|
} |
|
|
|
public class RootChargingSites |
|
{ |
|
public ChargingSitesResponse response { get; set; } |
|
} |
|
|
|
|
|
} |