New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

teslastreaming

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

teslastreaming

A module for using the tesla streamin API

  • 0.0.2
  • latest
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

TeslaStreaming

Build Status

This module is used to connect to and listen on the Tesla streaming API, exposed via WebSocket. The API is a convenience method in extension of the regular REST API (https://teslapi.io), which needs to be polled.

This module is UNOFFICIAL.

prerequisites

In order to use the streaming API, you need to obtain an access_token via the auth REST API.

Installation

Add this module to your project using

$ npm i teslastreaming

Usage

The following example stores a log of messages into an array, a very basic logger if you will:

import { teslaAPI } from "./index";

const vehicleId = '<yourVehicleId>';
const token = '<yourAccessToken>';

const messages = [];

teslaAPI(vehicleId, token).subscribe((event)=> {
  messages.push(event);
  console.log(`messages received: ${messages.length}`);
  console.log(`Tesla says: ${JSON.stringify(event, null, 2)}`)
});

Keywords

FAQs

Package last updated on 28 Oct 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc