getOowooVideoByTypeId method
Implementation
@override
Future<NetworkResponse> getOowooVideoByTypeId(typeId) async {
bool isDisconnect = await WifiService.isDisconnectWhenCallApi();
if (isDisconnect) return NetworkResponse.withDisconnect();
try {
Response response = await AppClients(
requiredToken: true, token: await appPrefs.getNormalToken())
.get(AppEndpoint.getOowooVideoByTypeId(), queryParameters: {
'typeId': typeId,
'languageCode': appPrefs.languageCode
});
return NetworkResponse.fromResponse(response,
converter: (json) => VideoUrl.fromJson(json));
} on DioError catch (e) {
return NetworkResponse.withErrorRequest(e);
} catch (e) {
return NetworkResponse.withErrorConvert(e);
}
}