XYSocialApiManager.m 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506
  1. //
  2. // XYSocialApiManager.m
  3. // Starbuds
  4. //
  5. // Created by 翟玉磊 on 2019/12/31.
  6. // Copyright © 2019 翟玉磊. All rights reserved.
  7. //
  8. #import "XYSocialApiManager.h"
  9. /// 关注用户
  10. static NSString * const SOCIAL_FOLLOW_USER = @"api-app/v1/social/followUser";
  11. /// 删除好友
  12. static NSString * const SOCIAL_DEL_FRIEND = @"api-app/v1/social/delFriend";
  13. /// 取消关注用户
  14. static NSString * const SOCIAL_UNFOLLOW_USER = @"api-app/v1/social/unFollowUser";
  15. /// 同意好友申请
  16. static NSString * const SOCIAL_AGREE_FRIEND_REQ = @"api-app/v1/social/agreeFriendReq";
  17. /// 好友申请列表
  18. static NSString * const SOCIAL_GET_FRIEND_REQ_LIST = @"api-app/v1/social/getFriendReqList";
  19. /// 我的关注列表
  20. static NSString * const SOCIAL_GET_FOLLOW_LISST = @"api-app/v1/social/getFollowList";
  21. /// 我的好友列表
  22. static NSString * const SOCIAL_GET_FRIEND_LIST = @"api-app/v1/social/getFriendList";
  23. /// 我的粉丝列表
  24. static NSString * const SOCIAL_GET_FANS_LIST = @"api-app/v1/social/getFansList";
  25. /// 拒绝好友申请
  26. static NSString * const SOCIAL_DENY_FRIEND_REQ = @"api-app/v1/social/denyFriendReq";
  27. /// 添加好友
  28. static NSString * const SOCIAL_ADD_FRIEND_REQ = @"api-app/v1/social/addFriendReq";
  29. /// 获取访客列表
  30. static NSString * const SOCIAL_GET_VISITOR_LIST = @"api-app/v1/social/getVisitorList";
  31. /// 获取足迹列表
  32. static NSString * const SOCIAL_GET_INTERVIEWEE_LIST = @"api-app/v1/social/getIntervieweeList";
  33. /// 添加黑名单
  34. static NSString * const SOCIAL_ADD_BLACK = @"api-app/v1/social/addBlack";
  35. /// 删除黑名单
  36. static NSString * const SOCIAL_DEL_BLACK = @"api-app/v1/social/delBlack";
  37. /// 获取黑名单列表
  38. static NSString * const SOCIAL_GET_BLACK_LIST = @"api-app/v1/social/getBlackList";
  39. /// 遇见(搜索框右侧数据)
  40. static NSString * const SOCIAL_GET_PEOPLE_NEARBY = @"api-app/v1/social/getPeopleNearby";
  41. /// 获取遇见分页数据
  42. static NSString * const SOCIAL_GET_PEOPLE_NEARBY_PAGE_LIST = @"api-app/v1/social/getPeopleNearbyPageList";
  43. /// 获得搜索默认关键词
  44. static NSString * const SOCIAL_GET_SEARCH_DEFAULT_KEYWORDS = @"api-app/v1/social/getSearchDefaultKeywords";
  45. /// 猜你喜欢列表
  46. static NSString * const SOCIAL_GET_MY_LIKE = @"api-app/v1/social/getMayLike";
  47. /// 最近看过的用户列表
  48. static NSString * const getRecentlySeenUsersPath = @"api-app/v1/social/getRecentlySeenUsers";
  49. /// 谁看过我列表
  50. static NSString * const getIntervieweeListV2Path = @"api-app/v1/social/getIntervieweeListV2";
  51. /// 我看过谁列表
  52. static NSString * const getVisitorListV2Path = @"api-app/v1/social/getVisitorListV2";
  53. /// 获取用户房间足迹分页
  54. static NSString * const getRtcRoomHisPageListsPath = @"api-app/v1/rtc/getRtcRoomHisPageList";
  55. /// 谁看过我数量统计
  56. static NSString * const getIntervieweeTotalPath = @"api-app/v1/social/getIntervieweeTotal";
  57. /// 未读访客消息数
  58. static NSString * const getIntervieweeUnReadMsgCountPath = @"api-app/v1/social/getIntervieweeUnReadMsgCount";
  59. /// 获取关系墙
  60. static NSString * const getWatchWallHisPath = @"api-app/v1/watch/getWatchWallHis";
  61. /// 获取广播墙
  62. static NSString * const getBroadWallHisPath = @"api-app/v1/watch/getBroadWallHis";
  63. @implementation XYSocialApiManager
  64. /// 关注用户
  65. /// @param targetId 目标用户id
  66. /// @param successHandler 请求成功
  67. /// @param failureHandler 请求失败
  68. - (NSNumber *)followUserWithTargetId:(NSString *)targetId successHandler:(ZYLNetworkTaskSuccessHandler)successHandler failureHandler:(ZYLNetworkTaskFailureHandler)failureHandler {
  69. ZYLDataAPIConfiguration *config = [ZYLDataAPIConfiguration new];
  70. config.urlPath = [SOCIAL_FOLLOW_USER copy];
  71. config.instructions = @"关注用户";
  72. config.requestParameters = @{@"targetId":targetId};
  73. return [super dispatchDataTaskWithConfiguration:config successHandler:successHandler failureHandler:failureHandler];
  74. }
  75. /// 删除好友
  76. /// @param targetId 目标用户id
  77. /// @param successHandler 请求成功
  78. /// @param failureHandler 请求失败
  79. - (NSNumber *)delFriendWithTargetId:(NSString *)targetId successHandler:(ZYLNetworkTaskSuccessHandler)successHandler failureHandler:(ZYLNetworkTaskFailureHandler)failureHandler {
  80. ZYLDataAPIConfiguration *config = [ZYLDataAPIConfiguration new];
  81. config.urlPath = [SOCIAL_DEL_FRIEND copy];
  82. config.instructions = @"删除好友";
  83. config.requestParameters = @{@"targetId":targetId};
  84. return [super dispatchDataTaskWithConfiguration:config successHandler:successHandler failureHandler:failureHandler];
  85. }
  86. /// 取消关注用户
  87. /// @param targetId 目标用户id
  88. /// @param successHandler 请求成功
  89. /// @param failureHandler 请求失败
  90. - (NSNumber *)unFollowUserWithTargetId:(NSString *)targetId successHandler:(ZYLNetworkTaskSuccessHandler)successHandler failureHandler:(ZYLNetworkTaskFailureHandler)failureHandler {
  91. ZYLDataAPIConfiguration *config = [ZYLDataAPIConfiguration new];
  92. config.urlPath = [SOCIAL_UNFOLLOW_USER copy];
  93. config.instructions = @"取消关注用户";
  94. config.requestParameters = @{@"targetId":targetId};
  95. return [super dispatchDataTaskWithConfiguration:config successHandler:successHandler failureHandler:failureHandler];
  96. }
  97. /// 同意好友申请
  98. /// @param reqId 好友申请记录的id
  99. /// @param optMsg 处理意见
  100. /// @param successHandler 请求成功
  101. /// @param failureHandler 请求失败
  102. - (NSNumber *)agreeFriendReqWithReqId:(NSString *)reqId optMsg:(NSString *)optMsg successHandler:(ZYLNetworkTaskSuccessHandler)successHandler failureHandler:(ZYLNetworkTaskFailureHandler)failureHandler {
  103. ZYLDataAPIConfiguration *config = [ZYLDataAPIConfiguration new];
  104. config.urlPath = [SOCIAL_AGREE_FRIEND_REQ copy];
  105. config.instructions = @"同意好友申请";
  106. if (StringIsEmpty(optMsg)) {
  107. config.requestParameters = @{@"reqId":reqId};
  108. }else {
  109. config.requestParameters = @{@"reqId":reqId, @"optMsg":optMsg};
  110. }
  111. return [super dispatchDataTaskWithConfiguration:config successHandler:successHandler failureHandler:failureHandler];
  112. }
  113. /// 好友申请列表
  114. /// @param pageNum 页码
  115. /// @param pageSize 每页数量
  116. /// @param successHandler 请求成功
  117. /// @param failureHandler 请求失败
  118. - (NSNumber *)getFriendReqListWithPageNum:(NSInteger)pageNum pageSize:(NSInteger)pageSize successHandler:(ZYLNetworkTaskSuccessHandler)successHandler failureHandler:(ZYLNetworkTaskFailureHandler)failureHandler {
  119. ZYLDataAPIConfiguration *config = [ZYLDataAPIConfiguration new];
  120. config.urlPath = [SOCIAL_GET_FRIEND_REQ_LIST copy];
  121. config.instructions = @"好友申请列表";
  122. config.requestType = ZYLNetworkRequestTypeGet;
  123. if (pageSize == 0) {
  124. config.requestParameters = @{@"pageIndex":@(pageNum)};
  125. }else {
  126. config.requestParameters = @{@"pageIndex":@(pageNum), @"pageSize":@(pageSize)};
  127. }
  128. return [super dispatchDataTaskWithConfiguration:config successHandler:successHandler failureHandler:failureHandler];
  129. }
  130. /// 我的关注列表
  131. /// @param pageNum 页码
  132. /// @param successHandler 请求成功
  133. /// @param failureHandler 请求失败
  134. - (NSNumber *)getFollowListWithPageNum:(NSInteger)pageNum userId:(NSString *)userId successHandler:(ZYLNetworkTaskSuccessHandler)successHandler failureHandler:(ZYLNetworkTaskFailureHandler)failureHandler {
  135. ZYLDataAPIConfiguration *config = [ZYLDataAPIConfiguration new];
  136. config.urlPath = [SOCIAL_GET_FOLLOW_LISST copy];
  137. config.instructions = @"我的关注列表";
  138. config.requestType = ZYLNetworkRequestTypeGet;
  139. if (StringIsEmpty(userId)) {
  140. config.requestParameters = @{@"pageIndex":@(pageNum)};
  141. }else {
  142. config.requestParameters = @{@"pageIndex":@(pageNum), @"userId":userId};
  143. }
  144. return [super dispatchDataTaskWithConfiguration:config successHandler:successHandler failureHandler:failureHandler];
  145. }
  146. /// 我的好友列表
  147. /// @param pageNum 页码
  148. /// @param userId 每页数量
  149. /// @param successHandler 请求成功
  150. /// @param failureHandler 请求失败
  151. - (NSNumber *)getFriendListWithPageNum:(NSInteger)pageNum userId:(NSString *)userId successHandler:(ZYLNetworkTaskSuccessHandler)successHandler failureHandler:(ZYLNetworkTaskFailureHandler)failureHandler {
  152. ZYLDataAPIConfiguration *config = [ZYLDataAPIConfiguration new];
  153. config.urlPath = [SOCIAL_GET_FRIEND_LIST copy];
  154. config.instructions = @"我的好友列表";
  155. config.requestType = ZYLNetworkRequestTypeGet;
  156. if (StringIsEmpty(userId)) {
  157. config.requestParameters = @{@"pageIndex":@(pageNum)};
  158. }else {
  159. config.requestParameters = @{@"pageIndex":@(pageNum), @"userId":userId};
  160. }
  161. return [super dispatchDataTaskWithConfiguration:config successHandler:successHandler failureHandler:failureHandler];
  162. }
  163. /// 我的粉丝列表
  164. /// @param pageNum 页码
  165. /// @param userId 每页数量
  166. /// @param successHandler 请求成功
  167. /// @param failureHandler 请求失败
  168. - (NSNumber *)getFansListWithPageNum:(NSInteger)pageNum userId:(NSString *)userId successHandler:(ZYLNetworkTaskSuccessHandler)successHandler failureHandler:(ZYLNetworkTaskFailureHandler)failureHandler {
  169. ZYLDataAPIConfiguration *config = [ZYLDataAPIConfiguration new];
  170. config.urlPath = [SOCIAL_GET_FANS_LIST copy];
  171. config.instructions = @"我的粉丝列表";
  172. config.requestType = ZYLNetworkRequestTypeGet;
  173. if (StringIsEmpty(userId)) {
  174. config.requestParameters = @{@"pageIndex":@(pageNum)};
  175. }else {
  176. config.requestParameters = @{@"pageIndex":@(pageNum), @"userId":userId};
  177. }
  178. return [super dispatchDataTaskWithConfiguration:config successHandler:successHandler failureHandler:failureHandler];
  179. }
  180. /// 拒绝好友申请
  181. /// @param reqId 好友申请记录的id
  182. /// @param optMsg 处理意见
  183. /// @param successHandler 请求成功
  184. /// @param failureHandler 请求失败
  185. - (NSNumber *)denyFriendReqWithReqId:(NSString *)reqId optMsg:(NSString *)optMsg successHandler:(ZYLNetworkTaskSuccessHandler)successHandler failureHandler:(ZYLNetworkTaskFailureHandler)failureHandler {
  186. ZYLDataAPIConfiguration *config = [ZYLDataAPIConfiguration new];
  187. config.urlPath = [SOCIAL_DENY_FRIEND_REQ copy];
  188. config.instructions = @"拒绝好友申请";
  189. if (StringIsEmpty(optMsg)) {
  190. config.requestParameters = @{@"reqId":reqId};
  191. }else {
  192. config.requestParameters = @{@"reqId":reqId, @"optMsg":optMsg};
  193. }
  194. return [super dispatchDataTaskWithConfiguration:config successHandler:successHandler failureHandler:failureHandler];
  195. }
  196. /// 添加好友
  197. /// @param targetId 目标用户id
  198. /// @param reqMsg 好友申请时验证信息
  199. /// @param successHandler 请求成功
  200. /// @param failureHandler 请求失败
  201. - (NSNumber *)addFriendReqWithTargetId:(NSString *)targetId reqMsg:(NSString *)reqMsg successHandler:(ZYLNetworkTaskSuccessHandler)successHandler failureHandler:(ZYLNetworkTaskFailureHandler)failureHandler {
  202. ZYLDataAPIConfiguration *config = [ZYLDataAPIConfiguration new];
  203. config.urlPath = [SOCIAL_ADD_FRIEND_REQ copy];
  204. config.instructions = @"添加好友";
  205. if (StringIsEmpty(reqMsg)) {
  206. config.requestParameters = @{@"targetId":targetId};
  207. }else {
  208. config.requestParameters = @{@"targetId":targetId, @"reqMsg":reqMsg};
  209. }
  210. return [super dispatchDataTaskWithConfiguration:config successHandler:successHandler failureHandler:failureHandler];
  211. }
  212. /// 获取访客列表
  213. /// @param pageIndex 页码
  214. /// @param successHandler 请求成功
  215. /// @param failureHandler 请求失败
  216. - (NSNumber *)getVisitorListWithPageIndex:(NSInteger)pageIndex successHandler:(ZYLNetworkTaskSuccessHandler)successHandler failureHandler:(ZYLNetworkTaskFailureHandler)failureHandler {
  217. ZYLDataAPIConfiguration *config = [ZYLDataAPIConfiguration new];
  218. config.urlPath = [SOCIAL_GET_VISITOR_LIST copy];
  219. config.instructions = @"获取访客列表";
  220. config.requestType = ZYLNetworkRequestTypeGet;
  221. config.requestParameters = @{@"pageIndex":@(pageIndex)};
  222. return [super dispatchDataTaskWithConfiguration:config successHandler:successHandler failureHandler:failureHandler];
  223. }
  224. /// 获取足迹列表
  225. /// @param pageIndex 页码
  226. /// @param successHandler 请求成功
  227. /// @param failureHandler 请求失败
  228. - (NSNumber *)getIntervieweeListWithPageIndex:(NSInteger)pageIndex successHandler:(ZYLNetworkTaskSuccessHandler)successHandler failureHandler:(ZYLNetworkTaskFailureHandler)failureHandler {
  229. ZYLDataAPIConfiguration *config = [ZYLDataAPIConfiguration new];
  230. config.urlPath = [SOCIAL_GET_INTERVIEWEE_LIST copy];
  231. config.instructions = @"获取足迹列表";
  232. config.requestType = ZYLNetworkRequestTypeGet;
  233. config.requestParameters = @{@"pageIndex":@(pageIndex)};
  234. return [super dispatchDataTaskWithConfiguration:config successHandler:successHandler failureHandler:failureHandler];
  235. }
  236. /// 添加黑名单
  237. /// @param userId 用户id
  238. /// @param successHandler 请求成功
  239. /// @param failureHandler 请求失败
  240. - (NSNumber *)addBlackWithUserId:(NSString *)userId successHandler:(ZYLNetworkTaskSuccessHandler)successHandler failureHandler:(ZYLNetworkTaskFailureHandler)failureHandler {
  241. ZYLDataAPIConfiguration *config = [ZYLDataAPIConfiguration new];
  242. config.urlPath = [SOCIAL_ADD_BLACK copy];
  243. config.instructions = @"添加黑名单";
  244. config.requestParameters = @{@"userId":userId};
  245. return [super dispatchDataTaskWithConfiguration:config successHandler:successHandler failureHandler:failureHandler];
  246. }
  247. /// 删除黑名单
  248. /// @param userId 用户id
  249. /// @param successHandler 请求成功
  250. /// @param failureHandler 请求失败
  251. - (NSNumber *)delBlackWithUserId:(NSString *)userId successHandler:(ZYLNetworkTaskSuccessHandler)successHandler failureHandler:(ZYLNetworkTaskFailureHandler)failureHandler {
  252. ZYLDataAPIConfiguration *config = [ZYLDataAPIConfiguration new];
  253. config.urlPath = [SOCIAL_DEL_BLACK copy];
  254. config.instructions = @"删除黑名单";
  255. config.requestParameters = @{@"userId":userId};
  256. return [super dispatchDataTaskWithConfiguration:config successHandler:successHandler failureHandler:failureHandler];
  257. }
  258. /// 获取黑名单列表
  259. /// @param pageIndex 当前页码
  260. /// @param lastSeq 序列号 第一次传0
  261. /// @param successHandler 请求成功
  262. /// @param failureHandler 请求失败
  263. - (NSNumber *)getBlackListWithPageIndex:(NSInteger)pageIndex lastSeq:(NSString *)lastSeq successHandler:(ZYLNetworkTaskSuccessHandler)successHandler failureHandler:(ZYLNetworkTaskFailureHandler)failureHandler {
  264. ZYLDataAPIConfiguration *config = [ZYLDataAPIConfiguration new];
  265. config.urlPath = [SOCIAL_GET_BLACK_LIST copy];
  266. config.instructions = @"获取黑名单列表";
  267. config.requestType = ZYLNetworkRequestTypeGet;
  268. config.requestParameters = @{@"pageIndex":@(pageIndex), @"lastSeq":@([lastSeq integerValue])};
  269. return [super dispatchDataTaskWithConfiguration:config successHandler:successHandler failureHandler:failureHandler];
  270. }
  271. /// 遇见(搜索框右侧数据)
  272. /// @param successHandler 请求成功
  273. /// @param failureHandler 请求失败
  274. - (NSNumber *)getPeopleNearbySuccessHandler:(ZYLNetworkTaskSuccessHandler)successHandler failureHandler:(ZYLNetworkTaskFailureHandler)failureHandler {
  275. ZYLDataAPIConfiguration *config = [ZYLDataAPIConfiguration new];
  276. config.urlPath = [SOCIAL_GET_PEOPLE_NEARBY copy];
  277. config.instructions = @"遇见(搜索框右侧数据)";
  278. config.requestType = ZYLNetworkRequestTypeGet;
  279. return [super dispatchDataTaskWithConfiguration:config successHandler:successHandler failureHandler:failureHandler];
  280. }
  281. /// 获取遇见分页数据
  282. /// @param pageIndex 当前页码
  283. /// @param userSex 用户性别 0:全部 1:男 2:女
  284. /// @param userAgeMin 最小年龄
  285. /// @param userAgeMax 最大年龄
  286. /// @param successHandler 请求成功
  287. /// @param failureHandler 请求失败
  288. - (NSNumber *)getPeopleNearbyPageListWithPageIndex:(NSInteger)pageIndex userSex:(NSInteger)userSex userAgeMin:(NSInteger)userAgeMin userAgeMax:(NSInteger)userAgeMax successHandler:(ZYLNetworkTaskSuccessHandler)successHandler failureHandler:(ZYLNetworkTaskFailureHandler)failureHandler {
  289. ZYLDataAPIConfiguration *config = [ZYLDataAPIConfiguration new];
  290. config.urlPath = [SOCIAL_GET_PEOPLE_NEARBY_PAGE_LIST copy];
  291. config.instructions = @"获取遇见分页数据";
  292. config.requestType = ZYLNetworkRequestTypeGet;
  293. if (userAgeMax >= 41) {
  294. userAgeMax = 100;
  295. }
  296. if (userSex == 0) {
  297. config.requestParameters = @{@"pageIndex":@(pageIndex), @"userAgeMin":@(userAgeMin), @"userAgeMax":@(userAgeMax)};
  298. }else {
  299. config.requestParameters = @{@"pageIndex":@(pageIndex), @"userSex":@(userSex), @"userAgeMin":@(userAgeMin), @"userAgeMax":@(userAgeMax)};
  300. }
  301. return [super dispatchDataTaskWithConfiguration:config successHandler:successHandler failureHandler:failureHandler];
  302. }
  303. /// 获得搜索默认关键词
  304. /// @param successHandler 请求成功
  305. /// @param failureHandler 请求失败
  306. - (NSNumber *)getSearchDefaultKeywordsSuccessHandler:(ZYLNetworkTaskSuccessHandler)successHandler failureHandler:(ZYLNetworkTaskFailureHandler)failureHandler {
  307. ZYLDataAPIConfiguration *config = [ZYLDataAPIConfiguration new];
  308. config.urlPath = [SOCIAL_GET_SEARCH_DEFAULT_KEYWORDS copy];
  309. config.instructions = @"获得搜索默认关键词";
  310. config.requestType = ZYLNetworkRequestTypeGet;
  311. return [super dispatchDataTaskWithConfiguration:config successHandler:successHandler failureHandler:failureHandler];
  312. }
  313. /// 猜你喜欢列表
  314. /// @param successHandler 请求成功
  315. /// @param failureHandler 请求失败
  316. - (NSNumber *)getMayLikeSuccessHandler:(ZYLNetworkTaskSuccessHandler)successHandler failureHandler:(ZYLNetworkTaskFailureHandler)failureHandler {
  317. ZYLDataAPIConfiguration *config = [ZYLDataAPIConfiguration new];
  318. config.urlPath = [SOCIAL_GET_MY_LIKE copy];
  319. config.instructions = @"猜你喜欢列表";
  320. config.requestType = ZYLNetworkRequestTypeGet;
  321. return [super dispatchDataTaskWithConfiguration:config successHandler:successHandler failureHandler:failureHandler];
  322. }
  323. /// 最近看过的用户列表
  324. /// @param successHandler 请求成功
  325. /// @param failureHandler 请求失败
  326. - (NSNumber *)getRecentlySeenUsersSuccessHandler:(ZYLNetworkTaskSuccessHandler)successHandler failureHandler:(ZYLNetworkTaskFailureHandler)failureHandler {
  327. ZYLDataAPIConfiguration *config = [ZYLDataAPIConfiguration new];
  328. config.urlPath = [getRecentlySeenUsersPath copy];
  329. config.instructions = @"最近看过的用户列表";
  330. config.requestType = ZYLNetworkRequestTypeGet;
  331. return [super dispatchDataTaskWithConfiguration:config successHandler:successHandler failureHandler:failureHandler];
  332. }
  333. /// 谁看过我列表
  334. /// @param pageIndex 页码
  335. /// @param successHandler 请求成功
  336. /// @param failureHandler 请求失败
  337. - (NSNumber *)getIntervieweeListV2:(NSInteger)pageIndex successHandler:(ZYLNetworkTaskSuccessHandler)successHandler failureHandler:(ZYLNetworkTaskFailureHandler)failureHandler{
  338. ZYLDataAPIConfiguration *config = [ZYLDataAPIConfiguration new];
  339. config.urlPath = [getIntervieweeListV2Path copy];
  340. config.instructions = @"谁看过我列表";
  341. config.requestType = ZYLNetworkRequestTypeGet;
  342. config.requestParameters = @{@"pageIndex":@(pageIndex)};
  343. return [super dispatchDataTaskWithConfiguration:config successHandler:successHandler failureHandler:failureHandler];
  344. }
  345. /// 我看过谁列表
  346. /// @param pageIndex 页码
  347. /// @param successHandler 请求成功
  348. /// @param failureHandler 请求失败
  349. - (NSNumber *)getVisitorListV2:(NSInteger)pageIndex successHandler:(ZYLNetworkTaskSuccessHandler)successHandler failureHandler:(ZYLNetworkTaskFailureHandler)failureHandler{
  350. ZYLDataAPIConfiguration *config = [ZYLDataAPIConfiguration new];
  351. config.urlPath = [getVisitorListV2Path copy];
  352. config.instructions = @"我看过谁列表";
  353. config.requestType = ZYLNetworkRequestTypeGet;
  354. return [super dispatchDataTaskWithConfiguration:config successHandler:successHandler failureHandler:failureHandler];
  355. }
  356. /// 获取用户房间足迹分页
  357. /// @param pageIndex 页码
  358. /// @param successHandler 请求成功
  359. /// @param failureHandler 请求失败
  360. - (NSNumber *)getRtcRoomHisPageList:(NSInteger)pageIndex successHandler:(ZYLNetworkTaskSuccessHandler)successHandler failureHandler:(ZYLNetworkTaskFailureHandler)failureHandler{
  361. ZYLDataAPIConfiguration *config = [ZYLDataAPIConfiguration new];
  362. config.urlPath = [getRtcRoomHisPageListsPath copy];
  363. config.instructions = @"获取用户房间足迹分页";
  364. config.requestType = ZYLNetworkRequestTypeGet;
  365. config.requestParameters = @{@"pageIndex":@(pageIndex),@"pageSize":@"20"};
  366. return [super dispatchDataTaskWithConfiguration:config successHandler:successHandler failureHandler:failureHandler];
  367. }
  368. /// 谁看过我数量统计
  369. /// @param successHandler 请求成功
  370. /// @param failureHandler 请求失败
  371. - (NSNumber *)getIntervieweeTotalSuccessHandler:(ZYLNetworkTaskSuccessHandler)successHandler failureHandler:(ZYLNetworkTaskFailureHandler)failureHandler{
  372. ZYLDataAPIConfiguration *config = [ZYLDataAPIConfiguration new];
  373. config.urlPath = [getIntervieweeTotalPath copy];
  374. config.instructions = @"谁看过我数量统计";
  375. config.requestType = ZYLNetworkRequestTypeGet;
  376. return [super dispatchDataTaskWithConfiguration:config successHandler:successHandler failureHandler:failureHandler];
  377. }
  378. /// 未读访客消息数
  379. /// @param successHandler 请求成功
  380. /// @param failureHandler 请求失败
  381. - (NSNumber *)getIntervieweeUnReadMsgCountSuccessHandler:(ZYLNetworkTaskSuccessHandler)successHandler failureHandler:(ZYLNetworkTaskFailureHandler)failureHandler{
  382. ZYLDataAPIConfiguration *config = [ZYLDataAPIConfiguration new];
  383. config.urlPath = [getIntervieweeUnReadMsgCountPath copy];
  384. config.instructions = @"未读访客消息数";
  385. config.requestType = ZYLNetworkRequestTypeGet;
  386. return [super dispatchDataTaskWithConfiguration:config successHandler:successHandler failureHandler:failureHandler];
  387. }
  388. /// 获取关系墙
  389. /// @param successHandler 请求成功
  390. /// @param failureHandler 请求失败
  391. - (NSNumber *)getWatchWallHisSuccessHandler:(ZYLNetworkTaskSuccessHandler)successHandler failureHandler:(ZYLNetworkTaskFailureHandler)failureHandler{
  392. ZYLDataAPIConfiguration *config = [ZYLDataAPIConfiguration new];
  393. config.urlPath = [getWatchWallHisPath copy];
  394. config.instructions = @"获取关系墙";
  395. config.requestType = ZYLNetworkRequestTypeGet;
  396. return [super dispatchDataTaskWithConfiguration:config successHandler:successHandler failureHandler:failureHandler];
  397. }
  398. /// 获取广播墙
  399. /// @param successHandler 请求成功
  400. /// @param failureHandler 请求失败
  401. - (NSNumber *)getBroadWallHisSuccessHandler:(ZYLNetworkTaskSuccessHandler)successHandler failureHandler:(ZYLNetworkTaskFailureHandler)failureHandler{
  402. ZYLDataAPIConfiguration *config = [ZYLDataAPIConfiguration new];
  403. config.urlPath = [getBroadWallHisPath copy];
  404. config.instructions = @"获取广播墙";
  405. config.requestType = ZYLNetworkRequestTypeGet;
  406. return [super dispatchDataTaskWithConfiguration:config successHandler:successHandler failureHandler:failureHandler];
  407. }
  408. @end