Last active
August 1, 2024 13:09
-
-
Save youtube-jocoding/fe5f4dbd4eeb9909282ae057cee24d7a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"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