Skip to content

DataAPI SDK english MT.DataAPI Core method withOptions

Taku AMANO edited this page Jul 5, 2013 · 1 revision

withOptions

Execute function with specified options.

Parameters

Name Type Required Description
option Option yes Option to overwrite
func Function yes Function to execute

Returns

: Return value of specified func

Example

// The DataAPI object is created with {async: true}
api.withOptions({async: false}, function() {
  api.listEntries(1, function() {
    // This is executed synchronously
  });
});
api.listEntries(1, function() {
  // This is executed asynchronously
});
Clone this wiki locally