init method

dynamic init({
  1. required String baseUrl,
  2. String wpJsonPath = '/wp-json',
  3. bool shouldDebug = true,
})

Initialize and configure class interface. You can optional set shouldDebug == false to stop debugging wpJsonPath is the root path for accessing you sites WordPress APIs by default this should be "/wp-json".

Implementation

init(
    {required String baseUrl,
    String wpJsonPath = '/wp-json',
    bool shouldDebug = true}) {
  _setBaseApi(baseUrl: baseUrl);
  _setApiPath(path: wpJsonPath);
  _setShouldDebug(value: shouldDebug);
}