Koop
OData Interface forThis plugin makes it possible to interact with Koop's many providers using an OData-compliant API.
Note: This plugin only works when used with these versions of koop and koop-ckan. They've been submitted as pull requests, so this plugin is more of a proof of concept until they're merged.
Installation
npm install koop-odata
Registering the plugin
To use this plugin in your koop instance, register it the same way you'd register providers as demonstrated in koop's documentation
koop;
Usage
Append /odata
to your normal query to interact with the resource with an OData API, for instance:
http://localhost:1337/ckan/phl/heart-healthy-screening-sites/odata?&$filter=ZIP_CODE%20eq%2019146
will produce an OData XML object like:
4 <X>-75.17548258333102</X> 39.94122652163324 4 2015-04-06T00:00:00 10:30 AM - 12 PM 1941 Christian Street Philadelphia PA 19146 Blood Pressure Only Contact Jefferson University Hospital - Blood Pressure Plus 215-955-3817
Supported
$filter=
with eq, ne, lt, le, gt, ge, and, or
Unsupported
$select=
(requires more significant changes to koop codebase)$top=
(requires more significant changes to koop codebase)$skip=
(requires more significant changes to koop codebase)- Individual resources, ie
People('johndoe')
- Probably other methods that just haven't been coded yet