Skip to content

Instantly share code, notes, and snippets.

@mjmenger
Last active August 1, 2023 01:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mjmenger/852519239771899cb0482db4a790540e to your computer and use it in GitHub Desktop.
Save mjmenger/852519239771899cb0482db4a790540e to your computer and use it in GitHub Desktop.
weather.gov
#
# https://www.weather.gov/documentation/services-web-api
# home
# @latitude = 45.479293180527236
# @longitude = -122.67109294416308
# Willamette Sailing Club
@latitude = 45.47959408818095
@longitude = -122.67105002964772
# @name grid
GET https://api.weather.gov/points/{{latitude}},{{longitude}}
###
@office = {{grid.response.body.properties.gridId}}
@gridx = {{grid.response.body.properties.gridX}}
@gridy = {{grid.response.body.properties.gridY}}
# @name forecast
GET https://api.weather.gov/gridpoints/{{office}}/{{gridx}},{{gridy}}/forecast
###
# @name forecasthourly
GET https://api.weather.gov/gridpoints/{{office}}/{{gridx}},{{gridy}}/forecast/hourly
###
# @name stations
GET https://api.weather.gov/gridpoints/{{office}}/{{gridx}},{{gridy}}/stations
###
# @name alerts
GET https://api.weather.gov/alerts
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment