miduo_client/Assets/Plugins/iOS/TapDB_iOS.framework/Headers/TapDB.h

136 lines
5.4 KiB
C
Raw Normal View History

2020-07-10 09:59:56 +08:00
//
// TyrantdbGameTracker.h
// TapDB_iOS
//
// Created by JiangJiahao on 2019/7/23.
// Copyright © 2019 JiangJiahao. All rights reserved.
//
#import <Foundation/Foundation.h>
NS_ASSUME_NONNULL_BEGIN
// 账户类型
typedef NS_ENUM(NSInteger,TGTUserType) {
TGTTypeAnonymous = 0, // 匿名用户
TGTTypeRegistered // 注册用户
};
// 性别
typedef NS_ENUM(NSInteger,TGTUserSex) {
TGTSexMale = 0, // 男性
TGTSexFemale, // 女性
TGTSexUnknown // 性别未知
};
@interface TapDB : NSObject
/**
*
* https://abc.example.com/的格式,不能为空
*/
+ (void)setHost:(NSString *)host;
/**
*
* https://abc.example.com/的格式,不能为空
*/
+ (void)setCustomEventHost:(NSString *)host;
/**
*
* appId: APP ID
* channel:
* gameVersion: XcodeVersion
*/
+ (void)onStart:(NSString *)appId channel:(NSString *)channel version:(NSString *)gameVersion;
/// 记录一个用户(注意是平台用户,不是游戏角色!!!!),需要保证唯一性
/// @param userId 用户的ID (注意是平台用户ID不是游戏角色ID如果是匿名用户由游戏生成需要保证不同平台用户的唯一性
+ (void)setUser:(NSString *)userId;
/**
*
* userId: IDIDID
* userType:
* userSex:
* userAge: 0
*/
+ (void)setUser:(NSString *)userId userType:(TGTUserType)userType userSex:(TGTUserSex)userSex userAge:(NSInteger)userAge userName:(NSString *)userName DEPRECATED_MSG_ATTRIBUTE("已弃用,直接调用 setUser:(NSString *)userId 即可");
/**
* TapDB SDKonStartappid
* appIdchannelNSDictionaryvaluenil
*/
+ (NSDictionary *)getStartInfo;
/**
*
* level:
*/
+ (void)setLevel:(NSInteger)level;
/**
*
* server:
*/
+ (void)setServer:(NSString *)server;
/// 设置用户名
/// @param name 必传长度大于0并小于等于256用户名
+ (void)setName:(NSString *)name;
/**
*
* orderId: ID
* product:
* amount:
* currencyType: CNY USD EUR
* payment:
*/
+ (void)onChargeRequest:(NSString *)orderId product:(NSString *)product amount:(NSInteger)amount currencyType:(NSString *)currencyType payment:(NSString *)payment DEPRECATED_MSG_ATTRIBUTE("已弃用");
/**
*
* orderId: IDorderId
*/
+ (void)onChargeSuccess:(NSString *)orderId DEPRECATED_MSG_ATTRIBUTE("已弃用");
/**
*
* orderId: IDorderId
* reason:
*/
+ (void)onChargeFail:(NSString *)orderId reason:(NSString *)reason DEPRECATED_MSG_ATTRIBUTE("已弃用");
/**
*
* orderId: ID
* product:
* amount: 100
* currencyType: CNY USD EUR
* payment:
*/
+ (void)onChargeSuccess:(NSString *)orderId product:(NSString *)product amount:(NSInteger)amount currencyType:(NSString *)currencyType payment:(NSString *)payment;
/**
*
* orderId: ID
* product:
* amount: 100
* currencyType: CNY USD EUR
* virtualCurrencyAmount:
* payment:
*/
+ (void)onChargeOnlySuccess:(NSString *)orderId product:(NSString *)product amount:(NSInteger)amount currencyType:(NSString *)currencyType virtualCurrencyAmount:(NSInteger)virtualCurrencyAmount payment:(NSString *)payment DEPRECATED_MSG_ATTRIBUTE("已弃用,请调用onChargeSuccess:product:amount:currencyType:payment");
/**
*
* eventCode:
* properties: ,02561E11
*/
+ (void)onEvent:(NSString *)eventCode properties:(NSDictionary *)properties;
@end
NS_ASSUME_NONNULL_END