This commit is contained in:
2025-12-04 13:37:11 +08:00
parent f770f8055e
commit b216ddaa61
11 changed files with 377 additions and 10 deletions

View File

@@ -6,18 +6,31 @@
//
#import <Foundation/Foundation.h>
#import "KBCharacter.h"
@class KBUser;
NS_ASSUME_NONNULL_BEGIN
typedef void(^KBMyUserDetailCompletion)(KBUser *_Nullable user, NSError *_Nullable error);
typedef void(^KBCharacterListCompletion)(NSArray<KBCharacter *> *characterArray, NSError *_Nullable error);
typedef void(^KBUpLoadAvatarCompletion)(BOOL success, NSError * _Nullable error);
typedef void(^KBUpdateUserInfoCompletion)(BOOL success, NSError * _Nullable error);
@interface KBMyVM : NSObject
/// 获取当前用户详情(/user/detail
- (void)fetchUserDetailWithCompletion:(KBMyUserDetailCompletion)completion;
/// 用户人设列表(/character/listByUser
- (void)fetchCharacterListByUserWithCompletion:(KBCharacterListCompletion)completion;
/// 上传头像
- (void)upLoadAvatarWithData:(NSData *)avatarData completion:(KBUpLoadAvatarCompletion)completion;
/// 更新用户信息
- (void)updateUserInfo:(KBUser *)user completion:(KBUpdateUserInfoCompletion)completion;
/// 退出登录
- (void)logout;
@end