NIMSDK-iOS
载入中...
搜索中...
未找到
NIMRedPacketManagerProtocol.h
浏览该文件的文档.
1//
2// NIMRedPacketManagerProtocol.h
3// NIMLib
4//
5// Created by Netease.
6// Copyright © 2017年 Netease. All rights reserved.
7//
8
9#import <Foundation/Foundation.h>
11
12NS_ASSUME_NONNULL_BEGIN
13
14
15/**
16 * 红包 Token 回调
17 *
18 * @param error 错误信息,如果成功,error 为 nil
19 * @param token 红包服务 token 值
20 */
21typedef void(^NIMRedPacketTokenFetchBlock)(NSError * __nullable error, NSString * __nullable token);
22
23
24/**
25 * 红包管理类
26 */
27@protocol NIMRedPacketManager <NSObject>
28
29
30/**
31 * 获取红包服务 token 的回调
32 *
33 * @param request 红包服务请求
34 * @param completion 获取红包 token 回调
35 */
36- (void)fetchTokenWithRedPacketRequest:(NIMRedPacketTokenRequest *)request
37 completion:(nullable NIMRedPacketTokenFetchBlock)completion;
38
39@end
40
41
42NS_ASSUME_NONNULL_END
NS_ASSUME_NONNULL_BEGIN typedef void(^ NIMRedPacketTokenFetchBlock)(NSError *__nullable error, NSString *__nullable token)
Definition: NIMRedPacketRequest.h:29