JSPM

@kenxirwin/alma-search

0.2.0
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 4
  • Score
    100M100P100Q28974F
  • License MIT

Search ExLibris's Alma API for bibliographic records

Package Exports

  • @kenxirwin/alma-search
  • @kenxirwin/alma-search/index.js

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@kenxirwin/alma-search) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

Alma Search (npm package)

This is intended to be an importable npm package for searching Alma APIs from ExLibris.

Requirements

You will need an Alma API key with bib read permissions to use this.

Installation

npm install @kenxirwin/alma-search

SearchBibs

The first (only so far) module is SearchBibs. It allows searching by barcode, mms_id, holdings_id, ie_id, representation_id, nz_mms_id, cz_mms_id, or other_system_id.

Import the package with

import {SearchBibs} from @kenxirwin/alma-search

Instantiate the search object with:

const searchBibs = new SearchBibs({
baseUrl: 'https://api-na.hosted.exlibrisgroup.com', // or other regional url
apiKey: 'your-api-key',
});

For barcode searching use:

searchBibs.barcodeLookup('123456789');

For other ids, use something like:

const response = await searchBibs.bibById({
mms_id: '99939650000541,99939680000541', // supports multiple ids
});

Once you receive the bib item record by a lookup process, you can view holdings details looking up by mms_id, e.g.:

const response = await searchBibs.holdingsByMmsId('99939650000541');

You can get item-level data from an MmsId with:

const response = await searchBibs.holdingsItemsByMmsId('99939650000541');

or

const response = await searchBibs.holdingsItemsByMmsId('99939650000541', {limit: 20, offset: 20});

The holdingsItemsByMmsId functions supports all queryString params as well as the holding_id param described in the documentation

You can also follow any of the links returned to you by earlier searches with the followLink method. As with other methods, the API key will be added to the search by by the followLink method. Example:

const response = await searchBibs.followLink(
'https://api-na.hosted.exlibrisgroup.com/almaws/v1/bibs/99939680000541/holdings'
);