diyapis

1.4.0 • Public • Published

diyapis

NPM CircleCI

Client helper library for diyapis.com - the Do-it-Yourself API creator.

Installation

npm install diyapis

Using in your client-side code:

import { createClient } from 'diyapis';

const client = createClient({appName: 'test'});

//call one of your API functions
client.apiFetch('/myTest')
  .then((result) => {
    console.log(result);
  });

// connect to the diyapis mqtt broker after authenticating to the API
client.connect();

// listen for mqtt object messages that encoded as json 
client.on('json', (topic, msg) => {
  console.log(msg);
});

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 1.4.0
    0
    • latest

Version History

Package Sidebar

Install

npm i diyapis

Weekly Downloads

8

Version

1.4.0

License

ISC

Unpacked Size

199 kB

Total Files

10

Last publish

Collaborators

  • monteslu