Commit ba1b1f96 authored by 井庆林's avatar 井庆林

code review

parent 26df96f5
......@@ -164,28 +164,13 @@ NS_ASSUME_NONNULL_BEGIN
+ (NSInteger)normalPhobosCount;
/** 获取所有非立即发送埋点数据 */
+ (NSDictionary *)normalPhobosData;
+ (NSArray *)normalPhobosData;
/** 获取url的非立即发送埋点数量 */
+ (NSInteger)normalPhobosCountForURL:(NSString *)url;
/** 获取serverAPI的非立即发送埋点数据 */
+ (NSArray *)normalPhobosDataForServerAPI;
/** 获取url的非立即发送埋点数据 */
+ (NSArray *)normalPhobosDataForURL:(NSString *)url;
/** 获取所有立即发送埋点数量 */
+ (NSUInteger)immediatelyPhobosCount;
/** 获取所有立即发送埋点数据 */
+ (NSDictionary *)immediatelyPhobosData;
/** 获取serverAPI的立即发送埋点数据 */
+ (NSArray *)immediatelyPhobosForServerAPI;
/** 获取url的立即发送埋点数据 */
+ (NSArray *)immediatelyPhobosDataForURL:(NSString *)url;
/** 获取url的立即发送埋点数量 */
+ (NSUInteger)immediatelyPhobosCountForURL:(NSString *)url;
+ (NSArray *)immediatelyPhobosData;
/** 清除非立即发送埋点数据缓存 */
......@@ -195,9 +180,5 @@ NS_ASSUME_NONNULL_BEGIN
+ (void)removeAllImmediatelyPhobosData;
/** 获取将要发送的数据 */
@property (nonatomic, copy) void (^phobosSendDataBlock)(NSArray *datas);
@end
NS_ASSUME_NONNULL_END
......@@ -218,26 +218,13 @@ static BOOL isGray = NO;
}
/** 获取所有非立即发送埋点数据 */
+ (NSDictionary *)normalPhobosData {
+ (NSArray *)normalPhobosData {
return isGray ? [NewPhobos normalPhobosData] : nil;
}
/** 获取url的非立即发送埋点数量 */
+ (NSUInteger)normalPhobosCountForURL:(NSString *)url {
return isGray ? [NewPhobos normalPhobosCountForURL:url] : 0;
}
+ (NSArray *)normalPhobosDataForServerAPI {
return isGray ? [NewPhobos normalPhobosDataForServerAPI] : nil;
}
/** 获取url的非立即发送埋点数据 */
+ (NSArray *)normalPhobosDataForURL:(NSString *)url {
return isGray ? [NewPhobos normalPhobosDataForURL:url] : nil;
}
+ (NSArray *)immediatelyPhobosForServerAPI {
return isGray ? [NewPhobos immediatelyPhobosForServerAPI] : nil;
/** 获取所有立即发送埋点数量 */
+ (NSUInteger)immediatelyPhobosCount {
return isGray ? [NewPhobos immediatelyPhobosCount] : 0;
}
/** 获取所有立即发送埋点数据 */
......@@ -269,14 +256,4 @@ return isGray ? [NewPhobos normalPhobosDataForServerAPI] : nil;
}
}
- (void)setPhobosSendDataBlock:(void (^)(NSArray *))phobosSendDataBlock {
if (isGray) {
NewPhobos.sharedClient.phobosSendDataBlock = phobosSendDataBlock;
}
}
- (void (^)(NSArray *))phobosSendDataBlock {
return NewPhobos.sharedClient.phobosSendDataBlock;
}
@end
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment