123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142 |
- //
- // XYFeedAPIManager.h
- // Starbuds
- //
- // Created by 翟玉磊 on 2020/5/28.
- // Copyright © 2020 翟玉磊. All rights reserved.
- //
- #import "ZYLAPIManager.h"
- NS_ASSUME_NONNULL_BEGIN
- @interface XYFeedAPIManager : ZYLAPIManager
- /// 创建内容
- /// @param parameters 参数 https://pt.laylib.com/console/api?p=120592570081591296&i=1162
- /// @param successHandler 请求成功
- /// @param failureHandler 请求失败
- - (NSNumber *)createFeedWithParameters:(NSDictionary *)parameters successHandler:(ZYLNetworkTaskSuccessHandler)successHandler failureHandler:(ZYLNetworkTaskFailureHandler)failureHandler;
- /// 获取相册
- /// @param lastId 最后一条id
- /// @param userId 用户id 不传看自己
- /// @param successHandler 请求成功
- /// @param failureHandler 请求失败
- - (NSNumber *)getPhotoListWithLastId:(NSString *)lastId userId:(NSString *)userId successHandler:(ZYLNetworkTaskSuccessHandler)successHandler failureHandler:(ZYLNetworkTaskFailureHandler)failureHandler;
- /// 获取视频列表
- /// @param lastId 最后一条id
- /// @param userId 用户id 不传看自己
- /// @param successHandler 请求成功
- /// @param failureHandler 请求失败
- - (NSNumber *)getVideoListWithLastId:(NSString *)lastId userId:(NSString *)userId successHandler:(ZYLNetworkTaskSuccessHandler)successHandler failureHandler:(ZYLNetworkTaskFailureHandler)failureHandler;
- /// 添加评论
- /// @param feedId 内容id
- /// @param replyId 答复id
- /// @param origReplyId 最顶层答复id
- /// @param replyUserId 答复用户id
- /// @param content 评论内容
- /// @param successHandler 请求成功
- /// @param failureHandler 请求失败
- - (NSNumber *)feedAddCommentWithFeedId:(NSString *)feedId replyId:(NSString *)replyId origReplyId:(NSString *)origReplyId replyUserId:(NSString *)replyUserId content:(NSString *)content successHandler:(ZYLNetworkTaskSuccessHandler)successHandler failureHandler:(ZYLNetworkTaskFailureHandler)failureHandler;
- /// 获取评论
- /// @param feedId 内容id
- /// @param lastId 分页id
- /// @param successHandler 请求成功
- /// @param failureHandler 请求失败
- - (NSNumber *)getCommentListWithFeedId:(NSString *)feedId lastId:(NSString *)lastId successHandler:(ZYLNetworkTaskSuccessHandler)successHandler failureHandler:(ZYLNetworkTaskFailureHandler)failureHandler;
- /// 获取子评论
- /// @param lastId 最后一条id
- /// @param commentId 当前评论的id
- /// @param successHandler 请求成功
- /// @param failureHandler 请求失败
- - (NSNumber *)getChildCommentListWithLastId:(NSString *)lastId commentId:(NSString *)commentId successHandler:(ZYLNetworkTaskSuccessHandler)successHandler failureHandler:(ZYLNetworkTaskFailureHandler)failureHandler;
- /// 添加动作
- /// @param targetId 目标id
- /// @param actionType 动作类型 点赞:10 点赞取消:11 收藏:20 收藏-取消:21 分享:30
- /// @param targetType 目标类型 图文:10 照片:20 视频:30 评论:40
- /// @param successHandler 请求成功
- /// @param failureHandler 请求失败
- - (NSNumber *)addActionWithTargetId:(NSString *)targetId actionType:(NSInteger)actionType targetType:(NSInteger)targetType successHandler:(ZYLNetworkTaskSuccessHandler)successHandler failureHandler:(ZYLNetworkTaskFailureHandler)failureHandler;
- //发现
- //Query lastId 最后一条id Long
- - (NSNumber *)getVideoStreamListWithLastId:(NSString *)lastId successHandler:(ZYLNetworkTaskSuccessHandler)successHandler failureHandler:(ZYLNetworkTaskFailureHandler)failureHandler;
- /// 删除评论
- /// @param commentId 评论id
- /// @param successHandler 请求成功
- /// @param failureHandler 请求失败
- - (NSNumber *)delCommentWithCommentId:(NSString *)commentId successHandler:(ZYLNetworkTaskSuccessHandler)successHandler failureHandler:(ZYLNetworkTaskFailureHandler)failureHandler;
- /// 删除内容
- /// @param feedId 内容id
- /// @param successHandler 请求成功
- /// @param failureHandler 请求失败
- - (NSNumber *)delFeedWithFeedId:(NSString *)feedId successHandler:(ZYLNetworkTaskSuccessHandler)successHandler failureHandler:(ZYLNetworkTaskFailureHandler)failureHandler;
- /// 添加内容查看数
- /// @param feedId 内容id
- /// @param successHandler 请求成功
- /// @param failureHandler 请求失败
- - (NSNumber *)addViewCountWithFeedId:(NSString *)feedId successHandler:(ZYLNetworkTaskSuccessHandler)successHandler failureHandler:(ZYLNetworkTaskFailureHandler)failureHandler;
- //获取内容详情
- //Query feedId 内容Id Long
- - (NSNumber *)getFeedDetailWithFeedId:(NSString *)feedId successHandler:(ZYLNetworkTaskSuccessHandler)successHandler failureHandler:(ZYLNetworkTaskFailureHandler)failureHandler;
- /// 创建照片墙
- /// @param url 照片链接地址
- /// @param successHandler 请求成功
- /// @param failureHandler 请求失败
- - (NSNumber *)createPhotoWallWithUrl:(NSString *)url successHandler:(ZYLNetworkTaskSuccessHandler)successHandler failureHandler:(ZYLNetworkTaskFailureHandler)failureHandler;
- /// 获取照片墙
- /// @param userId 用户id
- /// @param successHandler 请求成功
- /// @param failureHandler 请求失败
- - (NSNumber *)getPhotoWallWithUserId:(NSString *)userId successHandler:(ZYLNetworkTaskSuccessHandler)successHandler failureHandler:(ZYLNetworkTaskFailureHandler)failureHandler;
- /// 删除照片墙
- /// @param photoWallId 照片墙id
- /// @param successHandler 请求成功
- /// @param failureHandler 请求失败
- - (NSNumber *)deletePhotoWallWithiPhotoWallId:(NSString *)photoWallId successHandler:(ZYLNetworkTaskSuccessHandler)successHandler failureHandler:(ZYLNetworkTaskFailureHandler)failureHandler;
- /// 获取内容按天分组分页列表
- /// @param userId 用户id
- /// @param pageNum 当前页码
- /// @param pageSize 分页大小
- /// @param successHandler 请求成功
- /// @param failureHandler 请求失败
- - (NSNumber *)getFeedByDatePageListWithUserId:(NSString *)userId pageNum:(NSInteger)pageNum pageSize:(NSInteger)pageSize successHandler:(ZYLNetworkTaskSuccessHandler)successHandler failureHandler:(ZYLNetworkTaskFailureHandler)failureHandler;
- /// 获取广场动态
- /// @param pageNum 当前页码
- /// @param pageSize 分页大小
- /// @param successHandler 请求成功
- /// @param failureHandler 请求失败
- - (NSNumber *)getSquareFeedListWithPageNum:(NSInteger)pageNum pageSize:(NSInteger)pageSize successHandler:(ZYLNetworkTaskSuccessHandler)successHandler failureHandler:(ZYLNetworkTaskFailureHandler)failureHandler;
- /// 动态点赞
- /// @param feedId 动态ID
- /// @param successHandler 请求成功
- /// @param failureHandler 请求失败
- - (NSNumber *)thumbsUpWithFeedId:(NSString *)feedId successHandler:(ZYLNetworkTaskSuccessHandler)successHandler failureHandler:(ZYLNetworkTaskFailureHandler)failureHandler;
- /// 随机获取一个三天内发表过状态的关注的用户
- /// @param successHandler 请求成功
- /// @param failureHandler 请求失败
- - (NSNumber *)getUserFollowNameSuccessHandler:(ZYLNetworkTaskSuccessHandler)successHandler failureHandler:(ZYLNetworkTaskFailureHandler)failureHandler;
- /// 获取首页资讯接口
- /// @param successHandler 请求成功
- /// @param failureHandler 请求失败
- - (NSNumber *)getFeedActivityInfoListSuccessHandler:(ZYLNetworkTaskSuccessHandler)successHandler failureHandler:(ZYLNetworkTaskFailureHandler)failureHandler;
- @end
- NS_ASSUME_NONNULL_END
|