{
  "openapi": "3.1.0",
  "info": {
    "title": "VenueScope API",
    "version": "1.0.0",
    "description": "Public, read only data about FFXIV venues and their events, as shown in the VenueScope plugin."
  },
  "servers": [
    {
      "url": "https://api.venuescope.club"
    }
  ],
  "paths": {
    "/v1/status": {
      "get": {
        "summary": "Check that the API is up",
        "responses": {
          "200": {
            "description": "The API answers",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Status"
                }
              }
            }
          }
        }
      }
    },
    "/v1/spotlights": {
      "get": {
        "summary": "Featured venues shown right now",
        "responses": {
          "200": {
            "description": "The list",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Spotlight"
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v1/spotlights/{id}": {
      "get": {
        "summary": "One featured venue",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The spotlight",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/Spotlight"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "Status": {
        "type": "object",
        "properties": {
          "status": {
            "type": "string"
          },
          "version": {
            "type": "string"
          }
        }
      },
      "Error": {
        "type": "object",
        "properties": {
          "error": {
            "type": "object",
            "properties": {
              "status": {
                "type": "integer"
              },
              "message": {
                "type": "string"
              }
            }
          }
        }
      },
      "Place": {
        "type": [
          "object",
          "null"
        ],
        "properties": {
          "world": {
            "type": "string"
          },
          "district": {
            "type": "string"
          },
          "ward": {
            "type": "integer"
          },
          "plot": {
            "type": "integer"
          }
        }
      },
      "Activity": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "start": {
            "type": "string"
          },
          "price": {
            "type": "string"
          },
          "payout": {
            "type": "string"
          },
          "note": {
            "type": "string"
          }
        }
      },
      "LineupEntry": {
        "type": "object",
        "properties": {
          "time": {
            "type": "string",
            "description": "Server time, like \"9 - 11 PM ST\""
          },
          "name": {
            "type": "string"
          },
          "link": {
            "type": "string"
          },
          "logoUrl": {
            "type": "string"
          }
        }
      },
      "Spotlight": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "tagline": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "imageUrl": {
            "type": "string"
          },
          "accentColor": {
            "type": "string",
            "description": "Hex colour, like #a855f7"
          },
          "banner": {
            "type": "object",
            "properties": {
              "title": {
                "type": "string"
              },
              "subtitle": {
                "type": "string"
              },
              "hideText": {
                "type": "boolean"
              }
            }
          },
          "place": {
            "$ref": "#/components/schemas/Place"
          },
          "startsAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "endsAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "priority": {
            "type": "integer"
          },
          "activities": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Activity"
            }
          },
          "lineup": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/LineupEntry"
            }
          },
          "links": {
            "type": "object",
            "properties": {
              "discord": {
                "type": "string"
              },
              "website": {
                "type": "string"
              }
            }
          }
        }
      }
    }
  }
}