discover method
Fetches the discovery URL of the associated wordpress site and caches the response and returns the status as a boolean.
The response object may allocate a decent amount of memory, it may be possible you wish to deallocate it.
In that case, call clearDiscoveryCache()
method to clear the cached discovery data.
Implementation
Future<bool> discover() async {
if (_discovery != null) {
return true;
}
final response = await _requester.discover();
return response.map(
onSuccess: (response) {
_discovery = response.data;
return _discovery != null;
},
onFailure: (response) {
return false;
},
)!;
}