koop-odata
This plugin makes it possible to interact with Koop's many providers using an OData-compliant API
Last updated 5 years ago by timwis .
Apache-2.0 · Original npm · Tarball · package.json
$ cnpm install koop-odata 
SYNC missed versions from official npm registry.

OData Interface for Koop

This 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.register(odata);

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:

<d>
	<properties>
		<_id>4</_id>
		<X>-75.17548258333102</X>
		<Y>39.94122652163324</Y>
		<OBJECTID>4</OBJECTID>
		<DATE_>2015-04-06T00:00:00</DATE_>
		<TIME>10:30 AM - 12 PM</TIME>
		<ADDRESS>1941 Christian Street</ADDRESS>
		<LOCATION />
		<CITY>Philadelphia</CITY>
		<STATE>PA</STATE>
		<ZIP_CODE>19146</ZIP_CODE>
		<SCREENING_TYPE>Blood Pressure Only</SCREENING_TYPE>
		<CONTACT_INFORMATION>Contact Jefferson University Hospital - Blood Pressure Plus</CONTACT_INFORMATION>
		<PHONE_NUMBER>215-955-3817</PHONE_NUMBER>
	</properties>
</d>

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

Current Tags

  • 1.0.0                                ...           latest (5 years ago)

1 Versions

  • 1.0.0                                ...           5 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 0
Dependencies (2)
Dev Dependencies (0)
None
Dependents (0)
None

Copyright 2014 - 2016 © taobao.org |