A light wrapper around SCSB's RESTful interface
npm install @nypl/scsb-rest-clientThis is a light wrapper around SCSB's RESTful interace.
```
"@nypl/scsb-rest-client": "https://github.com/NYPL/scsb-rest-client.git#BRANCH-OR-TAG-NAME"
`js`
npm i @nypl/scsb-rest-client --save
`javascript
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 mainmain
- After review, merge to package.json
- Bump version in & note changes in CHANGELOG.mdgit tag -a v[version]
- npm publish`
-