Skip to content

Instantly share code, notes, and snippets.

@youtube-jocoding
Last active January 19, 2024 15:33
Show Gist options
  • Save youtube-jocoding/fe5f4dbd4eeb9909282ae057cee24d7a to your computer and use it in GitHub Desktop.
Save youtube-jocoding/fe5f4dbd4eeb9909282ae057cee24d7a to your computer and use it in GitHub Desktop.
{
"openapi": "3.0.0",
"info": {
"title": "7Timer Weather Forecast API",
"description": "API for accessing weather forecasts from 7Timer.",
"version": "1.0.0"
},
"servers": [
{
"url": "https://www.7timer.info",
"description": "Main API Server"
}
],
"paths": {
"/bin/api.pl": {
"get": {
"operationId": "getWeatherForecast",
"summary": "Get Weather Forecast",
"description": "Retrieves weather forecast data based on geographic coordinates, product type, and output format.",
"parameters": [
{
"name": "lon",
"in": "query",
"required": true,
"description": "Longitude of the location. Geographic coordinates of the specified site, must be given as pure float numbers, such as +23.090 or -23.090. At this stage, the precision of any incoming coordinate float number is expected to be 0.001. Incoming float with higher precision will be rounded.",
"schema": {
"type": "number",
"format": "float"
}
},
{
"name": "lat",
"in": "query",
"required": true,
"description": "Latitude of the location. Geographic coordinates of the specified site, must be given as pure float numbers, such as +23.090 or -23.090. At this stage, the precision of any incoming coordinate float number is expected to be 0.001. Incoming float with higher precision will be rounded.",
"schema": {
"type": "number",
"format": "float"
}
},
{
"name": "product",
"in": "query",
"required": true,
"description": "Type of the forecast product use civillight only.",
"schema": {
"type": "string",
"enum": [
"civillight"
]
}
},
{
"name": "output",
"in": "query",
"required": true,
"description": "Output format (xml or json)",
"schema": {
"type": "string",
"enum": [
"xml",
"json"
]
}
}
],
"responses": {
"200": {
"description": "Successful response with weather data"
},
"default": {
"description": "Unexpected error"
}
}
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment