RQHTTPService+RQAppWrongByUser.m 1003 B

1234567891011121314151617181920212223242526272829
  1. //
  2. // RQHTTPService+RQAppWrongByUser.m
  3. // NiuBi
  4. //
  5. // Created by 张嵘 on 2023/3/30.
  6. // app恢复云端错题到本机(根据用户获取错题)
  7. #import "RQHTTPService+RQAppWrongByUser.h"
  8. @implementation RQHTTPService (RQAppWrongByUser)
  9. /**
  10. app恢复云端错题到本机(根据用户获取错题)
  11. @param subject 考试科目(1、2、3、4)
  12. @return Returns a signal which will send complete, or error.
  13. */
  14. - (RACSignal *)getAppWrongByUserWithSubject:(RQHomePageSubjectType)subject {
  15. /// 1. 配置参数
  16. RQKeyedSubscript *subscript = [RQKeyedSubscript subscript];
  17. subscript[@"km"] = @(subject + 1);
  18. /// 2. 配置参数模型
  19. RQURLParameters *paramters = [RQURLParameters urlParametersWithMethod:RQ_HTTTP_METHOD_GET path:RQ_GET_AppWrongByUser parameters:subscript.dictionary];
  20. /// 3.发起请求
  21. return [[[RQHTTPRequest requestWithParameters:paramters]
  22. enqueueResultClass:[RQWrongModel class]]
  23. rq_parsedResults];
  24. }
  25. @end