This is a light wrapper around SCSB's RESTful interace.
3.0.0
"@nypl/scsb-rest-client": "https://github.com/NYPL/scsb-rest-client.git#BRANCH-OR-TAG-NAME"
npm i @nypl/scsb-rest-client --save
const scsbClient = require('@nypl/scsb-rest-client')
scsbClient.config({
url: "http://theurl.example.com:theports",
apiKey: "anAPIKEY"
})
let myResponse = scsbClient.getItemsAvailabilityForBarcodes(this.barcodes)
.then((response) => {
// do something with the response
})
.catch((error) => {
// log this error and...
return Promise.reject(error)
})
See the SCSB swagger documentation for the authoritative documentation of each endpoint's params.
Method | Endpoint |
---|---|
getItemsAvailabilityForBarcodes(barcodes = []) |
/sharedCollection/itemAvailabilityStatus |
requestItem(data = {}) |
/requestItem/requestItem |
search(data = {}) |
/searchService/search |
searchByParam(queryParams = {}) |
/searchService/searchByParam (deprecated) |
- Cut feature branch from
main
- After review, merge to
main
- Bump version in
package.json
& note changes inCHANGELOG.md
git tag -a v[version]
npm publish