
Security News
Axios Supply Chain Attack Reaches OpenAI macOS Signing Pipeline, Forces Certificate Rotation
OpenAI rotated macOS signing certificates after a malicious Axios package reached its CI pipeline in a broader software supply chain attack.
nypl-data-api-client
Advanced tools
Helper lib for interacting with the (internal) NYPL Data API
Install it via npm for use inside your project:
npm i nypl-data-api-client --save
const NyplClient = require('nypl-data-api-client')
var client = new NyplClient({ base_url: 'http://example.com/api/v0.1/' })
Client options include:
Note that you must specify URL base for the api via base_url config (as above) or via NYPL_API_BASE_URL env variable. The value should include everything from the protocol to the version number in the path (as above).
.
Returns a Promise that resolves content at path (e.g. 'current-schemas/Item')
Params:
true. Controls whether or not response is cached (using default configuration of node-cacheFor example, to get the "Item" stream schema:
client.get('current-schemas/Item').then((schema) => {
// Now we can build an avro encoder by parsing the escaped "schema" prop:
var avroType = require('avsc').parse(JSON.parse(schema.schema))
})
Returns a Promise that resolves after submitting data to path
Params:
For example, to post a new "TestSchema" schema:
client.post('schemas/TestSchema', '{ "name": "TestSchema", "type": "record", "fields": [ ... ] }')
.then((resp) => {
if (JSON.parse(resp).data.stream !== 'TestSchema') throw Error('Error creating schema...')
})
npm test
FAQs
Simple client for interacting with NYPL's internal data api
The npm package nypl-data-api-client receives a total of 0 weekly downloads. As such, nypl-data-api-client popularity was classified as not popular.
We found that nypl-data-api-client 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
OpenAI rotated macOS signing certificates after a malicious Axios package reached its CI pipeline in a broader software supply chain attack.

Security News
Open source is under attack because of how much value it creates. It has been the foundation of every major software innovation for the last three decades. This is not the time to walk away from it.

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.