-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
238 lines (229 loc) · 16.4 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
228
229
230
231
232
233
234
235
236
237
238
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
<title>API Documentation</title>
<link href="https://fonts.googleapis.com/css?family=Ubuntu|Ubuntu+Mono" rel="stylesheet">
<link rel="stylesheet" href="assets/lib/github.min.css" />
<link rel="stylesheet" href="assets/css/api.css" />
</head>
<body ng-app="api" ng-controller="apiController as vm" ng-class="{loading: vm.loading}" ng-cloak>
<div class="header"></div>
<div class="loading-container">
<div class="table">
<div class="table-cell">
<img src="assets/img/loader.svg" alt="Loading..." />
</div>
</div><!-- .table -->
</div><!-- .loading-container -->
<div class="api-container">
<div class="navigation-outer">
<div class="navigation-inner">
<select class="api-selector" ng-options="spec.path as spec.name for spec in vm.specList" ng-model="vm.specUrl">
<option>Select an API</option>
</select>
<div class="navigation-menu">
<ul class="navigation-sections">
<li class="navigation-section" ng-repeat="section in vm.spec.sections">
<div ng-bind="section.name" ng-click="vm.scrollToMethod(section)"></div>
<ul class="navigation-methods" ng-if="section.methods && section.methods.length">
<li class="navigation-method" ng-repeat="method in section.methods">
<div ng-click="vm.scrollToMethod(section, vm.spec.methods[method])">
<span class="{{'method-' + vm.spec.methods[method].method.toLowerCase() + '-label'}}" ng-bind="vm.spec.methods[method].method"></span>
<span ng-bind="vm.spec.methods[method].location" ng-class="{'is-symbolic': vm.spec.methods[method].location_type.toLowerCase() === 'symbolic'}"></span>
</div>
</li><!-- .navigation-method -->
</ul><!-- .navigation-methods -->
</li><!-- .navigation-section -->
</ul><!-- .navigation-sections -->
<ul ng-if="vm.spec.schemas.json">
<li>
<div ng-click="vm.scrollToSchema()">Schemas</div>
<ul class="navigation-schemas">
<li class="navigation-schema" ng-repeat="(name, schema) in vm.spec.schemas.json">
<div ng-bind="name" ng-click="vm.scrollToSchema(name)"></div>
</li>
</ul><!-- .navigation-schemas -->
</li>
</ul>
</div><!-- .navigation-menu -->
</div><!-- .navigation-inner -->
</div><!-- .navigation-outer -->
<div class="sections" ng-if="vm.spec.sections">
<div class="section" ng-repeat="section in vm.spec.sections">
<div class="toggle-header section-header" ng-click="section.__hide = !section.__hide" ng-attr-id="{{vm.slugify(section.name)}}">
<div class="toggle-header-title section-name" ng-bind="section.name"></div>
<div class="toggle-header-subtitle section-summary" ng-if="section.summary" ng-bind="section.summary"></div>
</div>
<div class="toggle-content section-body" ng-hide="section.__hide">
<div ng-if="section.description">
<div class="label">Description</div>
<p class="description section-description" ng-bind="section.description"></p>
</div>
<div class="methods">
<div class="method {{'method-' + vm.spec.methods[method].method.toLowerCase()}}" ng-repeat="method in section.methods" ng-attr-id="{{vm.slugify(section.name + '-' + vm.spec.methods[method].method + ' ' + vm.spec.methods[method].location)}}">
<div class="toggle-header method-header" ng-click="vm.spec.methods[method].__hide = !vm.spec.methods[method].__hide">
<div class="toggle-header-title">
<div class="monospace-text method-method-location">
<span class="method-method" ng-bind="vm.spec.methods[method].method"></span>
<span class="method-location" ng-bind="vm.spec.methods[method].location" ng-class="{'is-symbolic': vm.spec.methods[method].location_type.toLowerCase() === 'symbolic'}"></span>
</div>
</div><!-- .toggle-header-title -->
<div class="toggle-header-subtitle method-summary" ng-if="vm.spec.methods[method].summary" ng-bind="vm.spec.methods[method].summary"></div>
</div><!-- .method-header -->
<div class="toggle-content method-body" ng-hide="vm.spec.methods[method].__hide">
<div ng-if="vm.spec.methods[method].description">
<div class="label">Description</div>
<p class="description method-description" ng-bind="vm.spec.methods[method].description"></p>
</div>
<div class="requests">
<div class="label">Request</div>
<div class="request no-request-params" ng-if="vm.isEmptyObject(vm.spec.methods[method].request)">None</div>
<div class="requests-content" ng-if="!vm.isEmptyObject(vm.spec.methods[method].request)">
<div class="request" ng-repeat="(requestType, requestParameterList) in vm.spec.methods[method].request" ng-hide="vm.spec.methods[method].request[requestType].__hide">
<div class="label method-sub-label" ng-bind="requestType"></div>
<table class="parameter-list" ng-if="vm.isParameterList(requestType)">
<thead ng-include="'parameterTableHead.html'"></thead>
<tbody>
<tr class="parameter" ng-repeat="parameter in vm.spec.methods[method].request[requestType]" ng-include="'parameter.html'"></tr>
</tbody>
</table><!-- .parameter-list -->
<div class="body-list" ng-if="vm.isBodyList(requestType)">
<div class="body" ng-repeat="body in vm.spec.methods[method].request[requestType] track by $index" ng-include="'body.html'"></div>
</div>
</div><!-- .request -->
</div><!-- .requests-content -->
</div><!-- .requests -->
<div class="responses">
<div class="label">Responses</div>
<ul class="toggle-tabs" ng-if="vm.spec.methods[method].response && vm.spec.methods[method].response.length">
<li class="toggle-tab" ng-repeat="response in vm.spec.methods[method].response" ng-click="vm.toggleResponse(vm.spec.methods[method].response, response)" ng-class="{'selected': !response.__hide}" ng-init="vm.toggleFirstResponse($index, vm.spec.methods[method].response, response)" ng-bind="response.name || response.statusMessage || response.statusCode"></li>
</ul>
<div class="response" ng-repeat="response in vm.spec.methods[method].response" ng-hide="response.__hide">
<div ng-if="response.description">
<div class="label method-sub-label">Description</div>
<p class="description response-description" ng-bind="response.description"></p>
</div>
<div>
<div class="label method-sub-label">Status</div>
<p class="description response-status">
<span ng-bind="response.statusCode"></span>
<span ng-bind="response.statusMessage"></span>
</p>
</div>
<div ng-if="response.header">
<div class="label method-sub-label">Header</div>
<table class="parameter-list" ng-if="response.header">
<thead ng-include="'parameterTableHead.html'"></thead>
<tbody>
<tr class="parameter" ng-repeat="parameter in response.header" ng-include="'parameter.html'"></tr>
</tbody>
</table><!-- .parameter-list -->
</div>
<div ng-if="response.body">
<div class="label method-sub-label">Body</div>
<div class="body-list">
<div class="body" ng-repeat="body in response.body track by $index" ng-include="'body.html'"></div>
</div><!-- .body-list -->
</div>
</div><!-- .response -->
</div><!-- .responses -->
</div><!-- .method-body -->
</div><!-- .method -->
</div><!-- .methods -->
</div><!-- .section-body -->
</div><!-- .section -->
</div><!-- .sections -->
<div class="schemas" ng-if="vm.spec.schemas.json">
<div class="toggle-header schemas-header" id="schemas" ng-click="vm.hideSchemas = !vm.hideSchemas">
<div class="toggle-header-title">Schemas</div>
</div>
<div class="schemas-body" ng-if="vm.spec.schemas.json" ng-hide="vm.hideSchemas">
<div class="schema schema-property expandable" ng-repeat="(key, value) in vm.spec.schemas.json" ng-attr-id="{{'schema-' + vm.slugify(key)}}" ng-class="{'collapsed': !value.__show}" ng-click="value.__show = !value.__show; $event.stopPropagation()" ng-include="'schema.html'"></div>
</div><!-- .schemas-body -->
</div><!-- .schemas -->
</div><!-- .container -->
<script type="text/ng-template" id="schema.html">
<div class="schema-key" ng-class="{'is-regex': vm.isRegEx(key)}">
<span ng-bind="key"></span>
</div>
<div class="schema-key-frequency">
<span ng-if="frequency" ng-bind="frequency"></span>
</div>
<div class="schema-value" ng-include="'value.html'"></div>
</script>
<script type="text/ng-template" id="value.html">
<div>
<div class="value-type" ng-class="{'is-reference': value.type.toLowerCase() === 'reference'}" ng-click="vm.scrollToSchema(value.tag)" ng-bind="value.type.toLowerCase() === 'reference' ? value.tag : value.type"></div>
<div class="value-details" ng-if="value.type.toLowerCase() !== 'object'">
<div class="value-description" ng-if="description" ng-bind="description"></div>
<div ng-if="value.criteria && value.criteria.length" ng-init="criteria = value.criteria" ng-include="'criteria.html'" include-replace></div>
<div ng-if="value.examples && value.examples.length" ng-init="examples = value.examples" ng-include="'examples.html'" include-replace></div>
</div>
</div>
<div class="schema-object" ng-if="value.type.toLowerCase() === 'object'" ng-include="'property.html'"></div>
</script>
<script type="text/ng-template" id="property.html">
<div class="schema-property" ng-repeat="property in value.properties" ng-init="key = vm.isString(property.key) ? property.key : '??????'; value = property.schema; description = property.description; frequency = property.frequency" ng-class="{'expandable': value.type.toLowerCase() === 'object' || description || (value.criteria && value.criteria.length) || (value.examples && value.examples.length), 'collapsed': !value.__show}" ng-click="value.__show = !value.__show; $event.stopPropagation()" ng-include="'schema.html'"></div>
</script>
<script type="text/ng-template" id="parameterTableHead.html">
<tr>
<th class="parameter-name">Name</th>
<th class="parameter-frequency">Frequency</th>
<th class="parameter-description">Description</th>
</tr>
</script>
<script type="text/ng-template" id="parameter.html">
<td class="monospace-text parameter-name" ng-bind="parameter.name"></td>
<td class="parameter-frequency" ng-bind="parameter.frequency"></td>
<td class="parameter-description">
<p ng-if="parameter.description" ng-bind="parameter.description"></p>
<div ng-if="parameter.criteria && parameter.criteria.length" ng-init="criteria = parameter.criteria" ng-include="'criteria.html'" include-replace></div>
<div ng-if="parameter.examples && parameter.examples.length" ng-init="examples = parameter.examples" ng-include="'examples.html'" include-replace></div>
</td>
</script>
<script type="text/ng-template" id="criteria.html">
<div class="list-container criteria">
<ul>
<li class="criterion" ng-repeat="criterion in criteria" ng-bind="criterion"></li>
</ul>
</div>
</script>
<script type="text/ng-template" id="examples.html">
<div class="list-container examples">
<ul class="monospace-text">
<li class="example" ng-repeat="example in examples" ng-bind="example"></li>
</ul>
</div>
</script>
<script type="text/ng-template" id="body.html">
<p class="description body-content-type" ng-if="body.contentType">
<span class="body-content-type-label">Content Type:</span>
<span class="body-content-type-value" ng-bind="body.contentType"></span>
</p>
<p class="description body-reference" ng-if="body.type.toLowerCase() === 'json' && body.schema.type.toLowerCase() === 'reference'">
<span class="body-reference-label">Reference:</span>
<span class="monospace-text body-reference-value" ng-click="vm.scrollToSchema(body.schema.tag)" ng-bind="body.schema.tag"></span>
</p>
<p class="description body-type" ng-if="body.type.toLowerCase() !== 'form' && body.type.toLowerCase() !== 'json'">
<span class="body-type-label">Type:</span>
<span class="body-type-value" ng-bind="body.type"></span>
</p>
<table class="parameter-list" ng-if="body.type.toLowerCase() === 'form'">
<thead ng-include="'parameterTableHead.html'"></thead>
<tbody>
<tr class="parameter" ng-repeat="parameter in body.parameters" ng-include="'parameter.html'"></tr>
</tbody>
</table>
</script>
<script src="assets/lib/jquery-3.1.0.min.js"></script>
<script src="assets/lib/angular.min.js"></script>
<script src="assets/lib/highlight.min.js"></script>
<script src="assets/lib/angular-highlightjs.min.js"></script>
<script src="assets/js/apiModule.js"></script>
<script src="assets/js/apiFactory.js"></script>
<script src="assets/js/apiController.js"></script>
<script src="assets/js/directives/includeReplace.js"></script>
</body>
</html>