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