Weather Application - katman22/pumanawa_kam GitHub Wiki

Pumanawa Weather Application

NOAA.gov API

Visit: https://www.weather.gov/documentation/services-web-api for information specific to "Content Negotiation"

Content Negotiation (NOAA.gov)

The new API will use headers to modify the version and format of the response. Every request, either by browser or application, sends header information every time you visit any website. For example, a commonly used header called "UserAgent" tells a website what type of device you are using so it can tailor the best experience for you. No private information is shared in a header, and this is a standard practice for all government and private sites. Developers can override these headers for specific purposes (see the "API Specifications" tab for more information). You can get full details by visiting the header field definitions page at the World Wide Web Consortium site.

https://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html

OpenCage GEOCoding API

Geocoding service of some type is needed to convert addresses I.E. city, state or zip; into latitude and longitude which is needed for NOAA api responses. Note: An account is needed to use free service.

https://opencagedata.com/

Application Services

Both API calls using HTTParty were extracted into a service PORO class. Services are used to create a pattern for further development utilizing external APIs and will also aid with code management and scalability.