This repository has been archived by the owner on Jan 6, 2020. It is now read-only.
Model Classes for gridPoints, forecasts, and alerts #9
Labels
enhancement
New feature or request
good first issue
Good for newcomers
help wanted
Extra attention is needed
(You can find this data in the Contributing markup, or at https://www.weather.gov/documentation/services-web-api)
To check the weather for your area, you first have to supply lat and long coordinates to https://api.weather.gov/points/ to grab your forecast zone. So if I'm in New York City, for example, I can find my forecast zone by hitting https://api.weather.gov/points/40.6171,-74.0133.
Once you can lookup your forecast zone, you can call for either a 7 day forecast (https://api.weather.gov/gridpoints/OKX/33,30/forecast for example), an hourly forecast (https://api.weather.gov/gridpoints/OKX/33,30/forecast/hourly) or you can check your station for weather alerts (https://api.weather.gov/alerts/active/zone/NYZ075).
We need classes in the model of the MVP pattern to store the data you can obtain from these API calls. These classes will eventually be the middlemen between the DataManager, and the database helpers, so all of the MVP logic is removed from these classes, which makes them great for a first issue! We'll need a gridPoint class that has relevant data (such as the forecastZoneID, lat/long, and URLs for grabbing the different forecasts), a forecast class that has relevant data from the 2 forecast API calls (feel free to leave comments on what should be "relevant data"), and an alert class for relevant data on any alerts that are in a zone requested from the API call.
Feel free to leave comments if you want to take this issue on, or if you have questions. Be sure to hit the example API URLs mentioned above to get a good idea of the relevant data we can grab from the API requests!
The text was updated successfully, but these errors were encountered: