flexiblesearch
v0.0.9
Published
An npm module that lets you run hybris queries and return data as arrays of plain javascript objects
Downloads
1
Readme
FlexibleSearch
A node module to run flexiblesearch hybris queries without a browser.
API
class flexiblesearch
The flexiblesearch module provides 2 methods:
flexiblesearch.initialize([options])
options
<Object, optional> An optional object to configure flexiblesearch instanceusername
<String> Username to log into Hybris admin console with. Ifoptions
is not provided, this defaults to 'admin'password
<String> Password to log into Hybris admin console with. ifoptions
is not provided, this defaults to 'nimda'url
<String> Hybris admin console URL. Ifoptions
is not provided, this defaults to 'https://localhost:9002/admin'
returns null
flexiblesearch.query(querytext)
querytext
<String> Flexiblesearch query- returns <Array> containing objects. Keys in objects correspond to fields in hybris table.
Example Usage
const f = require('flexiblesearch');
const options = {
username: "admin",
password: "nimda",
url: "https://localhost:9002/admin",
};
f.initialize(options);
f.query("SELECT * FROM {GroceryProduct}")
.then(console.log);
TODO
- Return more than first 10 results
- Clean up code