添加部分埋点
This commit is contained in:
39
Shared/KBMaiPointReporter.h
Normal file
39
Shared/KBMaiPointReporter.h
Normal file
@@ -0,0 +1,39 @@
|
||||
//
|
||||
// KBMaiPointReporter.h
|
||||
// keyBoard
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
#ifndef KB_MAI_POINT_BASE_URL
|
||||
#define KB_MAI_POINT_BASE_URL @"http://192.168.1.188:35310/api"
|
||||
#endif
|
||||
|
||||
#ifndef KB_MAI_POINT_PATH_NEW_ACCOUNT
|
||||
#define KB_MAI_POINT_PATH_NEW_ACCOUNT @"/newAccount"
|
||||
#endif
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
extern NSString * const KBMaiPointErrorDomain;
|
||||
|
||||
typedef void (^KBMaiPointReportCompletion)(BOOL success, NSError * _Nullable error);
|
||||
|
||||
/// Lightweight reporter for Mai point tracking. Safe for app + extension.
|
||||
@interface KBMaiPointReporter : NSObject
|
||||
|
||||
+ (instancetype)sharedReporter;
|
||||
|
||||
/// POST /newAccount with type + account.
|
||||
- (void)reportNewAccountWithType:(NSString *)type
|
||||
account:(NSString *)account
|
||||
completion:(KBMaiPointReportCompletion _Nullable)completion;
|
||||
|
||||
/// Generic POST for future endpoints.
|
||||
- (void)postPath:(NSString *)path
|
||||
parameters:(NSDictionary *)parameters
|
||||
completion:(KBMaiPointReportCompletion _Nullable)completion;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
Reference in New Issue
Block a user