juniper-labs-io

0.0.9 • Public • Published

Juniper Labs

Wrapper to access juniper labs api features

API documentation:

https://docs.juniperlabs.io/

Installing

Using npm: Not supported yet.

Using cdn:

<script src="https://unpkg.com/juniper-labs-io/dist/index.var.js"></script>

Adding css for styling the auto complete component:

<link rel="stylesheet" type="text/css" href="https://unpkg.com/juniper-labs-io/dist/index.css" />

Usage

Business Prefill

Business Prefill Autocomplete component

// Create new client
new JuniperLabs.BusinessPrefill.AutoCompleteComponent(
    YOUR_API_KEY,
    BASE_API_URL, // Optional: defaults to https://prefill.juniperlabs-services.com/v0.1 
).initializeComponent(
    document.getElementById("business_name"), // required: input element to be connected with autocomplete
    {
      onSelect: (details) => { console.log(details) }, // optional: callback, invoked with business details when a user select a item from the autocomplete dropdown   
      registry_state: "CO" // optional  
    }
  )
Example

You can find a working example code as gist here replace YOUR_API_KEY with your actual api key and then open the html file in your browser

codepen

https://codepen.io/puneet-sutar/pen/abNNVeY?editors=1111

Business Prefill Api Client

Typeahead API.
// Create new client
new JuniperLabs.BusinessPrefill.ApiClient(
    YOUR_API_KEY,
    BASE_API_URL, // Optional: defaults to https://prefill.juniperlabs-services.com/v0.1 
).typeahead(
    search_string, // required
    registry_state, // optional 
  )
Typeahead API.
// Create new client
new JuniperLabs.BusinessPrefill.ApiClient(
    YOUR_API_KEY,
    BASE_API_URL, // Optional: defaults to https://prefill.juniperlabs-services.com/v0.1 
).id(
    id, // required: string 
  )

Package Sidebar

Install

npm i juniper-labs-io

Weekly Downloads

0

Version

0.0.9

License

ISC

Unpacked Size

34.7 kB

Total Files

10

Last publish

Collaborators

  • eatpraypuneet