https://github.com/natlibfi/aleph-x-query
A module for querying records from Aleph X-service
https://github.com/natlibfi/aleph-x-query
Last synced: over 1 year ago
JSON representation
A module for querying records from Aleph X-service
- Host: GitHub
- URL: https://github.com/natlibfi/aleph-x-query
- Owner: NatLibFi
- License: lgpl-3.0
- Created: 2015-08-13T06:54:07.000Z (almost 11 years ago)
- Default Branch: master
- Last Pushed: 2017-10-25T18:42:04.000Z (over 8 years ago)
- Last Synced: 2025-01-21T14:46:24.946Z (over 1 year ago)
- Language: JavaScript
- Homepage:
- Size: 11.7 KB
- Stars: 0
- Watchers: 9
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# A module for querying records from Aleph X-service
## Installation
```
npm install aleph-x-query
```
## Usage
To query an index (op=find):
```
AlephXServices = require('aleph-x-query');
var aleph = new AlephXServices({
Xendpoint: 'http://my-aleph-installation/X'
});
// The parameters are: base, index, and query term.
var base = 'fin11';
var index = 'WNA';
var searchTerm = 'Virtanen';
aleph.query(base, index, searchTerm).then(function(records) {
// do something with records. The records are instances of marc-record-js
}).catch(function(e) {
// handle errors
}).done();
```
## License and copyright
Copyright (c) 2015-2017 University Of Helsinki (The National Library Of Finland)
This project's source code is licensed under the terms of **GNU Lesser General Public License Version 3** or any later version.