The Logo for Hingmy, the database of things

Hingmy API

Dependencies

The host page must load a number of dependencies for the graph to load and display properly. Add these lines once near the top of the body tag. The script will function with jquery 1.8.3 or higher. If jquery is not loaded on the page, the script will load it automatically.

<link rel="stylesheet" type="text/css" href="/site/css/hingmy.css"/>
<script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/jquery/1.12.3/jquery.min.js"></script>
<script type="text/javascript" src="//www.hingmy.com/site/script/hingmy.min.js"></script>
<script type="text/javascript" src="//www.hingmy.com/site/script/hingmy.dev.min.js"></script>

Graphs

The Hingmy graph API can be used to include graphs in host pages. Place the following javascript on your page. The script will replace the <div> on the first line with the matching ID with the graph downloaded from Hingmy.

<div id="id"></div>
<script type="text/javascript">
        HDUtil.loadGraph('pr=460','id');
</script>
HDUtil.loadGraph(parameters, id)
This function inserts an graph in the specified target element. The graph is a valid HTML fragment. The function returns error messages.
parameters
The parameters that define what graph to draw. The controls match the URL parameters used by the graph builder excluding the "?". Copy the URL parameters from that page.
id
The ID of the a <div> that receives the graph. The entire offer bar will be contained in the div.

Products

The product API returns information about a prodcut in the Hingmy DB.

<div id="id"></div>
<script type="text/javascript">
        HDUtil.loadOfferBar('3903','id');
</script>
HDUtil.loadOfferBar(pid, id)
This function returns a table containing all offers for a particular product. The content is a valid HTML fragment. If the product does not exists, or there are no offers for the product, the function returns an empty string.
pid
The product ID of the product.
id
The ID of the a <div> that receives the offerbar. The entire graph code will be contained in the div.