Creative Exchange SDK Documentation
Creative Exchange SDK simplifies automation of Zen Garden theme development workflow. It works both in Nodejs and in the browser, so it can be foundation for command line tools, electron apps, code editor plugins, browser monitoring tools and any other solutions that will make theme development easier for your organisation.
Installation
Npm
Use npm for Nodejs, Webpack, Rollup
$ npm install crex --save
Script tag
Umd package is available on unpkg:
<script src="https://unpkg.com/crex/dist/crex-sdk.min.js"></script>
Loading library will expose window.CrEx
Usage
Browser with script
<script src="https://unpkg.com/crex/dist/crex-sdk.min.js"></script>
<script>
var crex = new CrEx(); //Defaults to local instance
crex.exportGetAllPackages()
.then(function(response) {
console.log(response);
})
.catch(function(error) {
console.log(error);
});
</script>
Nodejs, Webpack, Rollup
var CrEx = require('crex');
var crex = new CrEx(); //Defaults to local instance
crex.exportGetAllPackages()
.then(function(response) {
console.log(response);
})
.catch(function(error) {
console.log(error);
});
General documentation
Endpoints
For documentation of all endpoints, parameters they receive and data they return see CrEx class definition. Methods are available directly from an instance of API class eg. crex.exportGetAllPackages()
Promises
The SDK uses native Promise implementation. For using non-supporting browser polyfill is required.