getIsibookSpaces method

Future<IsibookSpacesResponse?> getIsibookSpaces()

Implementation

Future<IsibookSpacesResponse?> getIsibookSpaces() async {
  final intent = HttpIntent("isibook/spaces", {});
  final req = await HttpRequest().httpRequest(
      intent, context: context, "Carico spazi...",
      method: HttpMethod.get, dialog: dialog);

  _logIsibookCall("getIsibookSpaces", intent, req);

  if (!elaborateResponse(req)) {
    return null;
  }

  try {
    return IsibookSpacesResponse.fromJson(
        Map<String, dynamic>.from(req.response));
  } catch (e, stack) {
    _logIsibookException("getIsibookSpaces", e, stack);
    return null;
  }
}