tesla-fleet-api
Version:
A library for the [Tesla Fleet API](https://developer.tesla.com/docs/fleet-api), and the third parties services [Teslemetry](https://teslemetry.com/docs/getting-started/api) and [Tessie](https://developer.tessie.com/docs/tesla-api-comparison), which provi
28 lines • 1.02 kB
JavaScript
import TeslaFleetApi from "./teslafleetapi.js";
export default class Telemetry extends TeslaFleetApi {
constructor(accessToken) {
super({ accessToken, server: `https://api.tessie.com`, partnerScope: false, userScope: false });
}
/**
* Get your approved Tesla scopes
*/
async tesla_scopes() {
return this._request("GET", "auth/tesla_scopes").then(({ scopes }) => scopes);
}
async metadata() {
return this._request("GET", "auth/tesla_scopes");
}
async status(vin) {
return this._request("GET", `${vin}/status`).then(({ status }) => status);
}
async state(vin, use_cache = true) {
return this._request("GET", `${vin}/state`, { use_cache });
}
async vehicles(only_active = false) {
return this._request("GET", "vehicles", { only_active }).then(({ results }) => results);
}
async wake(vin) {
return this._request("POST", `${vin}/wake`).then(({ result }) => result);
}
}
//# sourceMappingURL=tessie.js.map