DataAPI SDK english MT.DataAPI Core method loadEndpoints - movabletype/mt-data-api-sdk-js GitHub Wiki
loadEndpoints
Load endpoint from DataAPI dynamically. This method is executed executed synchronously.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| params | Object | no | |
| params.includeComponents | String | no | Comma separated component IDs to load |
| params.excludeComponents | String | no | Comma separated component IDs to exclude |
Example
Load endpoints only from specified module.
api.loadEndpoints({
includeComponents: 'your-extension-module'
});
api.getDataViaYourExtensionModule(function(response) {
// Do stuff
});
Load all endpoints except for core. Since all the endpoints of core is already loaded.
api.loadEndpoints({
excludeComponents: 'core'
});
api.getDataViaYourExtensionModule(function(response) {
// Do stuff
});