getDevices method
Implementation
Future<List<Device>> getDevices() async {
final response = await _get('devices');
final json = jsonDecode(utf8.decode(response.bodyBytes)) as Iterable;
final devices = List<Device>.from(json.map((e) => Device.fromJson(e)));
return devices;
}