3.0.21 • Published 4 years ago

schema-client v3.0.21

Weekly downloads
79
License
MIT
Repository
github
Last release
4 years ago

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

3.0.21

4 years ago

3.0.20

4 years ago

3.0.19

4 years ago

3.0.18

4 years ago

3.0.17

5 years ago

3.0.16

5 years ago

3.0.15

5 years ago

3.0.14

5 years ago

3.0.13

5 years ago

3.0.12

6 years ago

3.0.11

6 years ago

3.0.10

6 years ago

3.0.9

6 years ago

3.0.8

7 years ago

3.0.7

7 years ago

3.0.6

7 years ago

3.0.5

7 years ago

3.0.4

7 years ago

3.0.3

7 years ago

3.0.2

7 years ago

3.0.1

7 years ago

3.0.0

7 years ago

2.2.5

7 years ago

2.2.4

7 years ago

2.2.3

7 years ago

2.2.2

7 years ago

2.2.1

8 years ago

2.2.0

8 years ago

2.1.3

8 years ago

2.1.2

8 years ago

2.1.1

8 years ago

2.1.0

8 years ago

2.0.3

8 years ago

2.0.2

8 years ago

2.0.1

8 years ago

2.0.0

8 years ago

1.2.10

8 years ago

1.2.9

9 years ago

1.2.8

9 years ago

1.2.7

9 years ago

1.2.6

9 years ago

1.2.5

9 years ago

1.2.4

9 years ago

1.2.2

9 years ago

1.2.1

9 years ago

1.2.0

9 years ago

1.1.2

9 years ago