RQHTTPService+RQGetLearningMaterials.m 813 B

123456789101112131415161718192021222324252627
  1. //
  2. // RQHTTPService+RQGetLearningMaterials.m
  3. // SDJK
  4. //
  5. // Created by 张嵘 on 2022/6/30.
  6. //
  7. #import "RQHTTPService+RQGetLearningMaterials.h"
  8. @implementation RQHTTPService (RQGetLearningMaterials)
  9. /**
  10. 获取学习资料
  11. @return Returns a signal which will send complete, or error.
  12. */
  13. - (RACSignal *)getLearningMaterialsList {
  14. /// 1. 配置参数
  15. RQKeyedSubscript *subscript = [RQKeyedSubscript subscript];
  16. /// 2. 配置参数模型
  17. RQURLParameters *paramters = [RQURLParameters urlParametersWithMethod:RQ_HTTTP_METHOD_GET path:RQ_GET_LearningMaterialsList parameters:subscript.dictionary];
  18. /// 3.发起请求
  19. return [[[RQHTTPRequest requestWithParameters:paramters]
  20. enqueueResultClass:[RQLearningMaterialsModel class]]
  21. rq_parsedResults];
  22. }
  23. @end