
Security News
Feross on TBPN: How North Korea Hijacked Axios
Socket CEO Feross Aboukhadijeh breaks down how North Korea hijacked Axios and what it means for the future of software supply chain security.
sierra-wrapper
Advanced tools
A basic node wrapper for the III Sierra v3 API
The wrapper currently only supports:
More endpoint will be added as the need arises.
To use make sure you have your credentials stored in a json file in the format:
{
"key": "YOURKEY",
"secret": "YOURSECRET",
"base": "https://your.domain.name.org/iii/sierra-api/v3/"
}
You then authorize and request by
var wrapper = require('sierra-wrapper')
var loadedConfig = wrapper.loadConfig('./path/to/config.json')
wrapper.auth((error, results) => {
if (error) console.log(error)
wrapper.requestSingleBib('14628261', (errorBibReq, results) => {
if (errorBibReq) console.log(errorBibReq)
console.log(results)
})
})
You can also set your credentials via enviorment variables: SIERRA_KEY, SIERRA_SECRET, SIERRA_BASE
booleanLoads a congig object, passed or from disk
Requests an auth token from the sierra API and stores it for future use, it also setups a time to renew the token
Requests a single bib data from the API
Return format: { data: { total: 1, entries: [ [Object] ] }, url: 'https://catalog.library.org/iii/sierra-api/v3/bibs/17292415?fields=default,fixedFields,varFields,normTitle,normAuthor,orders,locations' }
Requests a bib range from the API
Return format: { data: { total: 1, entries: [ [Object] ] }, url: 'https://catalog.library.org/iii/sierra-api/v3/bibs/?limit=1&id=17292415&fields=default,fixedFields,varFields,normTitle,normAuthor,orders,locations' }
Requests an item range from the API
Return format: { data: { total: 1, entries: [ [Object] ] }, url: 'https://catalog.library.org/iii/sierra-api/v3/items/?limit=1&id=17292415&fields=default,fixedFields,varFields,normTitle,normAuthor,orders,locations' }
Requests all the items of a specified bib id Return format: { data: { total: 2, entries: [ [Object], [Object] ] }, url: [ 'https://catalog.library.org/iii/sierra-api/v3/items/?bibIds=17292415&fields=default,fixedFields,varFields&offset=0' ] }
Requests multiple bibs, but no orders or locations
Return format: { data: { total: 1, entries: [ [Object] ] }, url: 'https://catalog.library.org/iii/sierra-api/v3/bibs/?id=14628261,14628262,14628263,14628264,14628265,14628266,14628267,14628268,14628269,14628270&fields=default,fixedFields,varFields,normTitle,normAuthor' }
Requests multiple items
Return format: { data: { total: 1, entries: [ [Object] ] }, url: 'https://catalog.library.org/iii/sierra-api/v3/items/?id=10000000,10000100,10000200,10000300,10000400,10000500,10000600,10000700,10000800,10000900,10001000&fields=default,fixedFields,varFields' }
booleanLoads a congig object, passed or from disk
Kind: global function
Returns: boolean - did it load or not
| Param | Type | Description |
|---|---|---|
| configOrFile | object | string | The object with the credentials or a path to a json file with the credentials |
Requests an auth token from the sierra API and stores it for future use, it also setups a time to renew the token
Kind: global function
| Param | Type | Description |
|---|---|---|
| cb | function | callback |
Requests a single bib data from the API
Return format: { data: { total: 1, entries: [ [Object] ] }, url: 'https://catalog.library.org/iii/sierra-api/v3/bibs/17292415?fields=default,fixedFields,varFields,normTitle,normAuthor,orders,locations' }
Kind: global function
| Param | Type | Description |
|---|---|---|
| bibId | string | the bnumber of the bib you want to request |
| cb | function | callback |
Requests a bib range from the API
Return format: { data: { total: 1, entries: [ [Object] ] }, url: 'https://catalog.library.org/iii/sierra-api/v3/bibs/?limit=1&id=17292415&fields=default,fixedFields,varFields,normTitle,normAuthor,orders,locations' }
Kind: global function
| Param | Type | Description |
|---|---|---|
| bibIdStart | string | the bnumber of the bib you want to request |
| bibIdEnd | string | the bnumber of the bib you want to request |
| cb | function | callback |
Requests an item range from the API
Return format: { data: { total: 1, entries: [ [Object] ] }, url: 'https://catalog.library.org/iii/sierra-api/v3/items/?limit=1&id=17292415&fields=default,fixedFields,varFields,normTitle,normAuthor,orders,locations' }
Kind: global function
| Param | Type | Description |
|---|---|---|
| itemIdStart | string | the bnumber of the bib you want to request |
| itemIdEnd | string | the bnumber of the bib you want to request |
| cb | function | callback |
Requests all the items of a specified bib id Return format: { data: { total: 2, entries: [ [Object], [Object] ] }, url: [ 'https://catalog.library.org/iii/sierra-api/v3/items/?bibIds=17292415&fields=default,fixedFields,varFields&offset=0' ] }
Kind: global function
| Param | Type | Description |
|---|---|---|
| bibId | string | the bnumber of the bib you want to request |
| cb | function | callback |
Requests multiple bibs, but no orders or locations
Return format: { data: { total: 1, entries: [ [Object] ] }, url: 'https://catalog.library.org/iii/sierra-api/v3/bibs/?id=14628261,14628262,14628263,14628264,14628265,14628266,14628267,14628268,14628269,14628270&fields=default,fixedFields,varFields,normTitle,normAuthor' }
Kind: global function
| Param | Type | Description |
|---|---|---|
| bibsIds | array | an array of bib id strings |
| cb | function | callback |
Requests multiple items
Return format: { data: { total: 1, entries: [ [Object] ] }, url: 'https://catalog.library.org/iii/sierra-api/v3/items/?id=10000000,10000100,10000200,10000300,10000400,10000500,10000600,10000700,10000800,10000900,10001000&fields=default,fixedFields,varFields' }
Kind: global function
| Param | Type | Description |
|---|---|---|
| itemIds | array | array of item ids |
| cb | function | callback |
FAQs
A node wrapper for Innovative's Sierra API v3
The npm package sierra-wrapper receives a total of 3 weekly downloads. As such, sierra-wrapper popularity was classified as not popular.
We found that sierra-wrapper demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Socket CEO Feross Aboukhadijeh breaks down how North Korea hijacked Axios and what it means for the future of software supply chain security.

Security News
OpenSSF has issued a high-severity advisory warning open source developers of an active Slack-based campaign using impersonation to deliver malware.

Research
/Security News
Malicious packages published to npm, PyPI, Go Modules, crates.io, and Packagist impersonate developer tooling to fetch staged malware, steal credentials and wallets, and enable remote access.