14 lines
472 B
Dart
14 lines
472 B
Dart
import '../../marianumconnect_query.dart';
|
|
import 'get_ticker_response.dart';
|
|
|
|
/// Fetches the current "Aktuelles" ticker post from
|
|
/// `GET /api/mobile/v1/ticker`. Bearer token is attached by the shared dio.
|
|
class GetTicker extends MarianumConnectQuery {
|
|
GetTicker({super.dio});
|
|
|
|
Future<TickerResponse> run() => guard(() async {
|
|
final response = await dio.get<Map<String, dynamic>>(endpoint('ticker'));
|
|
return TickerResponse.fromJson(response.data!);
|
|
});
|
|
}
|