Go to file
2023-08-29 10:50:30 +10:00
examples refactor: cli to be a binary with cli feature 2023-08-29 10:49:04 +10:00
src refactor: cli to be a binary with cli feature 2023-08-29 10:49:04 +10:00
.gitignore wip: Add cli example. Change api macros. 2022-07-21 17:08:49 +10:00
Cargo.toml chore: cargo update, description update 2023-08-29 10:50:30 +10:00
LICENSE-APACHE fix: Add licences 2022-07-21 13:55:45 +10:00
LICENSE-MIT fix: Add licences 2022-07-21 13:55:45 +10:00
README.md doc: Fix reference to API docs 2022-07-21 14:00:53 +10:00

Teslatte 🚗🔋

⚠️ Alpha Warning! ⚠️

This Rust crate is still in alpha stage. It is something I quickly put together if anyone needed it. I'm aiming to work on it as I need more features.

A Tesla API using the owner-api.teslamotors.com endpoint as well as "interactive" OAuth.

Currently, it only supports some the /api/1/vehicles endpoint, but it will be expanded in the future.

It is fairly trivial to add in new endpoints if you feel like creating a PR. Please let me know if your PR is a massive change before spending a lot of time on it.

Thanks to https://tesla-api.timdorr.com/ for their excellent reference.

Example

A basic example: examples/basic.rs

Endpoints

Here's a lazy dump of the endpoints I've implemented so far:

    get!(vehicles, Vec<Vehicle>, "");
    get_v!(vehicle_data, VehicleData, "/vehicle_data");
    get_v!(charge_state, ChargeState, "/data_request/charge_state");
    post_vd!(set_charge_limit, SetChargeLimit, "/command/set_charge_limit");
    post_vd!(set_charging_amps, SetChargingAmps, "/command/set_charging_amps");
    post_v!(charge_start, "/command/charge_start");
    post_v!(charge_stop, "/command/charge_stop");

License

Licensed under either of

at your option.

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.