listTool method
Tool APIļ¼ /opentool-daemon/tools ========== GET /tools/list?all=0
Implementation
/// GET /tools/list?all=0
Future<List<ToolDto>> listTool(String? all) => _guardApi(() async {
Map<String, dynamic>? queryParameters;
if (all != null && all.isNotEmpty) {
queryParameters = {'all': all};
}
Response response = await toolDio.get(
'/list',
queryParameters: queryParameters,
);
List<dynamic> res = response.data;
List<ToolDto> result = res
.map((dyn) => ToolDto.fromJson(dyn as Map<String, dynamic>))
.toList();
return result;
});