1.0.0 • Published 6 years ago
@amplience/sap-product-browser v1.0.0
SAP product browser lib
This project is a small client library for communicating with SAP commerce cloud(C4Hana) Hybris.
Building
Build locally:
$ npm install
$ npm run-script buildUsage
This lib contains a client product-service with the following functions to retrieve products from hybris:
search: this requires acatalogueand aqueryto retrieve a paginated list of products.getByCode: this uses acatalogueand a productcodeto retrieve a single product. Both functions use thedefaultImageOptionsto find a default image url and attach to the product this will be defaulted todefaultNotFoundImageif none are found.
Constructor params
host: URL of deployed Hybris instance.basPath: path to Hybris API.defaultNotFoundImage: URL to default image if no image available from product.authTokenSupplier: Function to return auth token (can be null if no auth needed).defaultImageOptions:format: defaulted to 'thumbnail'.type: defaulted to 'PRIMARY'.
1.0.0
6 years ago
