getNodes method

Future<List<Node>> getNodes()

Gets all the nodes.

Implementation

Future<List<Node>> getNodes() async {
  final response = await _context.client.get(
    Uri.https(authority, '$path/nodes'),
  );

  ClientException.checkIsSuccessStatusCode(response);

  return (json.decode(response.body) as List)
      .map((e) => Node.fromJson(e))
      .toList();
}