1.1.4 • Published 4 years ago
teslac v1.1.4
teslac
read your tesla
Install
npm install teslac
Uage
// get your tokens from mobile app "Auth for Tesla"(ios) or "Tesla Tokens"(android)
teslac(access_token, refresh_token)
  .then((tc) =>
    tc
      .control(
        tc.vehicles[0].id,
        tc.ownerApi(`/vehicles/${tc.vehicles[0].id}/data_request/charge_state`)
      )
      .then(console.log)
  )
  .catch((err) => {
    console.log(err)
  })