wms-item-availability
v0.1.2
Published
Using an OCLC number, check the availability of an item at an institution.
Downloads
1
Readme
WMS Item Availability
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][#availability-fields] 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.
NAME | DESCRIPTION -----------------------------------------------|------------------- typeOfRecord | The type comes from the MARC Holdings LDR 06 encodingLevel | The encoding level of record comes from the MARC LDR 017 format | The format comes from the MARC Holdings 007 receiptAcqStatus | The acquisitions receipt status from the MARC Holdings 008 06 generalRetention | General retention policy from the MARC Holdings 008 12 completeness | Completeness from the MARC Holdings 008 16 dateOfReport | Date of report from the MARC Holdings 008 nucCode | Location from the MARC Holdings 852 $a localLocation | Sublocation or collection from the MARCHoldings 852 $b shelvingLocation | Shelving Location from the MARC Holdings 852 $c callNumber | Call number from the MARC Holdings 852 $h copyNumber | Copy number from the MARC Holdings 852 $t enumAndChron | Summary enumerations and chronology information for serial volumes | Element that contains the volumes if the item has any volumes/volume | Element that contains the information for each volume volumes/volume/enumeration | Periodical enumeration information volumes/volume/chronology | Periodical chronology information volumes/volume/enumAndChron | Periodical enumeration/chronology information circulations | Element that contains circulation elements circulations/circulation | Element that contains circulation information for each volume circulations/circulation/availableNow | If the item is available or not circulations/circulation/availabilityDate | If the item isn't available when is it expected to be available. Typically the due date in the system for the item circulations/circulation/itemId | The item barcode circulations/circulation/renewable | If the item is renewable or not circulations/circulation/onHold | If the item has holds placed on it or not circulations/circulation/onHold/enumAndChron | Periodical enumeration/chronology information