Merge pull request #50 from dumganhar/adds-cocos-analytics-lib
Adds cocos analytics lib for iOS
This commit is contained in:
commit
7682d77047
|
|
@ -0,0 +1,22 @@
|
|||
#import <Foundation/Foundation.h>
|
||||
|
||||
typedef NS_ENUM(NSUInteger, Gender) {
|
||||
Gender_Unknown,
|
||||
Gender_Male,
|
||||
Gender_Female
|
||||
};
|
||||
|
||||
@interface CAAccount : NSObject
|
||||
|
||||
+ (void)loginStart;
|
||||
+ (void)loginSuccess:(NSString*)uid;
|
||||
+ (void)loginFailed;
|
||||
+ (void)logout;
|
||||
+ (void)setAccountType:(NSString*)accountType;
|
||||
+ (void)setAge:(int)age;
|
||||
+ (void)setGender:(int)gender;
|
||||
+ (void)createRole:(NSString*)roleID userName:(NSString*)userName race:(NSString*)race
|
||||
roleClass:(NSString*)roleClass gameServer:(NSString*)gameServer;
|
||||
+ (void)setLevel:(int)level;
|
||||
|
||||
@end
|
||||
|
|
@ -0,0 +1,14 @@
|
|||
#import <Foundation/Foundation.h>
|
||||
|
||||
@interface CAAgent : NSObject
|
||||
|
||||
+ (void)init:(NSString*)channelID appID:(NSString*)appID appSecret:(NSString*)appSecret;
|
||||
|
||||
+ (void)onResume;
|
||||
+ (void)onPause;
|
||||
+ (void)onDestroy;
|
||||
+ (void)enableDebug:(BOOL)enable;
|
||||
|
||||
+ (BOOL)isInited;
|
||||
|
||||
@end
|
||||
|
|
@ -0,0 +1,9 @@
|
|||
#import <Foundation/Foundation.h>
|
||||
|
||||
@interface CAEvent : NSObject
|
||||
|
||||
+ (void)onEvent:(NSString*)eventName;
|
||||
+ (void)onEventStart:(NSString*)eventName;
|
||||
+ (void)onEventEnd:(NSString*)eventName;
|
||||
|
||||
@end
|
||||
|
|
@ -0,0 +1,10 @@
|
|||
#import <Foundation/Foundation.h>
|
||||
|
||||
@interface CAItem : NSObject
|
||||
|
||||
+ (void)buy:(NSString*)itemID type:(NSString*)itemType count:(int)itemCount virtualCoin:(int)virtualCoin
|
||||
virtualType:(NSString*)virtualType consumePoint:(NSString*)consumePoint;
|
||||
+ (void)get:(NSString*)itemID type:(NSString*)itemType count:(int)itemCount reason:(NSString*)reason;
|
||||
+ (void)consume:(NSString*)itemID type:(NSString*)itemType count:(int)itemCount reason:(NSString*)reason;
|
||||
|
||||
@end
|
||||
|
|
@ -0,0 +1,9 @@
|
|||
#import <Foundation/Foundation.h>
|
||||
|
||||
@interface CALevels : NSObject
|
||||
|
||||
+ (void)begin:(NSString*)level;
|
||||
+ (void)complete:(NSString*)level;
|
||||
+ (void)failed:(NSString*)level reason:(NSString*)reason;
|
||||
|
||||
@end
|
||||
|
|
@ -0,0 +1,10 @@
|
|||
#import <Foundation/Foundation.h>
|
||||
|
||||
@interface CAPeiment : NSObject
|
||||
|
||||
+ (void)peiBegin:(int)amount orderID:(NSString*)orderID peiType:(NSString*)peiType pppID:(NSString*)pppID currencyType:(NSString*)currencyType;
|
||||
+ (void)peiSuccess:(int)amount orderID:(NSString*)orderID peiType:(NSString*)peiType pppID:(NSString*)pppID currencyType:(NSString*)currencyType;
|
||||
+ (void)peiFailed:(int)amount orderID:(NSString*)orderID peiType:(NSString*)peiType pppID:(NSString*)pppID currencyType:(NSString*)currencyType;
|
||||
+ (void)peiCanceled:(int)amount orderID:(NSString*)orderID peiType:(NSString*)peiType pppID:(NSString*)pppID currencyType:(NSString*)currencyType;
|
||||
|
||||
@end
|
||||
|
|
@ -0,0 +1,23 @@
|
|||
#import <Foundation/Foundation.h>
|
||||
|
||||
@interface CATask : NSObject
|
||||
|
||||
@property (readonly) int GuideLine; // 新手任务
|
||||
@property (readonly) int MainLine; // 主线任务
|
||||
@property (readonly) int BranchLine; // 分支任务
|
||||
@property (readonly) int Daily; // 日常任务
|
||||
@property (readonly) int Activity; // 活动任务
|
||||
@property (readonly) int Other; // 其他任务,默认值
|
||||
|
||||
+ (void)begin:(NSString*)taskID taskType:(int)taskType;
|
||||
+ (void)complete:(NSString*)taskID;
|
||||
+ (void)failed:(NSString*)taskID reason:(NSString*)reason;
|
||||
|
||||
+ (int)GuideLine;
|
||||
+ (int)MainLine;
|
||||
+ (int)BranchLine;
|
||||
+ (int)Daily;
|
||||
+ (int)Activity;
|
||||
+ (int)Other;
|
||||
|
||||
@end
|
||||
|
|
@ -0,0 +1,9 @@
|
|||
#import <Foundation/Foundation.h>
|
||||
|
||||
@interface CAVirtual : NSObject
|
||||
|
||||
+ (void)setVirtualNum:(NSString*)type count:(long)count;
|
||||
+ (void)get:(NSString*)type count:(long)count reason:(NSString*)reason;
|
||||
+ (void)consume:(NSString*)type count:(long)count reason:(NSString*)reason;
|
||||
|
||||
@end
|
||||
Binary file not shown.
Loading…
Reference in New Issue