feat: refactor code
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
import 'package:dio/dio.dart';
|
||||
|
||||
import '../../../../../core/locator/locator.dart';
|
||||
import '../../../../../core/network/api_provider_imp.dart';
|
||||
|
||||
/// تماسهای خامِ HTTP مربوط به کیفپول و پاداش روزانه.
|
||||
class WalletApiProvider {
|
||||
ApiProviderImp get _api => locator<ApiProviderImp>();
|
||||
|
||||
Future<Response> getWallet() => _api.get('/wallet');
|
||||
Future<Response> getMe() => _api.get('/me');
|
||||
Future<Response> claimDaily() => _api.post('/rewards/daily');
|
||||
}
|
||||
Reference in New Issue
Block a user