bogosj / tesla

Provides a wrapper around the API to easily query and command a Telsa car.
Other
23 stars 18 forks source link

Add missing headers and user-name header rotation #43

Closed andig closed 3 years ago

andig commented 3 years ago

This does not solve the current login issues but exposes the login request flow using a logging http client.

Note: might also make sense to only update the transport: https://github.com/uhthomas/tesla/compare/f00d0e07a2b61907751647920f5b7c1f8197c07a..1caf33b692d9258ef27505b335ee3aa8869c1e8d#diff-c52daedaeda258db15ec11d57bbf299412a20328f6cd026980ef07f01960dd3aR25

andig commented 3 years ago

Added all changes from @uhthomas. Can get the login and api call. My only test car right now replies with 408 to the actual api call, but that might be ok? Also noted, that the new transport MUST NOT be used for the login itself.

ping @uhthomas

andig commented 3 years ago

Fix #42

uhthomas commented 3 years ago

Sorry for being so inactive the past couple weeks - lots going on!

The changes LGTM, thanks. I made a couple more upstream; like using base32 and ensuring the clients / contexts are passed around correctly. Should we merge them here?

I can confirm that the client works, albeit with major rate limiting applied.

andig commented 3 years ago

The changes LGTM, thanks. I made a couple more upstream; like using base32 and ensuring the clients / contexts are passed around correctly. Should we merge them here?

Yes please! It's your PR anyway- please feel free to amend or open new one.

Btw., do you intend to keep maintaining your repo or wouldn't it be easier to do all evolution here?

andig commented 3 years ago

ping @uhthomas seem we should get this closed before 1.0?

andig commented 3 years ago

@uhthomas I've merged your base32 changes but didn't take over returning the context as I didn't understand why that's needed.

andig commented 3 years ago

@bogosj Rebased. Shall we get this in?