RQHTTPService+RQGetVideoVip.m 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. //
  2. // RQHTTPService+RQGetVideoVip.m
  3. // jiaPei
  4. //
  5. // Created by 张嵘 on 2022/3/4.
  6. // Copyright © 2022 JCZ. All rights reserved.
  7. // 获取用户vip信息
  8. #import "RQHTTPService+RQGetVideoVip.h"
  9. @implementation RQHTTPService (RQGetVideoVip)
  10. /**
  11. 获取用户vip信息
  12. @param userId 用户Id
  13. @return Returns a signal which will send complete, or error.
  14. */
  15. - (RACSignal *)getVideoVipWithUserId:(NSString *)userId {
  16. /// 1. 配置参数
  17. RQKeyedSubscript *subscript = [RQKeyedSubscript subscript];
  18. subscript[@"userId"] = @([userId integerValue]);
  19. /// 2. 配置参数模型
  20. RQURLParameters *paramters = [RQURLParameters urlParametersWithMethod:RQ_HTTTP_METHOD_GET path:RQ_GET_Vip parameters:subscript.dictionary];
  21. /// 3.发起请求
  22. return [[[RQHTTPRequest requestWithParameters:paramters]
  23. enqueueResultClass:[RQVideoVipModel class]]
  24. rq_parsedResults];
  25. }
  26. /**
  27. 获取用户vip信息
  28. @param userId 用户Id
  29. @return Returns a signal which will send complete, or error.
  30. */
  31. - (RACSignal *)getVipWithUserId:(NSString *)userId {
  32. /// 1. 配置参数
  33. RQKeyedSubscript *subscript = [RQKeyedSubscript subscript];
  34. subscript[@"userId"] = @([userId integerValue]);
  35. /// 2. 配置参数模型
  36. RQURLParameters *paramters = [RQURLParameters urlParametersWithMethod:RQ_HTTTP_METHOD_GET path:RQ_GET_Vip parameters:subscript.dictionary];
  37. /// 3.发起请求
  38. return [[[RQHTTPRequest requestWithParameters:paramters]
  39. enqueueResultClass:[RQVideoVipModel class]]
  40. rq_parsedResults];
  41. }
  42. @end