Data Service: EventService
A data service is requires to encapsulate all API interactions for earthquake events. This service will be responsible for requesting the proper geo-json data from the events feed. This service will make HTTP requests to the event feed url specified below, and will return an observable of the appropriate geo-json entity model.
Specifications:
- Feed URL: https://earthquake.usgs.gov/earthquakes/feed/v1.0/summary/.geojson
- Feed Docs: https://earthquake.usgs.gov/earthquakes/feed/v1.0/geojson.php
Acceptance Criteria:
- Should provide a 'loadAll' method:
- Should accept
criteria
of typeEventFilter
as optional parameter - Should return
Observable
ofEventGeo
- Should throwError of
EventGeoError