| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196 |
- //
- // JXAPIService.h
- // AICity
- //
- // Created by TogetherWatch on 2025-10-13.
- // Feature: 003-ios-api-https - 剧星短剧平台API接入
- //
- #import <Foundation/Foundation.h>
- #import "JXDrama.h"
- #import "JXEpisode.h"
- #import "JXCategory.h"
- #import "JXInteraction.h"
- #import "JXNetworkManager.h"
- #import "JXHomeHeaderData.h"
- NS_ASSUME_NONNULL_BEGIN
- /**
- * 剧星平台API服务
- */
- @interface JXAPIService : NSObject
- + (instancetype)sharedService;
- // ==================== 首页相关API ====================
- /**
- * 获取首页头部数据
- * 包含:Banner轮播图、热门影片、热门短剧
- */
- - (void)getHomeHeaderDataWithSuccess:(void (^)(JXHomeHeaderData *headerData))success
- failure:(JXFailureBlock)failure;
- /**
- * 获取今日推荐列表(分页)
- */
- - (void)getDailyRecommendWithPage:(NSInteger)page
- pageSize:(NSInteger)pageSize
- success:(JXSuccessBlock)success
- failure:(JXFailureBlock)failure;
- // ==================== 内容相关API ====================
- /**
- * 获取分类列表
- */
- - (void)getCategoriesWithSuccess:(JXSuccessBlock)success
- failure:(JXFailureBlock)failure;
- /**
- * 获取短剧列表
- */
- - (void)getDramaListWithCategoryId:(nullable NSString *)categoryId
- page:(NSInteger)page
- pageSize:(NSInteger)pageSize
- success:(JXSuccessBlock)success
- failure:(JXFailureBlock)failure;
- /**
- * 获取短剧详情
- */
- - (void)getDramaDetailWithDramaId:(NSString *)dramaId
- success:(JXSuccessBlock)success
- failure:(JXFailureBlock)failure;
- /**
- * 搜索短剧
- */
- - (void)searchDramasWithKeyword:(NSString *)keyword
- page:(NSInteger)page
- pageSize:(NSInteger)pageSize
- success:(JXSuccessBlock)success
- failure:(JXFailureBlock)failure;
- /**
- * 获取交互数据
- */
- - (void)getInteractionDataWithDramaId:(NSString *)dramaId
- episodeId:(nullable NSString *)episodeId
- success:(JXSuccessBlock)success
- failure:(JXFailureBlock)failure;
- // ==================== 播放相关API ====================
- /**
- * 获取播放地址
- */
- - (void)getPlayURLWithEpisodeId:(NSString *)episodeId
- success:(JXSuccessBlock)success
- failure:(JXFailureBlock)failure;
- /**
- * 上报播放进度
- */
- - (void)reportPlaybackProgressWithEpisodeId:(NSString *)episodeId
- position:(NSInteger)position
- duration:(NSInteger)duration
- isCompleted:(BOOL)isCompleted
- success:(JXSuccessBlock)success
- failure:(JXFailureBlock)failure;
- /**
- * 获取播放进度
- */
- - (void)getPlaybackProgressWithEpisodeId:(NSString *)episodeId
- success:(JXSuccessBlock)success
- failure:(JXFailureBlock)failure;
- // ==================== 交互相关API ====================
- /**
- * 点赞/取消点赞
- */
- - (void)toggleLikeWithDramaId:(NSString *)dramaId
- episodeId:(NSString *)episodeId
- success:(JXSuccessBlock)success
- failure:(JXFailureBlock)failure;
- /**
- * 收藏/取消收藏
- */
- - (void)toggleFavoriteWithDramaId:(NSString *)dramaId
- success:(JXSuccessBlock)success
- failure:(JXFailureBlock)failure;
- /**
- * 关注/取消关注
- */
- - (void)toggleFollowWithDramaId:(NSString *)dramaId
- success:(JXSuccessBlock)success
- failure:(JXFailureBlock)failure;
- // ==================== 评论相关API ====================
- /**
- * 获取评论列表
- * @param dramaId 短剧ID
- * @param page 页码(从1开始)
- * @param pageSize 每页数量(默认20)
- */
- - (void)getCommentsWithDramaId:(NSString *)dramaId
- page:(NSInteger)page
- pageSize:(NSInteger)pageSize
- success:(JXSuccessBlock)success
- failure:(JXFailureBlock)failure;
- /**
- * 提交评论
- * @param dramaId 短剧ID
- * @param content 评论内容(最多500字符)
- */
- - (void)submitCommentWithDramaId:(NSString *)dramaId
- content:(NSString *)content
- success:(JXSuccessBlock)success
- failure:(JXFailureBlock)failure;
- /**
- * 点赞评论
- * @param commentId 评论ID
- */
- - (void)likeCommentWithCommentId:(long long)commentId
- success:(JXSuccessBlock)success
- failure:(JXFailureBlock)failure;
- /**
- * 回复评论
- * @param commentId 评论ID
- * @param content 回复内容
- */
- - (void)replyCommentWithCommentId:(long long)commentId
- content:(NSString *)content
- success:(JXSuccessBlock)success
- failure:(JXFailureBlock)failure;
- // ==================== 合集相关API ====================
- /**
- * 获取剧集合集列表
- * @param dramaId 短剧ID
- */
- - (void)getEpisodesWithDramaId:(NSString *)dramaId
- success:(JXSuccessBlock)success
- failure:(JXFailureBlock)failure;
- /**
- * 增加播放次数
- * @param dramaId 短剧ID
- */
- - (void)incrementPlayCountWithDramaId:(NSString *)dramaId
- success:(JXSuccessBlock)success
- failure:(JXFailureBlock)failure;
- @end
- NS_ASSUME_NONNULL_END
|