136 lines
3.7 KiB
Objective-C
136 lines
3.7 KiB
Objective-C
//
|
|
// HBNetWorkingUtility+Services.h
|
|
// QinJiuTV
|
|
//
|
|
// Created by HI_LOSER on 2024/5/28.
|
|
//
|
|
|
|
#import "HBNetWorkingUtility.h"
|
|
|
|
NS_ASSUME_NONNULL_BEGIN
|
|
|
|
/// 公共接口
|
|
@interface HBNetWorkingUtility (Commom)
|
|
|
|
/// 用设备信息 注册token
|
|
/// NSUserDefaults HBNetWorkingTokenKey 保存了 token
|
|
/// NSUserDefaults HBCustomerIdKey 保存了 用户id
|
|
+ (void)commom_deviceRegister;
|
|
|
|
|
|
|
|
/// 获取首页滚动
|
|
/// - Parameter complateBlock:
|
|
+ (void)commom_fetchBannersWithComplateBlock:(HBResponseComplateBlock)complateBlock;
|
|
|
|
|
|
/// 短剧搜索
|
|
/// - Parameters:
|
|
/// - key: 搜索的关键字
|
|
/// - complateBlock:
|
|
+ (void)common_searchVideosWithKey:(NSString *) key complateBlock:(HBResponseComplateBlock)complateBlock;
|
|
|
|
|
|
@end
|
|
|
|
/// 首页接口
|
|
@interface HBNetWorkingUtility (home)
|
|
+ (void)home_fetchCategoriesWithComplateBlock:(HBResponseComplateBlock)complateBlock;
|
|
@end
|
|
|
|
/// 用户相关接口
|
|
@interface HBNetWorkingUtility (Customer)
|
|
|
|
/// 第三方登录接口
|
|
/// - Parameters:
|
|
/// - params: @{@"email" : @"dsfasfasf",
|
|
/// @"third_id" : @"sdl342034023424",
|
|
/// @"platform" : @"google",
|
|
/// @"family_name" : @"wu",
|
|
/// @"giving_name" : @"colin",
|
|
/// @"avator" : @"http://"}
|
|
/// - complateBlock:
|
|
+ (void)customer_thirdLoginWithParams:(NSDictionary *) params complateBlock:(HBResponseComplateBlock)complateBlock;
|
|
|
|
/// 退出登录
|
|
/// - Parameter complateBlock:
|
|
+ (void)customer_logoutWithComplateBlock:(HBResponseComplateBlock)complateBlock;
|
|
|
|
/// 注销账户
|
|
/// - Parameter complateBlock:
|
|
+ (void)customer_signoutWithComplateBlock:(HBResponseComplateBlock)complateBlock;
|
|
|
|
/// 获取用户信息
|
|
/// - Parameter complateBlock:
|
|
+ (void)customer_fetchUserInfoWithComplateBlock:(HBResponseComplateBlock)complateBlock;
|
|
|
|
|
|
/// 获取用户的收藏列表
|
|
/// - Parameter complateBlock:
|
|
+ (void)customer_fetchFavoriteListWithComplateBlock:(HBResponseComplateBlock)complateBlock;
|
|
|
|
/// 用户收藏短视频
|
|
/// - Parameters:
|
|
/// - vId: 短视频ID
|
|
/// - complateBlock:
|
|
+ (void)customer_favoriteWithVideoId:(NSInteger )vId complateBlock:(HBResponseComplateBlock)complateBlock;
|
|
|
|
|
|
/// 用户取消收藏短视频
|
|
/// - Parameters:
|
|
/// - vId: 短视频ID
|
|
/// - complateBlock:
|
|
+ (void)customer_unFavoriteWithVideoId:(NSInteger )vId complateBlock:(HBResponseComplateBlock)complateBlock;
|
|
|
|
@end
|
|
|
|
|
|
/// 视频相关接口
|
|
@interface HBNetWorkingUtility (videos)
|
|
|
|
/// 获取短视频分类
|
|
/// - Parameter complateBlock:
|
|
+ (void)videos_fetchCategoriesWithComplateBlock:(HBResponseComplateBlock)complateBlock;
|
|
|
|
/// 根据短视频分类id获取短视频列表
|
|
/// - Parameters:
|
|
/// - cid: 短视频id
|
|
/// - complateBlock:
|
|
+ (void)videos_fetchCategoryVideosWithId:(NSInteger)cid complateBlock:(HBResponseComplateBlock)complateBlock;
|
|
|
|
|
|
/// 获取视频详情 和剧集
|
|
/// - Parameters:
|
|
/// - vId: 短视频id
|
|
/// - complateBlock:
|
|
+ (void)videos_fetchVideoDetailsWithSid:(NSInteger)vId complateBlock:(HBResponseComplateBlock)complateBlock;
|
|
|
|
|
|
/// 上报用户单前观看记录
|
|
/// - Parameters:
|
|
/// - sId: 短视频id
|
|
/// - vId: 剧集id
|
|
/// - complateBlock:
|
|
+ (void)videos_uploadPlayHistoryWithSid:(NSInteger)sId vId:(NSInteger)vId complateBlock:(HBResponseComplateBlock)complateBlock;
|
|
|
|
|
|
/// 获取剧场排行
|
|
/// - Parameter complateBlock:
|
|
+ (void)videos_fetchVisitTopWithComplateBlock:(HBResponseComplateBlock)complateBlock;
|
|
@end
|
|
|
|
/// 推挤页接口
|
|
@interface HBNetWorkingUtility (Discover)
|
|
|
|
/// 推荐页列表
|
|
/// - Parameters:
|
|
/// - page:
|
|
/// - size:
|
|
/// - complateBlock:
|
|
+ (void)discover_fetchRecommandsWithPage:(NSInteger)page
|
|
size:(NSInteger)size
|
|
complateBlock:(HBResponseComplateBlock) complateBlock;
|
|
@end
|
|
|
|
NS_ASSUME_NONNULL_END
|