Higgins gets the news, and looks after it until it is required.
This server listens on specific URLs for news feeds. When a feed is requested, it checks for cached news (using pantry) then delivers it as JSON, fetching from the upstream URL beforehand if required.
Data is plain JSON by default. JSONP can be requested by adding a ?callback=yourCallbackFunctionNameHere
query parameter to the URL.
The cached news can be refreshed with another query.
Valid URL arguments are, in order:
http://[server]/v1/[feed-name][?forceRefresh=true][&[callback=callbackName]]
- Feed name: required.
- Force refresh: optional.
- Callback: for JSONP requests, optional.
Give me the Ministerial Media Statements feed:
curl http://[server]/v1/ministerials
Force a fetch of a new copy of the Commerce Media Releases feed:
curl http://[server]/v1/commerce-media?forceRefresh=true
A test instance of this app is running on Heroku at:
http://higgins-news.herokuapp.com/
Add JSONP capability.done!- Build a Ministerials feed from the Media Statements website.
- Build a live train departure times feed from the Transperth website (with x-ray).
- Add a unified feed endpoint with sorting via query string parameters.
- Add caching of search results into Memcached (via Pantry's support).
- Supply other feeds.
- Support GraphQL
This news tool thingy is released under the MIT License (see the license file) and is copyright Drew Robinson, 2016.