Closed andig closed 3 years ago
Entirely possible, I've never used the streaming API. If this is in fact broken we should fix it before #16
It looks as if the current streaming implementation is entirely broken. It apparently needs to use web sockets: https://github.com/timdorr/tesla-api/commits/d6bb6ff7fe46d62aa6b982bb5e9adb09861bc705/lib/tesla_api/stream.rb. This change happened in 2019.
For 1.0 we should remove the public API, but leave the stream files in for fixing later?
I support un-exporting those symbols and leave it to someone who has an interest in the streaming API to drive by and fix it :)
I propose we just remove all references to the streaming API and leave a note behind in the README.md that it was removed in the squash/merge commit I create from the PR above.
The streaming API seems to require basic auth rather than bearer token:
https://github.com/bogosj/tesla/blob/main/stream.go#L38
Original code:
https://github.com/jsgoecke/tesla/blob/e02ebd220e5a4158d790d7ed857f937f7f53439e/stream.go#L38
Currently, the basic auth is overridden by the oauth transport. Is that what we need here?
UDPATE seems we need to store the non-oauth client somewhere and use that here, reverting to the original code above. I'll try to prepare something.