UNPKG

@qualiture/tesla-api

Version:

An unofficial library that wraps the Tesla Owner's API

19 lines (18 loc) 816 B
import { AxiosRequestConfig } from "axios"; import { IVehicle, IVehicleData } from "./interfaces"; export default class Vehicle { /** * Returns an array of vehicles for the current owner. * The owner is determined by the bearer token provided inside the `config` object * @param config * @returns An array of vehicles for the current owner */ static getOwnerVehicles(config: AxiosRequestConfig): Promise<IVehicle[]>; /** * Returns all vehicle data and vehicle configuration * @param vehicleId `id` of the vehicle (NB: This is *not* `vehicle_id`) * @param config * @returns A rollup of all vehicle data plus configuration */ static getVehicleData(vehicleId: number, config: AxiosRequestConfig, includeLocationData?: boolean): Promise<IVehicleData>; }