Skip to content

DataAPI SDK english MT.DataAPI Core method loadEndpoints

Taku AMANO edited this page Jul 9, 2013 · 2 revisions

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
});
Clone this wiki locally