Exciting news!Announcing our $4.6M Series Seed. Learn more
Socket
LoveBlogFAQ
Install
Log in

schema-client

Package Overview
Dependencies
1
Maintainers
1
Versions
47
Issues
File Explorer

Advanced tools

schema-client

Schema API Client for NodeJS

    3.0.21latest

Version published
Maintainers
1
Yearly downloads
9,473
increased by63.98%

Weekly downloads

Readme

Source

Schema API Client for NodeJS Build Status

Build and scale ecommerce with Schema. Create your account at https://schema.io

Install

npm install schema-client

Connect

const Schema = require('schema-client'); const client = new Schema.Client('<client-id>', '<client-key>');

Usage

client.get('/products', { active: true }).then(products => { console.log(products); }).catch(err => { // handle error });

Caching

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

Documentation

See https://schema.io/docs for more API docs and usage examples

Contributing

Pull requests are welcome

License

MIT

Keywords

Socket

Product

Subscribe to our newsletter

Get open source security insights delivered straight into your inbox. Be the first to learn about new features and product updates.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc