groupby-api
v2.7.0
Published
Client for the GroupBy Searchandiser API.
Downloads
1,251
Readme
GroupBy Search 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.
Install global dependencies:
npm i -g gulp typingsTo install:
npm iThis will by default install the typings as well.
To test:
npm testThis will install the project and run all tests.
Add this library as a dependency to your project:
NPM
npm i --save groupby-apiExamples
Searching (typescript)
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
});Searching (ES5/CommonJS)
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
});