1.0.1 • Published 7 years ago

koop-provider-ukcrime v1.0.1

Weekly downloads
1
License
Apache-2.0
Repository
github
Last release
7 years ago

Build Status Greenkeeper badge

Koop UK Crime Provider

This is provider was created from the koop sample that demonstrates how to build a Koop Provider. Full documentation is provided here.

The data source in this case is the UK Police Street Level Crime API.

License

Files

FileDescription
index.jsMandatoryConfigures provider for usage by Koop
model.jsMandatoryTranslates remote API to GeoJSON
routes.jsOptionalSpecifies additional routes to be handled by this provider
controller.jsOptionalHandles additional routes specified in routes.js
server.jsOptionalReference implementation for the provider
test/model-test.jsOptionaltests the getData function on the model
test/fixtures/input.jsonOptionala sample of the raw input from the 3rd party API
config/default.jsonOptionalused for advanced configuration, usually API keys.

Test it out

Run server:

  • npm install
  • npm start

Example API Query:

  • curl localhost:8080/ukcrime/FeatureServer/0/query?returnCountOnly=true

Tests:

  • npm test

With Docker

  • docker build -t koop-provider-ukcrime .
  • docker run -it -p 8080:8080 koop-provider-ukcrime