Food for Thought

Food for Thought · GPT Actions

Get weather data

Retrieves current weather data for a given latitude and longitude for recipe consideration.

  • GET /v1/forecastGetCurrentWeather

    Get temperature for a specific location for recipe consideration.

原始 API 定义
{
  "openapi": "3.1.0",
  "info": {
    "title": "Get weather data",
    "description": "Retrieves current weather data for a given latitude and longitude for recipe consideration.",
    "version": "v1.0.0"
  },
  "servers": [
    {
      "url": "https://api.open-meteo.com"
    }
  ],
  "paths": {
    "/v1/forecast": {
      "get": {
        "description": "Get temperature for a specific location for recipe consideration.",
        "operationId": "GetCurrentWeather",
        "parameters": [
          {
            "name": "latitude",
            "in": "query",
            "description": "The latitude to retrieve the weather for",
            "required": true,
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "longitude",
            "in": "query",
            "description": "The longitude to retrieve the weather for",
            "required": true,
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "hourly",
            "in": "query",
            "description": "The longitude to retrieve the weather for",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "temperature_2m,precipitation,snowfall,wind_speed_10m,relative_humidity_2m,cloud_cover"
              ]
            }
          }
        ],
        "deprecated": false,
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GetCurrentWeatherResponse"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "GetCurrentWeatherResponse": {
        "type": "object",
        "properties": {}
      }
    }
  }
}