getBlockedServers function

Future<List<BlockedServer>> getBlockedServers()

Returns a list of blocked servers.

Implementation

Future<List<BlockedServer>> getBlockedServers() async {
  final response = await request(http.get, _sessionApi, 'blockedservers');
  final data = response.body.split('\n');
  final ret = <BlockedServer>[];
  for (final server in data) {
    ret.add(BlockedServer.parse(server));
  }
  return ret;
}