0.1.2 • Published 9 years ago

wms-item-availability v0.1.2

Weekly downloads
2
License
MIT
Repository
github
Last release
9 years ago

WMS Item Availability

Build Status

Using an OCLC number, check the availability of an item at an institution.

Note: Though the Availability API does return bibliographic data, this module only returns information regarding the item's local availability: available, barcode, shelving location, call number, etc.

usage

npm install wms-item-availability
var WSKey = require('oclc-wskey')
var ItemAvailability = require('wms-item-availability')
var key = new WSKey('public_key', 'secret')
var instId = 128807
var avail = ItemAvailability(key, instId)

avail.query(123456, function (err, holdings) {
  if (err) throw err

  console.log(holdings.length)
})

var avail = new ItemAvailability(wskey, institutionId)

Requires a WSKey to be passed (used for creating an Authorization header). institutionId is your institution's OCLC numerical ID (the OCLC example ID is 128807).

avail.query(oclcNumber, callback)

Queries the institution for holdings of an item with the OCLC number. callback takes (error, holdings) as parameters, where holdings is an array of holding objects (see Availability fields below for keys).

Availability fields

from Availability API docs. Items in italic are not always returned ("not required" per the api). volumes and circulations are arrays.

NAMEDESCRIPTION
typeOfRecordThe type comes from the MARC Holdings LDR 06
encodingLevelThe encoding level of record comes from the MARC LDR 017
formatThe format comes from the MARC Holdings 007
receiptAcqStatusThe acquisitions receipt status from the MARC Holdings 008 06
generalRetentionGeneral retention policy from the MARC Holdings 008 12
completenessCompleteness from the MARC Holdings 008 16
dateOfReportDate of report from the MARC Holdings 008
nucCodeLocation from the MARC Holdings 852 $a
localLocationSublocation or collection from the MARCHoldings 852 $b
shelvingLocationShelving Location from the MARC Holdings 852 $c
callNumberCall number from the MARC Holdings 852 $h
copyNumberCopy number from the MARC Holdings 852 $t
enumAndChronSummary enumerations and chronology information for serial
volumesElement that contains the volumes if the item has any
volumes/volumeElement that contains the information for each volume
volumes/volume/enumerationPeriodical enumeration information
volumes/volume/chronologyPeriodical chronology information
volumes/volume/enumAndChronPeriodical enumeration/chronology information
circulationsElement that contains circulation elements
circulations/circulationElement that contains circulation information for each volume
circulations/circulation/availableNowIf the item is available or not
circulations/circulation/availabilityDateIf the item isn't available when is it expected to be available. Typically the due date in the system for the item
circulations/circulation/itemIdThe item barcode
circulations/circulation/renewableIf the item is renewable or not
circulations/circulation/onHoldIf the item has holds placed on it or not
circulations/circulation/onHold/enumAndChronPeriodical enumeration/chronology information