KO
|
EN
gitlite — search
Search
#python
#java
#python3
#arduino
#golang
#machine-learning
#rust
#html
#flask
#javascript
#seismology
#nodejs
csw-client
★ 11
Open GitHub ↗
A very simple CSW client
Download README (.md)
Explore Similar Repositories
docker-python2.7
:
My Python 2.7 Docker base (micktwomey/python2.7)
moodstocks-api-clients
:
Clients for the Moodstocks HTTP API
focuslight-validator
:
Validate http request parameters (or others) by defined rule, without models.
poodr
:
My notes for Sandi Metz's great OOD book, "Practical Object-Oriented Design in Ruby." Rewrote her tests from Minitest to RSpec.
napi-bash
:
Pobieranie polskich napisów do filmów przy użyciu bazy NapiProjektu..
// repository documentation
Was this content helpful?
★ 0
(0 ratings)
Select Rating:
★
★
★
★
★
Submit Feedback
Recent Feedback
×
Download README
Do you want to download the
README.md
file for
csw-client
?
Download (.md)
# csw-client [](https://circleci.com/gh/geodatagouv/csw-client) > A very simple CSW client [](https://www.npmjs.com/package/csw-client) [](https://david-dm.org/geodatagouv/csw-client) [](https://codecov.io/gh/geodatagouv/csw-client) [](https://github.com/xojs/xo) ## Prerequisite * [Node.js](https://nodejs.org) >= 8.0 ## Features * Fetch capabilities * Fetch records * Harvest (w/ Stream API) * Support ISO 19139 (including Inspire profile) * Support Dublin Core ## Installation ```js npm install csw-client ``` ## Usage ### Create a client ```js const csw = require('csw-client'); const client = csw('http://your-csw-server.tld/csw', options); ``` #### Options | Name | Description | Type | Default value | | ---- | ----------- | ---- | ------------- | | `userAgent` | User-Agent string you want to use in requests | `string` | `"CSWBot"` | | `gzip` | enable compression | `boolean` | `true` | | `timeout` | requests will fail after X ms | `integer` | _disabled_ | ### Harvest #### Stream API ```js client.harvest(options).pipe(outputStream); ``` #### Alternative ```js client.harvest(options) .on('record', record => console.log(record.type)) .on('error', err => console.error(err)) .on('end', () => console.log('Finished!')) .resume(); ``` #### Options | Name | Description | Type | Default value | | ---- | ----------- | ---- | ------------- | | `step` | number of records asked by `GetRecords` request | `integer` | `20` | | `concurrency` | number of concurrent `GetRecords` requests | `integer` | `5` | #### Events | Name | Description | Properties | | ---- | ----------- | ---------- | | `record` | a new record is found | `type`: record type<br>`body`: [parsed value](https://github.com/sgmap-inspire/parsers) | | `started` | harvesting has started | _none_ | | `failed` | harvesting has failed | _none_ | | `end` | harvesting has ended | _none_ |