zodiac_love_intimacy_repository.dart 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. import 'package:injectable/injectable.dart';
  2. import '../../base/app_base_request.dart';
  3. import '../../utils/http_handler.dart';
  4. import '../api/atmob_api.dart';
  5. import '../api/response/zodiac_love_intimacy_love_info_response.dart';
  6. import '../api/response/zodiac_love_intimacy_response.dart';
  7. /// 星座恋爱分析Repository层
  8. @LazySingleton()
  9. class ZodiacLoveIntimacyRepository {
  10. final String tag = "ZodiacLoveIntimacyRepository";
  11. final AtmobApi atmobApi;
  12. ZodiacLoveIntimacyRepository(this.atmobApi);
  13. /// 获取星座恋爱分析-基本信息
  14. Future<ZodiacLoveIntimacyLoveInfoResponse> getZodiacLoveIntimacyLoveInfo() async {
  15. return await atmobApi
  16. .getZodiacLoveIntimacyLoveInfo(AppBaseRequest())
  17. .then(HttpHandler.handle(true));
  18. }
  19. /// 星座恋爱分析-获取今日指数分析
  20. Future<ZodiacLoveIntimacyResponse> getZodiacLoveIntimacyToday() async {
  21. return await atmobApi
  22. .getZodiacLoveIntimacyToday(AppBaseRequest())
  23. .then(HttpHandler.handle(true));
  24. }
  25. /// 星座恋爱分析-获取未来一周分析
  26. Future<ZodiacLoveIntimacyResponse> getZodiacLoveIntimacyFutureWeek() async {
  27. return await atmobApi
  28. .getZodiacLoveIntimacyFutureWeek(AppBaseRequest())
  29. .then(HttpHandler.handle(true));
  30. }
  31. }