0.18.3 • Published 6 years ago
csw-client v0.18.3
csw-client 
A very simple CSW client
Prerequisite
- Node.js >= 8.0
Features
- Fetch capabilities
- Fetch records
- Harvest (w/ Stream API)
- Support ISO 19139 (including Inspire profile)
- Support Dublin Core
Installation
npm install csw-clientUsage
Create a client
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
client.harvest(options).pipe(outputStream);Alternative
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 typebody: parsed value |
started | harvesting has started | none |
failed | harvesting has failed | none |
end | harvesting has ended | none |
0.18.3
6 years ago
0.18.2
7 years ago
0.18.1
7 years ago
0.18.0
7 years ago
0.17.0
8 years ago
0.16.0
8 years ago
0.15.1
8 years ago
0.15.0
8 years ago
0.14.0
8 years ago
0.13.0
8 years ago
0.12.3
9 years ago
0.12.2
9 years ago
0.12.1
9 years ago
0.12.0
9 years ago
0.11.0
9 years ago
0.10.0
9 years ago
0.9.0
9 years ago
0.7.1
9 years ago
0.8.0
9 years ago
0.7.0
9 years ago
0.6.0
10 years ago
0.5.1
10 years ago
0.5.0
10 years ago
0.4.0
10 years ago
0.3.0
10 years ago
0.2.0
11 years ago
0.1.5
11 years ago
0.1.4
12 years ago