bogosj / tesla

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

Construct URLs with functions #35

Closed bogosj closed 3 years ago

bogosj commented 3 years ago

i.e. path.Join(u.Path, "vehicles", strconv.FormatUint(id, 10), "vehicle_data")

michaelharo commented 3 years ago

I think most of that can be handled in the Vehicle struct using a function that calculates most of it so that the call becomes something like v.path("vehicle_data") and it returns the full path.

bogosj commented 3 years ago

Yep, that was the approach I was going to take. Low priority so waiting for the other PRs to land and maybe even v1.0 tag before doing this since it's internal cleanup.