npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

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

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][#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