-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathindex.html
227 lines (197 loc) · 10.6 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>37coins.io API Documentation</title>
<link rel="icon" type="image/png" href="images/favicon16.gif">
<link rel="shortcut icon" href="images/faveicon32.png">
<link href='css/typography.css' media='screen' rel='stylesheet' type='text/css'/>
<link href='css/reset.css' media='screen' rel='stylesheet' type='text/css'/>
<link href='css/screen.css' media='screen' rel='stylesheet' type='text/css'/>
<link href='css/reset.css' media='print' rel='stylesheet' type='text/css'/>
<link href='css/screen.css' media='print' rel='stylesheet' type='text/css'/>
<script type="text/javascript" src="lib/shred.bundle.js"></script>
<script src='lib/jquery-1.8.0.min.js' type='text/javascript'></script>
<script src='lib/jquery.slideto.min.js' type='text/javascript'></script>
<script src='lib/jquery.wiggle.min.js' type='text/javascript'></script>
<script src='lib/jquery.ba-bbq.min.js' type='text/javascript'></script>
<script src='lib/handlebars-2.0.0.js' type='text/javascript'></script>
<script src='lib/underscore-min.js' type='text/javascript'></script>
<script src='lib/backbone-min.js' type='text/javascript'></script>
<script src='lib/swagger-client.js' type='text/javascript'></script>
<script src='swagger-ui.js' type='text/javascript'></script>
<script src='lib/highlight.7.3.pack.js' type='text/javascript'></script>
<script src='lib/marked.js' type='text/javascript'></script>
<!-- enabling this will enable oauth2 implicit scope support -->
<script src='lib/swagger-oauth.js' type='text/javascript'></script>
<script type="text/javascript">
$(function() {
var urlLoaderCounterSuccess = 0;
var urlLoaderCounterFailed = 0;
var staticLoaded = false;
var toc_container = "#toc";
var toc_option = {
selectors: "h1,h2,h3,h4",
scrollTo: 100,
toggleOnClick: true,
smoothScroll: true,
highlightOnScroll: true,
extendPageOffset: 300,
showAndHide: false, //this is needed for toggleling the dropdown on sigle click
highlightOffset:100
// showEffect:"none",
// showAndHideOnScroll : false
};
$.get("apidocs/static/static.html", function(data) {
$("#static").html(data);
// alert( "Load was performed." );
});
//for production this is not in production yet.
// $.get("apidocs/static/webWidget.html", function(data) {
// $("#web-widget").html(data);
// // alert( "Load was performed." );
// });
var url = window.location.search.match(/url=([^&]+)/);
if (url && url.length > 1) {
url = decodeURIComponent(url[1]);
} else {
url = [
"https://chains.37coins.io/swagger.json",
"https://oracle.37coins.io/api/swagger.json"
];
}
if (url) {
for (var index in url) {
if (!$('#swagger-ui-container-' + index).length) {
$('#swagger').append('<div id="swagger-ui-container-' + index + '" class="swagger-ui-wrap row-fluid"></div>');
}
window.swaggerUi = new SwaggerUi({
url: url[index],
dom_id: "swagger-ui-container-" + index,
supportedSubmitMethods: ['get', 'post', 'put', 'delete', 'patch'],
onComplete: function(swaggerApi, swaggerUi) {
if (typeof initOAuth == "function") {
/*
initOAuth({
clientId: "your-client-id",
realm: "your-realms",
appName: "your-app-name"
});
*/
}
$('pre code').each(function(i, e) {
hljs.highlightBlock(e)
});
urlLoaderCounterSuccess++;
},
onFailure: function(data) {
urlLoaderCounterFailed++;
log("Unable to Load SwaggerUI");
},
docExpansion: "none",
sorter: "alpha"
}).load();
}
}
window.resourceCounter = 0;
$(document).on('loaded-static', function() {
window.resourceCounter++; /// staticLoaded = true;
});
var timer = setInterval(function(){
var urlLoadFinished = false;
if((urlLoaderCounterSuccess + urlLoaderCounterFailed) == url.length){
urlLoadFinished = true;
if (window.resourceCounter >= urlLoaderCounterSuccess) {
setTimeout(function(){
staticLoaded = true;
},500);
}
}
if(urlLoaderCounterFailed == url.length ){
staticLoaded = true;
}
if(urlLoadFinished && staticLoaded){
toc = $(toc_container).empty().tocify(toc_option).data("toc-tocify");
prettyPrint();
$(".optionName").popover({trigger: "hover"});
clearInterval(timer);
}
},1000);
function addApiKeyAuthorization() {
var key = $('#input_apiKey')[0].value;
log("key: " + key);
if (key && key.trim() != "") {
log("added key " + key);
window.authorizations.add("api_key", new ApiKeyAuthorization("api_key", key, "query"));
}
}
$('#input_apiKey').change(function() {
addApiKeyAuthorization();
});
// if you have an apiKey you would like to pre-populate on the page for demonstration purposes...
/*
var apiKey = "myApiKeyXXXX123456789";
$('#input_apiKey').val(apiKey);
addApiKeyAuthorization();
*/
//window.swaggerUi.load();
});</script>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="">
<meta name="author" content="">
<!--<link href="styles/screen.css" rel="stylesheet" type="text/css" media="screen">-->
<!-- Le styles -->
<link href="styles/bootstrap.css" rel="stylesheet">
<link href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.21/themes/black-tie/jquery-ui.css" rel="stylesheet">
<link href="styles/jquery.tocify.css" rel="stylesheet">
<link href="styles/prettify.css" type="text/css" rel="stylesheet" />
<!-- Le HTML5 shim, for IE6-8 support of HTML5 elements -->
<!--[if lt IE 9]>
<script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
<!-- Le fav and touch icons -->
<link rel="shortcut icon" href="../assets/ico/favicon.ico">
<link rel="apple-touch-icon-precomposed" sizes="144x144" href="../assets/ico/apple-touch-icon-144-precomposed.png">
<link rel="apple-touch-icon-precomposed" sizes="114x114" href="../assets/ico/apple-touch-icon-114-precomposed.png">
<link rel="apple-touch-icon-precomposed" sizes="72x72" href="../assets/ico/apple-touch-icon-72-precomposed.png">
<link rel="apple-touch-icon-precomposed" href="../assets/ico/apple-touch-icon-57-precomposed.png">
<link href="styles/style.css" type="text/css" rel="stylesheet" />
</head>
<body class="swagger-section">
<div id='header' style="">
<div class="swagger-ui-wrap">
<a id="logo" href="https://37coins.com">37coins | Developers</a>
</div>
</div>
<div class="headerFixed"></div>
<div class="container-fluid">
<div class="row-fluid">
<!-- temporary disabled span2
<div class="span2">
<div id="toc">
<img style="margin-left: 40%; margin-top: 30%;" src="images/loop.gif">
</div>
</div>/span-->
<!--temporary change to width of dark box, origonal in css file.-->
<div class="dark-box" style="width:37%">
</div>
<!--temporary change in span10 to span12-->
<div class="span12 content">
<span id="static">
</span>
<!--Endpoint block start-->
<!--block end-->
<!--<div id="message-bar" class="swagger-ui-wrap"> </div>-->
<div id="swagger"></div>
<span id="web-widget"></span>
</div><!--/span-->
</div><!--/row-->
</div><!--/.fluid-container-->
<!-- Placed at the end of the document so the pages load faster -->
<!--<script src="../lib/jquery/jquery-1.8.3.min.js"></script>-->
<script src="lib/jqueryui/jquery-ui-1.9.1.custom.min.js"></script>
<script src="javascripts/bootstrap.js"></script>
<script src="javascripts/jquery.tocify.js"></script>
<script src="javascripts/prettify.js"></script>
</body>
</html>