16 lines
473 B
Dart
16 lines
473 B
Dart
import 'package:ac_web/Api/Dtos/AgentDto.dart';
|
|
import 'package:ac_web/Api/Services/ApiServiceBase.dart';
|
|
|
|
/// Access to the backend `AgentsController` (`/agents`).
|
|
class AgentsService extends ApiServiceBase {
|
|
const AgentsService(super.client);
|
|
|
|
@override
|
|
String get controllerRoute => 'agents';
|
|
|
|
/// `GET /agents` - all known agents including their current tasks.
|
|
Future<List<AgentDto>> getAgents() {
|
|
return client.getList(route(), AgentDto.fromJson);
|
|
}
|
|
}
|