From 5210a53401574e33d5fe35ef02b1ea3d633c5824 Mon Sep 17 00:00:00 2001 From: Matthieu 'JP' DERASSE Date: Thu, 10 Aug 2023 15:45:33 +0000 Subject: [PATCH] fix(endpoint): Missing endpoint config --- client.go | 6 ++++++ constant.go | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/client.go b/client.go index 26ba87a..6b7955e 100644 --- a/client.go +++ b/client.go @@ -172,6 +172,12 @@ func dupeRequest(r *http.Request) (*http.Request, error) { return dreq, nil } +func (c *Client) Do(r *http.Request, authRequired bool) (*http.Response, error) { + c.prepareRequest(r, nil) + + return c.HTTPClient.Do(r) +} + func (c *Client) do(ctx context.Context, method, path string, body io.Reader, headers map[string]string) (*http.Response, error) { var dreq *http.Request var resp *http.Response diff --git a/constant.go b/constant.go index bfd006a..086edbb 100644 --- a/constant.go +++ b/constant.go @@ -3,7 +3,7 @@ package teslastocksdk const ( // Version is the current version of the sdk. Version = "1.0.0" - stockApiEndpoint = "" + stockApiEndpoint = "https://www.tesla.com/" defaultUserAgent = "TeslaApp/" + Version )