날씨 정보 전문가

날씨 정보 전문가 · GPT Actions

7Timer Weather Forecast API

Provides weather forecast data for various purposes, including astronomy, civil use, and meteorology.

  • GET /api.plFetches weather forecast data.
原始 API 定义
{
  "openapi": "3.0.0",
  "info": {
    "title": "7Timer Weather Forecast API",
    "description": "Provides weather forecast data for various purposes, including astronomy, civil use, and meteorology.",
    "version": "1.0.0"
  },
  "servers": [
    {
      "url": "https://www.7timer.info/bin/",
      "description": "Main API Server"
    }
  ],
  "paths": {
    "/api.pl": {
      "get": {
        "operationId": "getWeatherForecast",
        "summary": "Fetches weather forecast data.",
        "parameters": [
          {
            "name": "lon",
            "in": "query",
            "required": true,
            "description": "Longitude of the location",
            "schema": {
              "type": "number",
              "format": "float"
            }
          },
          {
            "name": "lat",
            "in": "query",
            "required": true,
            "description": "Latitude of the location",
            "schema": {
              "type": "number",
              "format": "float"
            }
          },
          {
            "name": "product",
            "in": "query",
            "required": true,
            "description": "Type of forecast product",
            "schema": {
              "type": "string",
              "enum": [
                "astro",
                "civil",
                "civillight",
                "meteo",
                "two"
              ]
            }
          },
          {
            "name": "output",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "xml",
                "json"
              ]
            },
            "description": "Output format"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response with weather data",
            "content": {
              "application/xml": {
                "schema": {
                  "type": "string"
                }
              },
              "application/json": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "default": {
            "description": "Unexpected error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "Error": {
        "type": "object",
        "properties": {
          "code": {
            "type": "integer",
            "format": "int32"
          },
          "message": {
            "type": "string"
          }
        }
      }
    }
  }
}