fix(endpoint): Missing endpoint config

This commit is contained in:
Matthieu 'JP' DERASSE 2023-08-10 15:45:33 +00:00
parent 11b4cd84c9
commit 5210a53401
Signed by: mderasse
GPG Key ID: 55141C777B16A705
2 changed files with 7 additions and 1 deletions

View File

@ -172,6 +172,12 @@ func dupeRequest(r *http.Request) (*http.Request, error) {
return dreq, nil 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) { 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 dreq *http.Request
var resp *http.Response var resp *http.Response

View File

@ -3,7 +3,7 @@ package teslastocksdk
const ( const (
// Version is the current version of the sdk. // Version is the current version of the sdk.
Version = "1.0.0" Version = "1.0.0"
stockApiEndpoint = "" stockApiEndpoint = "https://www.tesla.com/"
defaultUserAgent = "TeslaApp/" + Version defaultUserAgent = "TeslaApp/" + Version
) )