71 lines
2.3 KiB
HTML
71 lines
2.3 KiB
HTML
<!DOCTYPE html>
|
|
<html>
|
|
<head>
|
|
<title>ProFee WAAS API</title>
|
|
<!-- needed for adaptive design -->
|
|
<meta charset="utf-8"/>
|
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
<link href="https://fonts.googleapis.com/css?family=Montserrat:300,400,700|Roboto:300,400,700" rel="stylesheet">
|
|
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bulma@0.9.3/css/bulma.min.css">
|
|
|
|
<!--
|
|
ReDoc doesn't change outer page styles
|
|
-->
|
|
<style>
|
|
body {
|
|
margin: 0;
|
|
padding: 0;
|
|
}
|
|
</style>
|
|
</head>
|
|
<body>
|
|
|
|
<div class="tabs is-large">
|
|
<ul>
|
|
<li id="page-api" class="is-active" onclick="showApi();"><a>API</a></li>
|
|
<li id="page-async-api" onclick="showAsyncApi();"><a>Async API</a></li>
|
|
</ul>
|
|
</div>
|
|
|
|
<div id="api">
|
|
<redoc spec-url=''></redoc>
|
|
</div>
|
|
|
|
<div id="async-api">
|
|
<iframe src="async-api/site/index.html" width="100%" height="1000" seamless="yes"></iframe>
|
|
</div>
|
|
|
|
|
|
<script src="https://cdn.jsdelivr.net/npm/redoc@next/bundles/redoc.standalone.js"> </script>
|
|
|
|
<script>
|
|
if (document.readyState == 'loading') {
|
|
document.addEventListener("DOMContentLoaded", () => initRedoc());
|
|
} else {
|
|
initRedoc();
|
|
}
|
|
|
|
var isLocalhost = location.hostname === "localhost" || location.hostname === "127.0.0.1" || location.protocol === 'file:';
|
|
var api_url = isLocalhost ? '/api/waas-api.json' : 'https://profee-waas.github.io/pf-waas-api/api/waas-api.json';
|
|
|
|
function initRedoc() {
|
|
Redoc.init(api_url, {"pathInMiddlePanel":true});
|
|
showApi();
|
|
}
|
|
function showApi() {
|
|
document.getElementById("page-api").classList.add("is-active");
|
|
document.getElementById("page-async-api").classList.remove("is-active");
|
|
document.getElementById("async-api").style.display = "none";
|
|
document.getElementById("api").style.display = "block";
|
|
}
|
|
function showAsyncApi() {
|
|
document.getElementById("page-async-api").classList.add("is-active");
|
|
document.getElementById("page-api").classList.remove("is-active");
|
|
document.getElementById("api").style.display = "none";
|
|
document.getElementById("async-api").style.display = "block";
|
|
}
|
|
</script>
|
|
|
|
</body>
|
|
</html>
|