@nypl/scsb-rest-client
A light wrapper around SCSB's RESTful interface
Last updated a month ago by nonword .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install @nypl/scsb-rest-client 
SYNC missed versions from official npm registry.

SCSBRestClient

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

Version

1.0.6

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 SCSBRestClient = require('@nypl/scsb-rest-client')

let scsbClient = new SCSBRestClient({ 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.

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

Git Workflow

When you accept a PR - you should:

  • Do a version bump in master.
  • push a tag named "vTHEVERSION" (e.g. "v1.0.1")

Changelog

v1.0.2

Added

  • Added new function addRequestItem to SCSBClient.
  • Added unit tests via chai-as-promised to test new function addRequestItem.

Updated

  • Updated ReadMe to reflect new version and added documentation for addRequestItem function.

v1.0.3

Added

  • .search()

Deprecated

  • .searchByParam()

v1.0.4

Updated

  • Updated NPM packages to address npm request module bug #1595

v1.0.5

Updated

  • Updated request, mocha, standard to address vulnerabilities

v1.0.6

  • Updated dependencies for vulnerabilities

Current Tags

  • 1.0.6                                ...           latest (a month ago)

6 Versions

  • 1.0.6                                ...           a month ago
  • 1.0.5                                ...           2 years ago
  • 1.0.4                                ...           3 years ago
  • 1.0.3                                ...           3 years ago
  • 1.0.2                                ...           3 years ago
  • 1.0.1                                ...           3 years ago
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 19
Dependencies (1)
Dev Dependencies (4)
Dependents (0)
None

Copyright 2014 - 2016 © taobao.org |