Abstract out data request functionality into base class for VC's with dynamic content
Opened this issue · 0 comments
lukereichold commented
In the app, the content in many of the views are generated dynamically with data pulled from a web-service (i.e. the news ticker, Upcoming Events, Angel Power, trivia game, etc). Currently, each of these separate controllers have to check for network reachability, request a JSON payload at a specified URL, and parse it.
We should abstract this functionality out into a base class that provides implementations for these common functions (reachability checking and requesting/parsing JSON data). Then, each of these controllers could inherit this functionality and use metadata provided with their initialization (e.g. URL endpoint from which to request JSON data).