tesla-vehicles-api
TypeScript icon, indicating that this package has built-in type declarations

0.3.0 • Public • Published

Tesla-Vehicles-Api

A Node module for the Tesla Vehicle Owners API in Typescript.

npm version Build Status

Documentation


Prerequisites

  • Node 10+

Installation

Install the dependencies and devDependencies and start the server.

$ npm install --save tesla-vehicles-api

Usage

  import {client} from 'tesla-vehicles-api'; or  const CLIENT = require('tesla-vehicles-api').client;
 
  let _client = new CLIENT||client({
    username: 'jonsnow@kingofthenorth.got',
    password: 'I<3Ghost'
  });
 
  // let _client = new CLIENT||client({
  //   access_token: '123456789123456789',
  //   refresh_token: 'asdasdasdasdasdasd'
  // });
 
  _client.getToken().then(result => console.log(result)).catch(err => console.error(err));
  
  // Skip this if you already have the token

Enums Usage

  import * as TeslaEnum from 'tesla-vehicles-api/dist/types' or   const TESLA_ENUM = require('tesla-vehicles-api/dist/types');

Development

Want to contribute? Great! Make a Pr! Open your favorite Terminal and run these commands.

Building for source

To release in javascript. The output is dumped in the dist folder:

$ npm run build

Testing

  • Uses Jest, Supertest, Chai - Integration Tests needed

    npm test

Changelog

Link

License

Apache-2.0

Author

Peter A. Tariche

Package Sidebar

Install

npm i tesla-vehicles-api

Weekly Downloads

5

Version

0.3.0

License

Apache-2.0

Unpacked Size

56.7 kB

Total Files

15

Last publish

Collaborators

  • ptariche