csw-client
A very simple CSW client
- Fetch capabilities
- Fetch records
- Harvest (w/ Stream API)
- Support ISO 19139 (including Inspire profile)
- Support Dublin Core
const csw = require('csw-client');
const client = csw('http://your-csw-server.tld/csw', 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 |
client.harvest(options).pipe(outputStream);
client.harvest(options)
.on('record', record => console.log(record.type))
.on('error', err => console.error(err))
.on('end', () => console.log('Finished!'))
.resume();
Name |
Description |
Type |
Default value |
step |
number of records asked by GetRecords request |
integer |
20 |
concurrency |
number of concurrent GetRecords requests |
integer |
5 |
Name |
Description |
Properties |
record |
a new record is found |
type : record type
body : parsed value |
started |
harvesting has started |
none |
failed |
harvesting has failed |
none |
end |
harvesting has ended |
none |