3.0.0 • Published 29 days ago

@nypl/scsb-rest-client v3.0.0

Weekly downloads
6
License
MIT
Repository
github
Last release
29 days ago

SCSBRestClient

This is a light wrapper around SCSB's RESTful interace.

Version

3.0.0

Install

With Github

"@nypl/scsb-rest-client": "https://github.com/NYPL/scsb-rest-client.git#BRANCH-OR-TAG-NAME"

With NPM

npm i @nypl/scsb-rest-client --save

Usage

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)
})

Supported Endpoints

See the SCSB swagger documentation for the authoritative documentation of each endpoint's params.

MethodEndpoint
getItemsAvailabilityForBarcodes(barcodes = [])/sharedCollection/itemAvailabilityStatus
requestItem(data = {})/requestItem/requestItem
search(data = {})/searchService/search
searchByParam(queryParams = {})/searchService/searchByParam(deprecated)

Contributing

  • Cut feature branch from main
  • After review, merge to main
  • Bump version in package.json & note changes in CHANGELOG.md
  • git tag -a v[version]
  • npm publish
3.0.0

29 days ago

2.0.0

2 years ago

1.0.6

4 years ago

1.0.5

6 years ago

1.0.4

7 years ago

1.0.3

7 years ago

1.0.2

7 years ago

1.0.1

7 years ago