https://epilog.heapcraft.net/api/get.php?key=<key>
Returns an image (usually PNG) of a visualization. The <key>
can be found in the Dashboard when opening an item. The images can only be accessed if the user is logged in, unless public access for that item is enabled in the Dashboard. You can the keys 3156bb2978ba4808
and 971d72ee6e088751
for testing. To include the graphic on your website, use this code:
<img src="https://epilog.heapcraft.net/api/get.php?key=<key>
">
The image might take some time to load. A cached version can be accessed instantly by adding &cached
to the request. Adding &info
will return a JSON object containing information about the cached version:
{"expiresIn":5,"didUpdate":false,"cacheTime":1427037482}
An image which loads right away and updates automatically can be included by using this code:
<img onload="hcAutoRefresh(this)" src="https://epilog.heapcraft.net/api/get.php?key=<key>
&cached">
When using the automatically updating version, the following code has to be included in the HTML header:
<script type="text/javascript" charset="utf-8"> function hcAutoRefresh(img) { img.onload = null; var src = img.src.split('?'); var queries = src[1].split('&').filter(function(query) {return !query.match(/^cached(=.*)?$/);}); queries.push('info'); var url = src[0] + "?" + queries.join('&'); var req = new XMLHttpRequest(); req.open('GET', url, true); req.onload = function() { if (this.status != 200) return; var info = JSON.parse(this.response); var cacheTime = img.hasOwnProperty('cacheTime') ? img.cacheTime : info.cacheTime+1; if (info.didUpdate || cacheTime<info.cacheTime) { img.src = img.src; } img.cacheTime = info.cacheTime; setTimeout(function() {hcAutoRefresh(img);}, info.expiresIn*1000); }; req.send(); } </script>
https://epilog.heapcraft.net/api/get.php?plugins
This request returns a list of all available Bukkit plugins in JSON, including the current version, the download URL and a md5 checksum. The same information is used by Epilog to perform updates.
{ "Classify": { "version": "0.0.2", "url": "https://epilog.heapcraft.net/plugins/Classify.jar", "md5": "12d6b4dad06e77a9fa5a64deea644ec6" }, "DiviningRod": { "version": "0.0.4", "url": "https://epilog.heapcraft.net/plugins/DiviningRod.jar", "md5": "0f3f2b53fb0c5cdc7af64fa553ee46b4" }, "Epilog": { "version": "0.1.2", "url": "https://epilog.heapcraft.net/plugins/Epilog.jar", "md5": "445568de28a24d54a46bc074138f78e0" } }
We are planning to releasing the scripts used to create the visualizations. If you have feedback or feature requests, tweet us @HeapCraft or by mail.