listToolWithApiKeys method
GET /tools/listWithApiKeys?all=0
Implementation
Future<List<ToolWithApiKeyDto>> listToolWithApiKeys(
String? all, {
required String daemonApiKey,
}) => _guardApi(() async {
Map<String, dynamic>? queryParameters;
if (all != null && all.isNotEmpty) {
queryParameters = {'all': all};
}
final response = await toolDio.get(
'/listWithApiKeys',
queryParameters: queryParameters,
options: Options(
headers: {
...toolDio.options.headers,
TOOL_API_KEY_HEADER: daemonApiKey,
},
),
);
final res = response.data as List<dynamic>;
return res
.map((dyn) => ToolWithApiKeyDto.fromJson(dyn as Map<String, dynamic>))
.toList();
});