|
|
|
@ -907,6 +907,38 @@ class _RtcApi implements RtcApi { |
|
|
|
return httpResponse; |
|
|
|
} |
|
|
|
|
|
|
|
@override |
|
|
|
Future<HttpResponse<BaseResponse<LiveIncomeData>>> |
|
|
|
userGetTodayLiveIncome() async { |
|
|
|
final _extra = <String, dynamic>{}; |
|
|
|
final queryParameters = <String, dynamic>{}; |
|
|
|
final _headers = <String, dynamic>{}; |
|
|
|
const Map<String, dynamic>? _data = null; |
|
|
|
final _options = _setStreamType<HttpResponse<BaseResponse<LiveIncomeData>>>( |
|
|
|
Options(method: 'GET', headers: _headers, extra: _extra) |
|
|
|
.compose( |
|
|
|
_dio.options, |
|
|
|
'dating-agency-mall/user/get/today-live-income', |
|
|
|
queryParameters: queryParameters, |
|
|
|
data: _data, |
|
|
|
) |
|
|
|
.copyWith(baseUrl: _combineBaseUrls(_dio.options.baseUrl, baseUrl)), |
|
|
|
); |
|
|
|
final _result = await _dio.fetch<Map<String, dynamic>>(_options); |
|
|
|
late BaseResponse<LiveIncomeData> _value; |
|
|
|
try { |
|
|
|
_value = BaseResponse<LiveIncomeData>.fromJson( |
|
|
|
_result.data!, |
|
|
|
(json) => LiveIncomeData.fromJson(json as Map<String, dynamic>), |
|
|
|
); |
|
|
|
} on Object catch (e, s) { |
|
|
|
errorLogger?.logError(e, s, _options); |
|
|
|
rethrow; |
|
|
|
} |
|
|
|
final httpResponse = HttpResponse(_value, _result); |
|
|
|
return httpResponse; |
|
|
|
} |
|
|
|
|
|
|
|
RequestOptions _setStreamType<T>(RequestOptions requestOptions) { |
|
|
|
if (T != dynamic && |
|
|
|
!(requestOptions.responseType == ResponseType.bytes || |
|
|
|
|