Nolan School Policies 2024-2025

Nolan School Policies 2024-2025 · GPT 작업

NWS Weather API

Access to weather data including forecasts, alerts, and observations.

  • GET /points/{latitude},{longitude}Get forecast grid endpoints for a specific location
  • GET /gridpoints/{office}/{gridX},{gridY}/forecastGet forecast for a given grid point
원본 API 스키마
{
  "openapi": "3.1.0",
  "info": {
    "title": "NWS Weather API",
    "description": "Access to weather data including forecasts, alerts, and observations.",
    "version": "1.0.0"
  },
  "servers": [
    {
      "url": "https://api.weather.gov",
      "description": "Main API Server"
    }
  ],
  "paths": {
    "/points/{latitude},{longitude}": {
      "get": {
        "operationId": "getPointData",
        "summary": "Get forecast grid endpoints for a specific location",
        "parameters": [
          {
            "name": "latitude",
            "in": "path",
            "required": true,
            "schema": {
              "type": "number",
              "format": "float"
            },
            "description": "Latitude of the point"
          },
          {
            "name": "longitude",
            "in": "path",
            "required": true,
            "schema": {
              "type": "number",
              "format": "float"
            },
            "description": "Longitude of the point"
          }
        ],
        "responses": {
          "200": {
            "description": "Successfully retrieved grid endpoints",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "properties": {
                      "type": "object",
                      "properties": {
                        "forecast": {
                          "type": "string",
                          "format": "uri"
                        },
                        "forecastHourly": {
                          "type": "string",
                          "format": "uri"
                        },
                        "forecastGridData": {
                          "type": "string",
                          "format": "uri"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/gridpoints/{office}/{gridX},{gridY}/forecast": {
      "get": {
        "operationId": "getGridpointForecast",
        "summary": "Get forecast for a given grid point",
        "parameters": [
          {
            "name": "office",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Weather Forecast Office ID"
          },
          {
            "name": "gridX",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            },
            "description": "X coordinate of the grid"
          },
          {
            "name": "gridY",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            },
            "description": "Y coordinate of the grid"
          }
        ],
        "responses": {
          "200": {
            "description": "Successfully retrieved gridpoint forecast",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "properties": {
                      "type": "object",
                      "properties": {
                        "periods": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "number": {
                                "type": "integer"
                              },
                              "name": {
                                "type": "string"
                              },
                              "startTime": {
                                "type": "string",
                                "format": "date-time"
                              },
                              "endTime": {
                                "type": "string",
                                "format": "date-time"
                              },
                              "temperature": {
                                "type": "integer"
                              },
                              "temperatureUnit": {
                                "type": "string"
                              },
                              "windSpeed": {
                                "type": "string"
                              },
                              "windDirection": {
                                "type": "string"
                              },
                              "icon": {
                                "type": "string",
                                "format": "uri"
                              },
                              "shortForecast": {
                                "type": "string"
                              },
                              "detailedForecast": {
                                "type": "string"
                              }
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}