Adds Tesla API integration
All checks were successful
Build, Push and Run Container / build (push) Successful in 25s
All checks were successful
Build, Push and Run Container / build (push) Successful in 25s
Adds an endpoint to interact with the Tesla API via a command proxy. This includes fetching vehicle information and configuring telemetry settings. It introduces new models to represent the Tesla API responses and request structures.
This commit is contained in:
33
Source/ProofOfConcept/Models/TelemetryConfigRequest.cs
Normal file
33
Source/ProofOfConcept/Models/TelemetryConfigRequest.cs
Normal file
@@ -0,0 +1,33 @@
|
||||
using System.Text.Json.Serialization;
|
||||
|
||||
namespace ProofOfConcept.Models;
|
||||
|
||||
public sealed class TelemetryConfigRequest
|
||||
{
|
||||
[JsonPropertyName("vins")]
|
||||
public List<string> Vins { get; set; } = new();
|
||||
|
||||
[JsonPropertyName("config")]
|
||||
public TelemetryConfig Config { get; set; } = new();
|
||||
}
|
||||
|
||||
public sealed class TelemetryConfig
|
||||
{
|
||||
[JsonPropertyName("hostname")]
|
||||
public string Hostname { get; set; } = string.Empty;
|
||||
|
||||
[JsonPropertyName("port")]
|
||||
public int Port { get; set; }
|
||||
|
||||
[JsonPropertyName("ca")]
|
||||
public string CertificateAuthority { get; set; } = string.Empty;
|
||||
|
||||
[JsonPropertyName("fields")]
|
||||
public Dictionary<string, TelemetryFieldConfig> Fields { get; set; } = new();
|
||||
}
|
||||
|
||||
public sealed class TelemetryFieldConfig
|
||||
{
|
||||
[JsonPropertyName("interval_seconds")]
|
||||
public int IntervalSeconds { get; set; }
|
||||
}
|
||||
Reference in New Issue
Block a user