From f00b200dcbcea9eeb4cc5d091bf3eff87a7ddb78 Mon Sep 17 00:00:00 2001 From: Galen Guyer Date: Mon, 16 Nov 2020 10:35:54 -0500 Subject: use a lot nicer version of swagger.html --- swagger.html | 3216 +++++++++++++++++++++++++++++++++++++++++++++++++++++----- 1 file changed, 2962 insertions(+), 254 deletions(-) diff --git a/swagger.html b/swagger.html index a2a04cd..575ae4a 100644 --- a/swagger.html +++ b/swagger.html @@ -1,349 +1,3057 @@ - + - - RIT COVID Poller - + + + + +
+
+
+ +
+
+
+
+

RIT COVID Poller

+
+
+
+ +
+
+

V0

+
+
+
+

getv0History

+

Gets all historical data

+
+
+
+

+

Returns data from every day where the dashboard changed

+

+
+
/v0/history
+

+

Usage and SDK Samples

+

+ + +
+
+
curl -X GET "https://ritcoviddashboard.com/api/v0/history"
+
+
+
import io.swagger.client.*;
+import io.swagger.client.auth.*;
+import io.swagger.client.model.*;
+import io.swagger.client.api.V0Api;
+
+import java.io.File;
+import java.util.*;
+
+public class V0ApiExample {
+
+    public static void main(String[] args) {
+        
+        V0Api apiInstance = new V0Api();
+        try {
+            array[Day] result = apiInstance.getv0History();
+            System.out.println(result);
+        } catch (ApiException e) {
+            System.err.println("Exception when calling V0Api#getv0History");
+            e.printStackTrace();
+        }
+    }
+}
+
+ +
+
import io.swagger.client.api.V0Api;
+
+public class V0ApiExample {
+
+    public static void main(String[] args) {
+        V0Api apiInstance = new V0Api();
+        try {
+            array[Day] result = apiInstance.getv0History();
+            System.out.println(result);
+        } catch (ApiException e) {
+            System.err.println("Exception when calling V0Api#getv0History");
+            e.printStackTrace();
+        }
+    }
+}
+
+ +
+

+V0Api *apiInstance = [[V0Api alloc] init];
+
+// Gets all historical data
+[apiInstance getv0HistoryWithCompletionHandler: 
+              ^(array[Day] output, NSError* error) {
+                            if (output) {
+                                NSLog(@"%@", output);
+                            }
+                            if (error) {
+                                NSLog(@"Error: %@", error);
+                            }
+                        }];
+
+
+ +
+
var RitCovidPoller = require('rit_covid_poller');
+
+var api = new RitCovidPoller.V0Api()
+
+var callback = function(error, data, response) {
+  if (error) {
+    console.error(error);
+  } else {
+    console.log('API called successfully. Returned data: ' + data);
+  }
+};
+api.getv0History(callback);
+
+
+ + +
+
using System;
+using System.Diagnostics;
+using IO.Swagger.Api;
+using IO.Swagger.Client;
+using IO.Swagger.Model;
+
+namespace Example
+{
+    public class getv0HistoryExample
+    {
+        public void main()
+        {
+            
+            var apiInstance = new V0Api();
+
+            try
+            {
+                // Gets all historical data
+                array[Day] result = apiInstance.getv0History();
+                Debug.WriteLine(result);
+            }
+            catch (Exception e)
+            {
+                Debug.Print("Exception when calling V0Api.getv0History: " + e.Message );
+            }
+        }
+    }
 }
+
+
+ +
+
<?php
+require_once(__DIR__ . '/vendor/autoload.php');
 
-    
-  
-  
-  

RIT COVID Poller

-
This is a simple API to retrieve current and historical data from the RIT COVID Dashboard.
-
More information: https://helloreverb.com
-
Contact Info: galen@galenguyer.com
-
Version: 1.0.0
-
BasePath:/api
-
AGPL 3.0
-
https://www.gnu.org/licenses/agpl-3.0.txt
-

Access

+$api_instance = new Swagger\Client\Api\V0Api(); -

Methods

