https://github.com/timwis/koop-odata
OData API functionality for esri/koop
https://github.com/timwis/koop-odata
Last synced: 24 days ago
JSON representation
OData API functionality for esri/koop
- Host: GitHub
- URL: https://github.com/timwis/koop-odata
- Owner: timwis
- License: apache-2.0
- Created: 2015-07-16T11:45:13.000Z (almost 10 years ago)
- Default Branch: master
- Last Pushed: 2015-08-06T00:02:40.000Z (over 9 years ago)
- Last Synced: 2025-04-11T23:13:34.239Z (24 days ago)
- Language: JavaScript
- Size: 133 KB
- Stars: 5
- Watchers: 3
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# OData Interface for [Koop](https://github.com/koopjs/koop)
This plugin makes it possible to interact with Koop's [many providers](https://github.com/koopjs/koopjs.github.io/blob/master/docs/providers.md)
using an [OData-compliant API](http://www.odata.org/).**Note:** This plugin only works when used with these versions of [koop](https://github.com/timwis/koop) and [koop-ckan](https://github.com/timwis/koop-ckan). They've been submitted as pull requests, so this plugin is more of a proof of concept until they're merged.
# Installation
```bash
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](https://github.com/koopjs/koop#registering-providers)```javascript
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:
```xml
1941 Christian Street
<_id>4
<X>-75.17548258333102X>
39.94122652163324
4
2015-04-06T00:00:00
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