-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
152 lines (141 loc) · 4.16 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>SmallCDN</title>
<link rel="stylesheet" href="https://s.mlcdn.co/bootstrap.css">
<link rel="stylesheet" href="https://s.mlcdn.co/highlight.css">
<link rel="stylesheet" href="app.css">
</head>
<body>
<div class="container">
<div class="header clearfix">
<h3 class="text-muted">SmallCDN <small>Beta</small></h3>
</div>
<div class="jumbotron">
<h1>The Most Advanced CDN</h1>
<p>And it has tiny URLs too!</p>
<div class="progress">
<div class="progress-bar" role="progressbar" aria-valuenow="60" aria-valuemin="0" aria-valuemax="100" style="width: 43.75%;">
SmallCDN (28 chars)
</div>
</div>
<div class="progress">
<div class="progress-bar progress-bar-danger" role="progressbar" aria-valuenow="60" aria-valuemin="0" aria-valuemax="100" style="width: 100%;">
Google Hosted Libraries (64 chars)
</div>
</div>
</div>
<div class="panel panel-default">
<div class="panel-body">
<div class="header panel-header">
<h3>URLs</h3>
</div>
<ol class="breadcrumb">
<li class="active">s.mlcdn.co</li>
<li>library</li>
</ol>
<ol class="breadcrumb">
<li class="active">s.mlcdn.co</li>
<li>library</li>
<li>version</li>
</ol>
<h4>Parameters</h4>
<table class="table">
<tr>
<th>Name</th>
<th>Description</th>
</tr>
<tr>
<td>library</td>
<td>The library you wish to use.</td>
</tr>
<tr>
<td>version</td>
<td>
The version you wish to receive, can be a range. If not provided, you will receive the latest version.
Note: this will not always be as fast as providing no version, as the request may not yet be cached.
</td>
</tr>
</table>
<h4>Examples</h4>
<ol class="breadcrumb">
<li class="active">s.mlcdn.co</li>
<li>jquery.js</li>
</ol>
<ol class="breadcrumb">
<li class="active">s.mlcdn.co</li>
<li>jquery.js</li>
<li>3.x.x</li>
</ol>
</div>
</div>
<div class="panel panel-default">
<div class="panel-body">
<div class="header panel-header">
<h3>Headers</h3>
</div>
<h4>Reaponse Headers</h4>
<table class="table">
<tr>
<th>Name</th>
<th>Description</th>
</tr>
<tr>
<td>x-version</td>
<td>The version of the library that you are receiving.</td>
</tr>
</table>
</div>
</div>
<div class="panel panel-default">
<div class="panel-body">
<div class="header panel-header">
<h3>Errors</h3>
</div>
<div class="alert alert-info" role="alert">If you encounter these errors in production, you are doing it wrong.</div>
<h4>Format</h4>
<pre><code class="json">
{
"code": 1,
"message": "library 'foo' not found"
}
</code></pre><br>
<h4>Error Codes</h4>
<table class="table">
<tr>
<th>Code</th>
<th>Status Code</th>
<th>Description</th>
</tr>
<tr>
<th>1</th>
<td>404</td>
<td>You passed a library that doesn't exist.</td>
</tr>
<tr>
<th>2</th>
<td>404</td>
<td>You passed a version which matches nothing we have. You can always add more versions via GitHub!</td>
</tr>
<tr>
<th>3</th>
<td>400</td>
<td>You passed an invalid version string.</td>
</tr>
</table>
</div>
</div>
<div class="panel panel-default">
<div class="panel-body">
<div class="header panel-header">
<h3>API</h3>
</div>
Soon :^)
</div>
</div>
</div>
<script src="https://s.mlcdn.co/highlight.js"></script>
<script>hljs.initHighlightingOnLoad();</script>
</body>
</html>