aboutsummaryrefslogtreecommitdiff
path: root/swagger.yaml
blob: e761cb2c2bd6e63c0b8c98805c0a8e26885a8880 (plain) (blame)
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
swagger: "2.0"
info:
  description: "This is a simple API to retrieve current and historical data from the RIT COVID Dashboard."
  version: "1.0.0"
  title: "RIT COVID Poller"
  contact:
    email: "galen@galenguyer.com"
  license:
    name: "AGPL 3.0"
    url: "https://www.gnu.org/licenses/agpl-3.0.txt"
host: "ritcoviddashboard.com"
basePath: "/api"
tags:
- name: "v0"
  description: "The latest version of the API, subject to breaking changes"
schemes:
- "https"
paths:
  /v0/latest:
    get:
      tags:
      - "v0"
      summary: "Gets the latest data"
      description: "Returns the most recent data from the official dashboard"
      operationId: "getv0Latest"
      produces:
      - "application/json"
      responses:
        "200":
          description: "successful operation"
          schema:
            type: "object"
            $ref: "#/definitions/Day"
  /v0/history:
    get:
      tags:
      - "v0"
      summary: "Gets all historical data"
      description: "Returns data from every day where the dashboard changed"
      operationId: "getv0History"
      produces:
      - "application/json"
      responses:
        "200":
          description: "successful operation"
          schema:
            type: "array"
            items:
              $ref: "#/definitions/Day"
definitions:
  Day:
    type: "object"
    properties:
      alert_level:
        type: "string"
        enum:
        - "green"
        - "yellow"
        - "orange"
        - "red"
      beds_available:
        type: "integer"
        format: "int32"
      isolation_off_campus:
        type: "integer"
        format: "int32"
      isolation_on_campus:
        type: "integer"
        format: "int32"
      last_updated:
        type: "string"
        format: "date-time"
      new_staff:
        type: "integer"
        format: "int32"
      new_students:
        type: "integer"
        format: "int32"
      quarantine_off_campus:
        type: "integer"
        format: "int32"
      quarantine_on_campus:
        type: "integer"
        format: "int32"
      test_administered:
        type: "integer"
        format: "int32"
      total_staff:
        type: "integer"
        format: "int32"
      total_students:
        type: "integer"
        format: "int32"
    xml:
      name: "Day"
externalDocs:
  description: "Read the source on GitHub"
  url: "https://github.com/galenguyer/rit-covid-poller"