groupby-api
Version:
Client for the GroupBy Searchandiser API.
79 lines (51 loc) • 1.67 kB
Markdown
GroupBy Search API
========

[](https://www.npmjs.com/package/groupby-api)
[](https://www.npmjs.com/package/groupby-api)
Please follow the steps carefully to ensure a successful build.
Before running the install steps, ensure `node` and `npm` are installed on your system.
npm i -g gulp typings
npm i
This will by default install the typings as well.
npm test
This will install the project and run all tests.
The Uber JAR must be used to ensure shaded dependencies are included correctly.
npm i --save groupby-api
```javascript
import { CloudBridge, Query, Results } from 'groupby-api';
let bridge = new CloudBridge('<client-key>', '<customer-id>');
let query = new Query('dvd');
bridge.search(query)
.then(results: Results => {
// operate on results
});
// OR
bridge.search(query, results: Results => {
// operate on results
});
```
```javascript
var groupby = require('groupby-api');
var CloudBridge = groupby.CloudBridge,
Query = groupby.Query,
Results = groupby.Results;
var bridge = new CloudBridge('<client-key>', '<customer-id>');
var query = new Query('dvd');
bridge.search(query)
.then(function(results) {
// operate on results
});
// OR
bridge.search(query, function(results) {
// operate on results
});
```