- [ Jump to Models ] +try { + $result = $api_instance->getv0History(); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling V0Api->getv0History: ', $e->getMessage(), PHP_EOL; +} +?>
+
-

Table of Contents

-
-

V0

- +
+
use Data::Dumper;
+use WWW::SwaggerClient::Configuration;
+use WWW::SwaggerClient::V0Api;
 
-  

V0

-
-
- Up -
get /v0/history
-
Gets all historical data (getv0History)
-
Returns data from every day where the dashboard changed
+my $api_instance = WWW::SwaggerClient::V0Api->new(); +eval { + my $result = $api_instance->getv0History(); + print Dumper($result); +}; +if ($@) { + warn "Exception when calling V0Api->getv0History: $@\n"; +}
+
+
+
from __future__ import print_statement
+import time
+import swagger_client
+from swagger_client.rest import ApiException
+from pprint import pprint
 
+# create an instance of the API class
+api_instance = swagger_client.V0Api()
 
+try: 
+    # Gets all historical data
+    api_response = api_instance.getv0_history()
+    pprint(api_response)
+except ApiException as e:
+    print("Exception when calling V0Api->getv0History: %s\n" % e)
+
+
+

Parameters

-

Return type

-
- array[Day] - -
- - -

Example data

-
Content-Type: application/json
-
[ {
-  "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
-} ]
- -

Produces

- This API call produces the following media types according to the Accept request header; - the media type will be conveyed by the Content-Type response header. -
    -
  • application/json
  • -
- -

Responses

-

200

- successful operation + + + +

Responses

+

Status: 200 - successful operation

+ + + +
+
+
+ +
+ +
+
+ +
+
+
+
+
+
+

getv0Latest

+

Gets the latest data

+
+
+
+

+

Returns the most recent data from the official dashboard

+

+
+
/v0/latest
+

+

Usage and SDK Samples

+

+ + +
+
+
curl -X GET "https://ritcoviddashboard.com/api/v0/latest"
+
+
+
import io.swagger.client.*;
+import io.swagger.client.auth.*;
+import io.swagger.client.model.*;
+import io.swagger.client.api.V0Api;
+
+import java.io.File;
+import java.util.*;
+
+public class V0ApiExample {
+
+    public static void main(String[] args) {
         
-  
-
-
-
- Up -
get /v0/latest
-
Gets the latest data (getv0Latest)
-
Returns the most recent data from the official dashboard
+ V0Api apiInstance = new V0Api(); + try { + Day result = apiInstance.getv0Latest(); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling V0Api#getv0Latest"); + e.printStackTrace(); + } + } +}
+
+
+
import io.swagger.client.api.V0Api;
 
+public class V0ApiExample {
 
+    public static void main(String[] args) {
+        V0Api apiInstance = new V0Api();
+        try {
+            Day result = apiInstance.getv0Latest();
+            System.out.println(result);
+        } catch (ApiException e) {
+            System.err.println("Exception when calling V0Api#getv0Latest");
+            e.printStackTrace();
+        }
+    }
+}
+
+ +
+

+V0Api *apiInstance = [[V0Api alloc] init];
 
+// Gets the latest data
+[apiInstance getv0LatestWithCompletionHandler: 
+              ^(Day output, NSError* error) {
+                            if (output) {
+                                NSLog(@"%@", output);
+                            }
+                            if (error) {
+                                NSLog(@"Error: %@", error);
+                            }
+                        }];
+
+
+
+
var RitCovidPoller = require('rit_covid_poller');
 
+var api = new RitCovidPoller.V0Api()
 
-    

Return type

-
- Day - -
+var callback = function(error, data, response) { + if (error) { + console.error(error); + } else { + console.log('API called successfully. Returned data: ' + data); + } +}; +api.getv0Latest(callback); +
+
+ + +
+
using System;
+using System.Diagnostics;
+using IO.Swagger.Api;
+using IO.Swagger.Client;
+using IO.Swagger.Model;
+
+namespace Example
+{
+    public class getv0LatestExample
+    {
+        public void main()
+        {
+            
+            var apiInstance = new V0Api();
+
+            try
+            {
+                // Gets the latest data
+                Day result = apiInstance.getv0Latest();
+                Debug.WriteLine(result);
+            }
+            catch (Exception e)
+            {
+                Debug.Print("Exception when calling V0Api.getv0Latest: " + e.Message );
+            }
+        }
+    }
+}
+
+
+ +
+
<?php
+require_once(__DIR__ . '/vendor/autoload.php');
 
-    
-
-    

Example data

-
Content-Type: application/json
-
{
-  "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
+$api_instance = new Swagger\Client\Api\V0Api();
+
+try {
+    $result = $api_instance->getv0Latest();
+    print_r($result);
+} catch (Exception $e) {
+    echo 'Exception when calling V0Api->getv0Latest: ', $e->getMessage(), PHP_EOL;
+}
+?>
+
+ +
+
use Data::Dumper;
+use WWW::SwaggerClient::Configuration;
+use WWW::SwaggerClient::V0Api;
+
+my $api_instance = WWW::SwaggerClient::V0Api->new();
+
+eval { 
+    my $result = $api_instance->getv0Latest();
+    print Dumper($result);
+};
+if ($@) {
+    warn "Exception when calling V0Api->getv0Latest: $@\n";
 }
+
+ +
+
from __future__ import print_statement
+import time
+import swagger_client
+from swagger_client.rest import ApiException
+from pprint import pprint
 
-    

Produces

- This API call produces the following media types according to the Accept request header; - the media type will be conveyed by the Content-Type response header. -
    -
  • application/json
  • -
- -

Responses

-

200

- successful operation - Day -
-
- -

Models

- [ Jump to Methods ] - -

Table of Contents

-
    -
  1. Day -
  2. -
- -
-

Day - Up

-
-
-
alert_level (optional)
-
Enum:
-
green
yellow
orange
red
-
beds_available (optional)
Integer format: int32
-
isolation_off_campus (optional)
Integer format: int32
-
isolation_on_campus (optional)
Integer format: int32
-
last_updated (optional)
Date format: date-time
-
new_staff (optional)
Integer format: int32
-
new_students (optional)
Integer format: int32
-
quarantine_off_campus (optional)
Integer format: int32
-
quarantine_on_campus (optional)
Integer format: int32
-
test_administered (optional)
Integer format: int32
-
total_staff (optional)
Integer format: int32
-
total_students (optional)
Integer format: int32
-
+# create an instance of the API class +api_instance = swagger_client.V0Api() + +try: + # Gets the latest data + api_response = api_instance.getv0_latest() + pprint(api_response) +except ApiException as e: + print("Exception when calling V0Api->getv0Latest: %s\n" % e)
+
+
+ +

Parameters

+ + + + + + +

Responses

+

Status: 200 - successful operation

+ + + +
+
+
+ +
+ +
+
+ +
+
+
+
+
+ +
+
- + + + + + + + + + + + + + -- cgit v1.2.3