XYFeedAPIManager.h 7.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142
  1. //
  2. // XYFeedAPIManager.h
  3. // Starbuds
  4. //
  5. // Created by 翟玉磊 on 2020/5/28.
  6. // Copyright © 2020 翟玉磊. All rights reserved.
  7. //
  8. #import "ZYLAPIManager.h"
  9. NS_ASSUME_NONNULL_BEGIN
  10. @interface XYFeedAPIManager : ZYLAPIManager
  11. /// 创建内容
  12. /// @param parameters 参数 https://pt.laylib.com/console/api?p=120592570081591296&i=1162
  13. /// @param successHandler 请求成功
  14. /// @param failureHandler 请求失败
  15. - (NSNumber *)createFeedWithParameters:(NSDictionary *)parameters successHandler:(ZYLNetworkTaskSuccessHandler)successHandler failureHandler:(ZYLNetworkTaskFailureHandler)failureHandler;
  16. /// 获取相册
  17. /// @param lastId 最后一条id
  18. /// @param userId 用户id 不传看自己
  19. /// @param successHandler 请求成功
  20. /// @param failureHandler 请求失败
  21. - (NSNumber *)getPhotoListWithLastId:(NSString *)lastId userId:(NSString *)userId successHandler:(ZYLNetworkTaskSuccessHandler)successHandler failureHandler:(ZYLNetworkTaskFailureHandler)failureHandler;
  22. /// 获取视频列表
  23. /// @param lastId 最后一条id
  24. /// @param userId 用户id 不传看自己
  25. /// @param successHandler 请求成功
  26. /// @param failureHandler 请求失败
  27. - (NSNumber *)getVideoListWithLastId:(NSString *)lastId userId:(NSString *)userId successHandler:(ZYLNetworkTaskSuccessHandler)successHandler failureHandler:(ZYLNetworkTaskFailureHandler)failureHandler;
  28. /// 添加评论
  29. /// @param feedId 内容id
  30. /// @param replyId 答复id
  31. /// @param origReplyId 最顶层答复id
  32. /// @param replyUserId 答复用户id
  33. /// @param content 评论内容
  34. /// @param successHandler 请求成功
  35. /// @param failureHandler 请求失败
  36. - (NSNumber *)feedAddCommentWithFeedId:(NSString *)feedId replyId:(NSString *)replyId origReplyId:(NSString *)origReplyId replyUserId:(NSString *)replyUserId content:(NSString *)content successHandler:(ZYLNetworkTaskSuccessHandler)successHandler failureHandler:(ZYLNetworkTaskFailureHandler)failureHandler;
  37. /// 获取评论
  38. /// @param feedId 内容id
  39. /// @param lastId 分页id
  40. /// @param successHandler 请求成功
  41. /// @param failureHandler 请求失败
  42. - (NSNumber *)getCommentListWithFeedId:(NSString *)feedId lastId:(NSString *)lastId successHandler:(ZYLNetworkTaskSuccessHandler)successHandler failureHandler:(ZYLNetworkTaskFailureHandler)failureHandler;
  43. /// 获取子评论
  44. /// @param lastId 最后一条id
  45. /// @param commentId 当前评论的id
  46. /// @param successHandler 请求成功
  47. /// @param failureHandler 请求失败
  48. - (NSNumber *)getChildCommentListWithLastId:(NSString *)lastId commentId:(NSString *)commentId successHandler:(ZYLNetworkTaskSuccessHandler)successHandler failureHandler:(ZYLNetworkTaskFailureHandler)failureHandler;
  49. /// 添加动作
  50. /// @param targetId 目标id
  51. /// @param actionType 动作类型 点赞:10 点赞取消:11 收藏:20 收藏-取消:21 分享:30
  52. /// @param targetType 目标类型 图文:10 照片:20 视频:30 评论:40
  53. /// @param successHandler 请求成功
  54. /// @param failureHandler 请求失败
  55. - (NSNumber *)addActionWithTargetId:(NSString *)targetId actionType:(NSInteger)actionType targetType:(NSInteger)targetType successHandler:(ZYLNetworkTaskSuccessHandler)successHandler failureHandler:(ZYLNetworkTaskFailureHandler)failureHandler;
  56. //发现
  57. //Query lastId 最后一条id Long
  58. - (NSNumber *)getVideoStreamListWithLastId:(NSString *)lastId successHandler:(ZYLNetworkTaskSuccessHandler)successHandler failureHandler:(ZYLNetworkTaskFailureHandler)failureHandler;
  59. /// 删除评论
  60. /// @param commentId 评论id
  61. /// @param successHandler 请求成功
  62. /// @param failureHandler 请求失败
  63. - (NSNumber *)delCommentWithCommentId:(NSString *)commentId successHandler:(ZYLNetworkTaskSuccessHandler)successHandler failureHandler:(ZYLNetworkTaskFailureHandler)failureHandler;
  64. /// 删除内容
  65. /// @param feedId 内容id
  66. /// @param successHandler 请求成功
  67. /// @param failureHandler 请求失败
  68. - (NSNumber *)delFeedWithFeedId:(NSString *)feedId successHandler:(ZYLNetworkTaskSuccessHandler)successHandler failureHandler:(ZYLNetworkTaskFailureHandler)failureHandler;
  69. /// 添加内容查看数
  70. /// @param feedId 内容id
  71. /// @param successHandler 请求成功
  72. /// @param failureHandler 请求失败
  73. - (NSNumber *)addViewCountWithFeedId:(NSString *)feedId successHandler:(ZYLNetworkTaskSuccessHandler)successHandler failureHandler:(ZYLNetworkTaskFailureHandler)failureHandler;
  74. //获取内容详情
  75. //Query feedId 内容Id Long
  76. - (NSNumber *)getFeedDetailWithFeedId:(NSString *)feedId successHandler:(ZYLNetworkTaskSuccessHandler)successHandler failureHandler:(ZYLNetworkTaskFailureHandler)failureHandler;
  77. /// 创建照片墙
  78. /// @param url 照片链接地址
  79. /// @param successHandler 请求成功
  80. /// @param failureHandler 请求失败
  81. - (NSNumber *)createPhotoWallWithUrl:(NSString *)url successHandler:(ZYLNetworkTaskSuccessHandler)successHandler failureHandler:(ZYLNetworkTaskFailureHandler)failureHandler;
  82. /// 获取照片墙
  83. /// @param userId 用户id
  84. /// @param successHandler 请求成功
  85. /// @param failureHandler 请求失败
  86. - (NSNumber *)getPhotoWallWithUserId:(NSString *)userId successHandler:(ZYLNetworkTaskSuccessHandler)successHandler failureHandler:(ZYLNetworkTaskFailureHandler)failureHandler;
  87. /// 删除照片墙
  88. /// @param photoWallId 照片墙id
  89. /// @param successHandler 请求成功
  90. /// @param failureHandler 请求失败
  91. - (NSNumber *)deletePhotoWallWithiPhotoWallId:(NSString *)photoWallId successHandler:(ZYLNetworkTaskSuccessHandler)successHandler failureHandler:(ZYLNetworkTaskFailureHandler)failureHandler;
  92. /// 获取内容按天分组分页列表
  93. /// @param userId 用户id
  94. /// @param pageNum 当前页码
  95. /// @param pageSize 分页大小
  96. /// @param successHandler 请求成功
  97. /// @param failureHandler 请求失败
  98. - (NSNumber *)getFeedByDatePageListWithUserId:(NSString *)userId pageNum:(NSInteger)pageNum pageSize:(NSInteger)pageSize successHandler:(ZYLNetworkTaskSuccessHandler)successHandler failureHandler:(ZYLNetworkTaskFailureHandler)failureHandler;
  99. /// 获取广场动态
  100. /// @param pageNum 当前页码
  101. /// @param pageSize 分页大小
  102. /// @param successHandler 请求成功
  103. /// @param failureHandler 请求失败
  104. - (NSNumber *)getSquareFeedListWithPageNum:(NSInteger)pageNum pageSize:(NSInteger)pageSize successHandler:(ZYLNetworkTaskSuccessHandler)successHandler failureHandler:(ZYLNetworkTaskFailureHandler)failureHandler;
  105. /// 动态点赞
  106. /// @param feedId 动态ID
  107. /// @param successHandler 请求成功
  108. /// @param failureHandler 请求失败
  109. - (NSNumber *)thumbsUpWithFeedId:(NSString *)feedId successHandler:(ZYLNetworkTaskSuccessHandler)successHandler failureHandler:(ZYLNetworkTaskFailureHandler)failureHandler;
  110. /// 随机获取一个三天内发表过状态的关注的用户
  111. /// @param successHandler 请求成功
  112. /// @param failureHandler 请求失败
  113. - (NSNumber *)getUserFollowNameSuccessHandler:(ZYLNetworkTaskSuccessHandler)successHandler failureHandler:(ZYLNetworkTaskFailureHandler)failureHandler;
  114. /// 获取首页资讯接口
  115. /// @param successHandler 请求成功
  116. /// @param failureHandler 请求失败
  117. - (NSNumber *)getFeedActivityInfoListSuccessHandler:(ZYLNetworkTaskSuccessHandler)successHandler failureHandler:(ZYLNetworkTaskFailureHandler)failureHandler;
  118. @end
  119. NS_ASSUME_NONNULL_END