aboutsummaryrefslogtreecommitdiff
path: root/swagger.html
diff options
context:
space:
mode:
Diffstat (limited to 'swagger.html')
-rw-r--r--swagger.html349
1 files changed, 349 insertions, 0 deletions
diff --git a/swagger.html b/swagger.html
new file mode 100644
index 0000000..a2a04cd
--- /dev/null
+++ b/swagger.html
@@ -0,0 +1,349 @@
+<!doctype html>
+<html>
+ <head>
+ <title>RIT COVID Poller</title>
+ <style type="text/css">
+ body {
+ font-family: Trebuchet MS, sans-serif;
+ font-size: 15px;
+ color: #444;
+ margin-right: 24px;
+}
+
+h1 {
+ font-size: 25px;
+}
+h2 {
+ font-size: 20px;
+}
+h3 {
+ font-size: 16px;
+ font-weight: bold;
+}
+hr {
+ height: 1px;
+ border: 0;
+ color: #ddd;
+ background-color: #ddd;
+}
+
+.app-desc {
+ clear: both;
+ margin-left: 20px;
+}
+.param-name {
+ width: 100%;
+}
+.license-info {
+ margin-left: 20px;
+}
+
+.license-url {
+ margin-left: 20px;
+}
+
+.model {
+ margin: 0 0 0px 20px;
+}
+
+.method {
+ margin-left: 20px;
+}
+
+.method-notes {
+ margin: 10px 0 20px 0;
+ font-size: 90%;
+ color: #555;
+}
+
+pre {
+ padding: 10px;
+ margin-bottom: 2px;
+}
+
+.http-method {
+ text-transform: uppercase;
+}
+
+pre.get {
+ background-color: #0f6ab4;
+}
+
+pre.post {
+ background-color: #10a54a;
+}
+
+pre.put {
+ background-color: #c5862b;
+}
+
+pre.delete {
+ background-color: #a41e22;
+}
+
+.huge {
+ color: #fff;
+}
+
+pre.example {
+ background-color: #f3f3f3;
+ padding: 10px;
+ border: 1px solid #ddd;
+}
+
+code {
+ white-space: pre;
+}
+
+.nickname {
+ font-weight: bold;
+}
+
+.method-path {
+ font-size: 1.5em;
+ background-color: #0f6ab4;
+}
+
+.up {
+ float:right;
+}
+
+.parameter {
+ width: 500px;
+}
+
+.param {
+ width: 500px;
+ padding: 10px 0 0 20px;
+ font-weight: bold;
+}
+
+.param-desc {
+ width: 700px;
+ padding: 0 0 0 20px;
+ color: #777;
+}
+
+.param-type {
+ font-style: italic;
+}
+
+.param-enum-header {
+width: 700px;
+padding: 0 0 0 60px;
+color: #777;
+font-weight: bold;
+}
+
+.param-enum {
+width: 700px;
+padding: 0 0 0 80px;
+color: #777;
+font-style: italic;
+}
+
+.field-label {
+ padding: 0;
+ margin: 0;
+ clear: both;
+}
+
+.field-items {
+ padding: 0 0 15px 0;
+ margin-bottom: 15px;
+}
+
+.return-type {
+ clear: both;
+ padding-bottom: 10px;
+}
+
+.param-header {
+ font-weight: bold;
+}
+
+.method-tags {
+ text-align: right;
+}
+
+.method-tag {
+ background: none repeat scroll 0% 0% #24A600;
+ border-radius: 3px;
+ padding: 2px 10px;
+ margin: 2px;
+ color: #FFF;
+ display: inline-block;
+ text-decoration: none;
+}
+
+ </style>
+ </head>
+ <body>
+ <h1>RIT COVID Poller</h1>
+ <div class="app-desc">This is a simple API to retrieve current and historical data from the RIT COVID Dashboard.</div>
+ <div class="app-desc">More information: <a href="https://helloreverb.com">https://helloreverb.com</a></div>
+ <div class="app-desc">Contact Info: <a href="galen@galenguyer.com">galen@galenguyer.com</a></div>
+ <div class="app-desc">Version: 1.0.0</div>
+ <div class="app-desc">BasePath:/api</div>
+ <div class="license-info">AGPL 3.0</div>
+ <div class="license-url">https://www.gnu.org/licenses/agpl-3.0.txt</div>
+ <h2>Access</h2>
+
+ <h2><a name="__Methods">Methods</a></h2>
+ [ Jump to <a href="#__Models">Models</a> ]
+
+ <h3>Table of Contents </h3>
+ <div class="method-summary"></div>
+ <h4><a href="#V0">V0</a></h4>
+ <ul>
+ <li><a href="#getv0History"><code><span class="http-method">get</span> /v0/history</code></a></li>
+ <li><a href="#getv0Latest"><code><span class="http-method">get</span> /v0/latest</code></a></li>
+ </ul>
+
+ <h1><a name="V0">V0</a></h1>
+ <div class="method"><a name="getv0History"/>
+ <div class="method-path">
+ <a class="up" href="#__Methods">Up</a>
+ <pre class="get"><code class="huge"><span class="http-method">get</span> /v0/history</code></pre></div>
+ <div class="method-summary">Gets all historical data (<span class="nickname">getv0History</span>)</div>
+ <div class="method-notes">Returns data from every day where the dashboard changed</div>
+
+
+
+
+
+
+
+ <h3 class="field-label">Return type</h3>
+ <div class="return-type">
+ array[<a href="#Day">Day</a>]
+
+ </div>
+
+ <!--Todo: process Response Object and its headers, schema, examples -->
+
+ <h3 class="field-label">Example data</h3>
+ <div class="example-data-content-type">Content-Type: application/json</div>
+ <pre class="example"><code>[ {
+ "beds_available" : 0,
+ "total_staff" : 3,
+ "isolation_on_campus" : 1,
+ "last_updated" : "2000-01-23T04:56:07.000+00:00",
+ "quarantine_on_campus" : 7,
+ "new_staff" : 5,
+ "alert_level" : "green",
+ "test_administered" : 9,
+ "total_students" : 2,
+ "new_students" : 5,
+ "quarantine_off_campus" : 2,
+ "isolation_off_campus" : 6
+}, {
+ "beds_available" : 0,
+ "total_staff" : 3,
+ "isolation_on_campus" : 1,
+ "last_updated" : "2000-01-23T04:56:07.000+00:00",
+ "quarantine_on_campus" : 7,
+ "new_staff" : 5,
+ "alert_level" : "green",
+ "test_administered" : 9,
+ "total_students" : 2,
+ "new_students" : 5,
+ "quarantine_off_campus" : 2,
+ "isolation_off_campus" : 6
+} ]</code></pre>
+
+ <h3 class="field-label">Produces</h3>
+ This API call produces the following media types according to the <span class="header">Accept</span> request header;
+ the media type will be conveyed by the <span class="header">Content-Type</span> response header.
+ <ul>
+ <li><code>application/json</code></li>
+ </ul>
+
+ <h3 class="field-label">Responses</h3>
+ <h4 class="field-label">200</h4>
+ successful operation
+
+ </div> <!-- method -->
+ <hr/>
+ <div class="method"><a name="getv0Latest"/>
+ <div class="method-path">
+ <a class="up" href="#__Methods">Up</a>
+ <pre class="get"><code class="huge"><span class="http-method">get</span> /v0/latest</code></pre></div>
+ <div class="method-summary">Gets the latest data (<span class="nickname">getv0Latest</span>)</div>
+ <div class="method-notes">Returns the most recent data from the official dashboard</div>
+
+
+
+
+
+
+
+ <h3 class="field-label">Return type</h3>
+ <div class="return-type">
+ <a href="#Day">Day</a>
+
+ </div>
+
+ <!--Todo: process Response Object and its headers, schema, examples -->
+
+ <h3 class="field-label">Example data</h3>
+ <div class="example-data-content-type">Content-Type: application/json</div>
+ <pre class="example"><code>{
+ "beds_available" : 0,
+ "total_staff" : 3,
+ "isolation_on_campus" : 1,
+ "last_updated" : "2000-01-23T04:56:07.000+00:00",
+ "quarantine_on_campus" : 7,
+ "new_staff" : 5,
+ "alert_level" : "green",
+ "test_administered" : 9,
+ "total_students" : 2,
+ "new_students" : 5,
+ "quarantine_off_campus" : 2,
+ "isolation_off_campus" : 6
+}</code></pre>
+
+ <h3 class="field-label">Produces</h3>
+ This API call produces the following media types according to the <span class="header">Accept</span> request header;
+ the media type will be conveyed by the <span class="header">Content-Type</span> response header.
+ <ul>
+ <li><code>application/json</code></li>
+ </ul>
+
+ <h3 class="field-label">Responses</h3>
+ <h4 class="field-label">200</h4>
+ successful operation
+ <a href="#Day">Day</a>
+ </div> <!-- method -->
+ <hr/>
+
+ <h2><a name="__Models">Models</a></h2>
+ [ Jump to <a href="#__Methods">Methods</a> ]
+
+ <h3>Table of Contents</h3>
+ <ol>
+ <li><a href="#Day"><code>Day</code> - </a></li>
+ </ol>
+
+ <div class="model">
+ <h3><a name="Day"><code>Day</code> - </a> <a class="up" href="#__Models">Up</a></h3>
+ <div class='model-description'></div>
+ <div class="field-items">
+ <div class="param">alert_level (optional)</div><div class="param-desc"><span class="param-type"><a href="#string">String</a></span> </div>
+ <div class="param-enum-header">Enum:</div>
+ <div class="param-enum">green</div><div class="param-enum">yellow</div><div class="param-enum">orange</div><div class="param-enum">red</div>
+<div class="param">beds_available (optional)</div><div class="param-desc"><span class="param-type"><a href="#integer">Integer</a></span> format: int32</div>
+<div class="param">isolation_off_campus (optional)</div><div class="param-desc"><span class="param-type"><a href="#integer">Integer</a></span> format: int32</div>
+<div class="param">isolation_on_campus (optional)</div><div class="param-desc"><span class="param-type"><a href="#integer">Integer</a></span> format: int32</div>
+<div class="param">last_updated (optional)</div><div class="param-desc"><span class="param-type"><a href="#DateTime">Date</a></span> format: date-time</div>
+<div class="param">new_staff (optional)</div><div class="param-desc"><span class="param-type"><a href="#integer">Integer</a></span> format: int32</div>
+<div class="param">new_students (optional)</div><div class="param-desc"><span class="param-type"><a href="#integer">Integer</a></span> format: int32</div>
+<div class="param">quarantine_off_campus (optional)</div><div class="param-desc"><span class="param-type"><a href="#integer">Integer</a></span> format: int32</div>
+<div class="param">quarantine_on_campus (optional)</div><div class="param-desc"><span class="param-type"><a href="#integer">Integer</a></span> format: int32</div>
+<div class="param">test_administered (optional)</div><div class="param-desc"><span class="param-type"><a href="#integer">Integer</a></span> format: int32</div>
+<div class="param">total_staff (optional)</div><div class="param-desc"><span class="param-type"><a href="#integer">Integer</a></span> format: int32</div>
+<div class="param">total_students (optional)</div><div class="param-desc"><span class="param-type"><a href="#integer">Integer</a></span> format: int32</div>
+ </div> <!-- field-items -->
+ </div>
+ </body>
+</html>