Build and scale ecommerce with Schema. Create your account at https://schema.io
npm install schema-client
const Schema = require('schema-client');
const client = new Schema.Client('<client-id>', '<client-key>');
client.get('/products', { active: true }).then(products => {
console.log(products);
}).catch(err => {
// handle error
});
As of v3, this client provides in-memory caching enabled by default. It uses a version clocking protocol that means you never have to worry about stale cache, and collections that don't change frequently, such as products, will always return from cache when possible.
To disable caching behavior, initialize the client with cache: false
.
new Schema.Client('<client-id>', '<client-key>', {
cache: false,
});
See https://schema.io/docs for more API docs and usage examples
Pull requests are welcome
MIT