Exosite Proxy API wrapper

Usage no npm install needed!

<script type="module">
  import exositeProxy from 'https://cdn.skypack.dev/exosite-proxy';


Exosite Proxy API

Javascript library for Exosite's proxy API, currently in beta.


Add library and dependencies to your HTML. The library is dependent on Auth0 (for tokens).

    <script src="//code.jquery.com/jquery-1.11.3.min.js"></script>
    <script src="http://cdn.auth0.com/w2/auth0-4.js"></script>
        domain: 'exositeapp.auth0.com',
        clientID: 'dcnod3KP9Hn40y0VWbmKLVRODQ9I12xv'
    <script src="https://rawgit.com/dweaver/exosite-proxy/master/exosite-proxy.js"></script>

Use the library by requiring it:

var proxy = require('exosite-proxy');
var exo = new proxy('API TOKEN');
exo.queryDevices({domain: "cloudy.exosite.com"}, ["model","name","sn"]).then(function(devices) {

For a working example, look here: https://github.com/dweaver/exosite-proxy-example

Build for distribution

To build, do this:

$ make build

For debugging, you may want to copy it into a different project:

$ make build
$ cp _build/exosite-proxy.js ../proxy/scripts/exosite-proxy.js

To distribute, update version number in package.json and bower.json. Then do this:

$ make publish

This will automatically tag the release, push to master, and call npm publish