getGlobalAlerts static method

Future<CEListOfGlobalAlertResponse> getGlobalAlerts(
  1. HttpClient client,
  2. bool includestreaming
)

Gets any active global alert for display in the forum banners, help pages, etc. Usually used for DOC alerts.

Implementation

static Future<CEListOfGlobalAlertResponse> getGlobalAlerts (
    HttpClient client,
    bool includestreaming,
) async {
    final Map<String, dynamic> params = Map<String, dynamic>();
    params['includestreaming'] = includestreaming;
    final HttpClientConfig config = HttpClientConfig('GET', '/GlobalAlerts/', params);
    config.bodyContentType = null;
    final HttpResponse response = await client.request(config);
    if(response.statusCode == 200) {
        return CEListOfGlobalAlertResponse.asyncFromJson(response.mappedBody);
    }
    throw Exception(response.mappedBody);
}