Appmixer
Search…
Custom API
Appmixer SDK allows you to override any API method used by the SDK instance.

Setting a custom API option

Custom API is represented as an object composed of asynchronous methods that you set on your Appmixer SDK instance using the api option:
1
var myCustomApi = {
2
/* the key must match an existing API method */
3
myCustomApiMethod(/* arguments of the original method */) {
4
return new Promise((resolve) => {
5
resolve(myCustomResponse);
6
});
7
}
8
}
9
10
/* Use a custom API on the entire SDK instance */
11
var appmixer = new Appmixer({ api: myCustomApi });
12
13
/* Use a custom API on a particular SDK UI widget */
14
var designer = new appmixer.ui.Designer({ api: myCustomApi });
Copied!
The list of API methods can be found here.
Last modified 1yr ago
Copy link