remove unused dead code files
This commit is contained in:
@@ -1,25 +0,0 @@
|
||||
import 'package:dio/dio.dart';
|
||||
|
||||
import '../../errors/marianumconnect_error.dart';
|
||||
import '../../marianumconnect_api.dart';
|
||||
import '../../marianumconnect_endpoint.dart';
|
||||
import 'get_ticker_sync_response.dart';
|
||||
|
||||
/// Fetches the ticker/nav change hashes from
|
||||
/// `GET /api/mobile/v1/ticker/sync`.
|
||||
class GetTickerSync {
|
||||
final Dio _dio;
|
||||
|
||||
GetTickerSync({Dio? dio}) : _dio = dio ?? MarianumConnectApi.dio();
|
||||
|
||||
Future<TickerSyncResponse> run() async {
|
||||
try {
|
||||
final response = await _dio.get<Map<String, dynamic>>(
|
||||
MarianumConnectEndpoint.resolve('ticker/sync'),
|
||||
);
|
||||
return TickerSyncResponse.fromJson(response.data!);
|
||||
} on DioException catch (e) {
|
||||
throw mapMarianumConnectError(e);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,18 +0,0 @@
|
||||
import 'package:json_annotation/json_annotation.dart';
|
||||
|
||||
part 'get_ticker_sync_response.g.dart';
|
||||
|
||||
/// Cheap change-detection poll from `GET /api/mobile/v1/ticker/sync`. Both
|
||||
/// hashes let the app decide whether the ticker post and/or the page tree need
|
||||
/// a full refetch without paying for the full payloads.
|
||||
@JsonSerializable()
|
||||
class TickerSyncResponse {
|
||||
final String? tickerHash;
|
||||
final String? navHash;
|
||||
|
||||
TickerSyncResponse({this.tickerHash, this.navHash});
|
||||
|
||||
factory TickerSyncResponse.fromJson(Map<String, dynamic> json) =>
|
||||
_$TickerSyncResponseFromJson(json);
|
||||
Map<String, dynamic> toJson() => _$TickerSyncResponseToJson(this);
|
||||
}
|
||||
@@ -1,19 +0,0 @@
|
||||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||
|
||||
part of 'get_ticker_sync_response.dart';
|
||||
|
||||
// **************************************************************************
|
||||
// JsonSerializableGenerator
|
||||
// **************************************************************************
|
||||
|
||||
TickerSyncResponse _$TickerSyncResponseFromJson(Map<String, dynamic> json) =>
|
||||
TickerSyncResponse(
|
||||
tickerHash: json['tickerHash'] as String?,
|
||||
navHash: json['navHash'] as String?,
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$TickerSyncResponseToJson(TickerSyncResponse instance) =>
|
||||
<String, dynamic>{
|
||||
'tickerHash': instance.tickerHash,
|
||||
'navHash': instance.navHash,
|
||||
};
|
||||
Reference in New Issue
Block a user