40 lines
1.2 KiB
Objective-C
40 lines
1.2 KiB
Objective-C
//
|
|
// YMGiftStorage.h
|
|
// YUMI
|
|
//
|
|
// Created by YUMI on 2021/11/17.
|
|
//
|
|
|
|
#import <Foundation/Foundation.h>
|
|
|
|
NS_ASSUME_NONNULL_BEGIN
|
|
@class GiftInfoModel, GiftPanelTabModel;
|
|
@interface XPGiftStorage : NSObject
|
|
+ (instancetype)shareStorage;
|
|
- (instancetype)init NS_UNAVAILABLE;
|
|
- (instancetype)copy NS_UNAVAILABLE;
|
|
- (instancetype)mutableCopy NS_UNAVAILABLE;
|
|
|
|
- (NSString *)defaultKey;
|
|
|
|
- (NSArray<GiftInfoModel *> *)getGiftDatasource:(NSString *)roomUid;
|
|
- (NSArray<GiftPanelTabModel *> *)getGiftPanelTagsDatasource:(NSString *)roomUid;
|
|
|
|
- (void)saveGiftDatasource:(NSArray<GiftInfoModel *> *)giftArray roomUid:(NSString *)roomUid;
|
|
- (void)saveGiftPanelTagsDatasource:(NSArray<GiftPanelTabModel *> *)giftArray roomUid:(NSString *)roomUid;
|
|
|
|
/**
|
|
这个不是最好的获取方式 可能由于没有房间uid 导致获取失败
|
|
目前用在公屏获取礼物 因为公屏的架构 传入一个房间id 的话 改动太大 先这样用着吧
|
|
*/
|
|
/// 获取当前房间的数据中的礼物
|
|
/// @param giftId 礼物的id
|
|
- (GiftInfoModel *)findGiftInfo:(NSString *)giftId;
|
|
|
|
//- (NSArray *)cacheWith:(NSDictionary *)response inRoom:(NSString *)roomUid;
|
|
- (NSArray *)cacheTagsWith:(NSDictionary *)response inRoom:(NSString *)roomUid;
|
|
|
|
@end
|
|
|
|
NS_ASSUME_NONNULL_END
|