抽奖开始

  • TalkfunSDKLiveDelegate 或 TalkfunSDKLifeLiveDelegate
- (void)onLotteryStart:(TFLotteryStart*_Nonnull)result
  • TFLotteryStart
@interface TFLotteryStart : NSObject
/**抽奖编号*/
@property (nonatomic, copy, nonnull)NSString *t;
/**发起抽奖人资料*/
@property (nonatomic, strong, nonnull)TFLotteryStartUser* user;
@end

@interface TFLotteryWinner : NSObject
/**中奖人的编号*/
@property (nonatomic, copy, nonnull)NSString* xid;
/**中奖人名字*/
@property (nonatomic, copy, nonnull)NSString* nickname;
/**发起抽奖人的名字*/
@property (nonatomic, copy, nonnull)NSString* launch_nickname;
/** 是不是自己*/
@property (nonatomic, copy, nonnull) NSString* isMe;
@end

抽奖结束

  • TalkfunSDKLiveDelegate 或 TalkfunSDKLifeLiveDelegate
- (void)onLotteryStop:(TFLotteryStop*_Nonnull)result
  • TFLotteryStop
@interface TFLotteryStop : NSObject
@property (nonatomic, copy, nonnull)NSString* gid;
/**是否显示抽奖结果*/
@property (nonatomic, assign)BOOL pub;
@property (nonatomic, copy, nonnull)NSString* lotery_id;
//中奖人列表
@property (nonatomic, strong)NSMutableArray <TFLotteryWinner *>* _Nullable winnerList;
/**奖品名称*/
@property (nonatomic, copy, nonnull)NSString*prize_name;
@end

----------------------下面的代码为过期的方法,不建议使用----------------------

抽奖开始

  • TalkfunSDKLiveDelegate 或 TalkfunSDKLifeLiveDelegate
- (void)onLotteryStart:(TFLotteryStart*_Nonnull)result

TFLotteryStart参数说明:

参数 类型 描述
t NSString 抽奖编号
user TFLotteryStartUser 发起抽奖人资料

抽奖结束

  • TalkfunSDKLiveDelegate 或 TalkfunSDKLifeLiveDelegate
- (void)onLotteryStop:(TFLotteryStop*_Nonnull)result

TFLotteryStop参数说明:

参数 类型 描述
gid NSString gid
pub BOOL 是否显示抽奖结果
lotery_id NSString lotery_id
winnerList NSMutableArray 中奖人列表
prize_name NSString 奖品名称

-------------------------------------------------------------下面的代码为过期的方法,不建议使用-------------------------------------------------------------

抽奖

抽奖开始: TALKFUN_EVENT_LOTTERY_START

@参数说明:

参数 类型 描述
user NSDictionary 发起人信息(有发起人名字)
调用示例:
[self.talkfunSDK on:TALKFUN_EVENT_LOTTERY_START callback:^(id obj) {
//返回数据
{
    user =     {
        nickname = "\U5146\U80fd";
    };
}
}];

抽奖结束: TALKFUN_EVENT_LOTTERY_STOP

@参数说明:

参数 类型 描述
result NSArray 中奖人信息
调用示例:
[self.talkfunSDK on:TALKFUN_EVENT_LOTTERY_STOP callback:^(id obj) {
//返回数据
{
    result =     (
                {
            "launch_nickname" = "\U5146\U80fd";
            "launch_xid" = 300218;
            liveid = 1269050;
            nickname = rrr;
            roomid = 550481;
            time = "03/04 18:43";
            xid = 346440;
        }
    );
}
}];
result说明:
参数 类型 描述
xid NSString 中奖人ID
launch_xid NSNumber 发起人ID
roomid NSNumber 房间ID
time NSString 抽奖结束时间
liveid NSString 直播ID
nickname NSString 中奖人名字
launch_nickname NSString 发起人名字

大班抽奖开始:

- (void)onLotteryStart:(TFLotteryStartResult*_Nonnull)result

@参数说明:

参数 类型 描述
result NSDictionary 发起人的信息
result说明:
参数 类型 描述
t NSString 抽奖编号
user NSDictionary 发起抽奖人资料
user说明:
参数 类型 描述
gid NSString 发起抽奖人所在的组
nickname NSString 名字
role NSString 角色

大班抽奖结束:

- (void)onLotteryStop:(TFLotteryStopResult*_Nonnull)result

@参数说明:

result说明:
参数 类型 描述
gid NSString 发起抽奖人所在的组
pub BOOL 显示抽奖结果
lotery_id NSString 中奖ID
winnerList NSArray 中奖人列表
prize_name NSString 奖品名称
winnerList里面数据说明:
参数 类型 描述
xid NSString 中奖人的编号
nickname NSString 中奖人名字
launch_nickname NSArray 发起抽奖人的名字
isMe NSString 是不是自己
Copyright Talkfun all right reserved,powered by Gitbook修订时间: 2021-05-25 16:45:00

results matching ""

    No results matching ""