Skip to content
forked from ocean/collator

Higgins gets the news and looks after it until it is required.

License

Notifications You must be signed in to change notification settings

cyruseftos/higgins

 
 

Repository files navigation

Higgins

Travis CI Build Status David dependencies Coveralls coverage Code Climate

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:

https://[server]/v1/[feed-name][?forceRefresh=true][&[callback=callbackName]]
  • Feed name: required.
  • Force refresh: optional.
  • Callback: for JSONP requests, optional.

Usage

Give me the Ministerial Media Statements feed:

curl https://[server]/v1/ministerials

Force a fetch of a new copy of the Commerce Media Releases feed:

curl https://[server]/v1/commerce-media?forceRefresh=true

Test instance

A test instance of this app is running on Heroku at:

https://higgins-news.herokuapp.com/

TODO

  • 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

License

This news tool thingy is released under the MIT License (see the license file) and is copyright Drew Robinson, 2016.

About

Higgins gets the news and looks after it until it is required.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • CSS 48.6%
  • JavaScript 38.1%
  • HTML 13.3%