From 9ce570e011f55dc584aad2ee066c4b4da7999174 Mon Sep 17 00:00:00 2001 From: Dylan Moreland Date: Wed, 29 May 2024 14:13:03 -0400 Subject: [PATCH] Some notes about region and version --- sdtask/sdtask.go | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/sdtask/sdtask.go b/sdtask/sdtask.go index e3128eb..06b8d34 100644 --- a/sdtask/sdtask.go +++ b/sdtask/sdtask.go @@ -7,13 +7,17 @@ import ( ) type CredentialData struct { - TaskID string `json:"taskId"` - UserDeviceID string `json:"userDeviceId"` - IntegrationID string `json:"integrationId"` - AccessToken string `json:"accessToken"` - Expiry time.Time `json:"expiry"` - RefreshToken string `json:"refreshToken"` - Version int `json:"version,omitempty"` + TaskID string `json:"taskId"` + UserDeviceID string `json:"userDeviceId"` + IntegrationID string `json:"integrationId"` + AccessToken string `json:"accessToken"` + Expiry time.Time `json:"expiry"` + RefreshToken string `json:"refreshToken"` + // Version is an API version. Currently only used for Tesla: 1 is the old + // "Owner api" and 2 is the new "Fleet API". + Version int `json:"version,omitempty"` + // Region is the two-letter code for the region. Currently only used for + // Tesla, and can only be "na" or "eu". Region string `json:"region,omitempty"` SyntheticDevice *SyntheticDevice `json:"syntheticDevice,omitempty"` }