@shine-api/total-home-score-js

A plain javascript widget for Total Home Score

Usage no npm install needed!

<script type="module">
  import shineApiTotalHomeScoreJs from 'https://cdn.skypack.dev/@shine-api/total-home-score-js';
</script>

README

Total Home Score - Plain Javascript Component

A plain javascript component for rendering Total Home Score livability scores, powered by the Shine Api.

Usage

To leverage the plain javascript component, the following two script tags to your page, and a div container for the widget to get added to:

<div id="widget-container"></div>
<script lang="text/javascript">
  TotalHomeScore = {
    apiKey: 'API_KEY_FROM_SHINE_API',
    lat: 42,
    lon: -71,
    id: "widget-container"
  }
</script>
<script src="<path_to_js_file>"></script>

The script tags will import the javascript component and place dom elements inside of the given widget-container element.