forked from Countly/countly-sdk-ios
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCountlyUserDetails.h
67 lines (56 loc) · 2.69 KB
/
CountlyUserDetails.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
// CountlyUserDetails.h
//
// This code is provided under the MIT License.
//
// Please visit www.count.ly for more information.
#import <Foundation/Foundation.h>
@protocol CountlyUserDetailsNullableString <NSObject>
@end
@interface NSString (NSStringWithCountlyUserDetailsNullableString) <CountlyUserDetailsNullableString>
@end
@interface NSNull (NSNullWithCountlyUserDetailsNullableString) <CountlyUserDetailsNullableString>
@end
@protocol CountlyUserDetailsNullableDictionary <NSObject>
@end
@interface NSDictionary (NSDictionaryWithCountlyUserDetailsNullableDictionary) <CountlyUserDetailsNullableDictionary>
@end
@interface NSNull (NSNullWithCountlyUserDetailsNullableDictionary) <CountlyUserDetailsNullableDictionary>
@end
@protocol CountlyUserDetailsNullableNumber <NSObject>
@end
@interface NSNumber (NSDictionaryWithCountlyUserDetailsNullableNumber) <CountlyUserDetailsNullableNumber>
@end
@interface NSNull (NSNullWithCountlyUserDetailsNullableNumber) <CountlyUserDetailsNullableNumber>
@end
@interface CountlyUserDetails : NSObject
@property (nonatomic, strong) id<CountlyUserDetailsNullableString> name;
@property (nonatomic, strong) id<CountlyUserDetailsNullableString> username;
@property (nonatomic, strong) id<CountlyUserDetailsNullableString> email;
@property (nonatomic, strong) id<CountlyUserDetailsNullableString> organization;
@property (nonatomic, strong) id<CountlyUserDetailsNullableString> phone;
@property (nonatomic, strong) id<CountlyUserDetailsNullableString> gender;
@property (nonatomic, strong) id<CountlyUserDetailsNullableString> pictureURL;
@property (nonatomic, strong) id<CountlyUserDetailsNullableString> pictureLocalPath;
@property (nonatomic, strong) id<CountlyUserDetailsNullableNumber> birthYear;
@property (nonatomic, strong) id<CountlyUserDetailsNullableDictionary> custom;
+ (CountlyUserDetails *)sharedInstance;
- (void)recordUserDetails;
- (NSString *)serialize;
- (NSData *)pictureUploadDataForRequest:(NSString *)requestString;
#pragma mark -
- (void)set:(NSString *)key value:(NSString *)value;
- (void)setOnce:(NSString *)key value:(NSString *)value;
- (void)unSet:(NSString *)key;
- (void)increment:(NSString *)key;
- (void)incrementBy:(NSString *)key value:(NSInteger)value;
- (void)multiply:(NSString *)key value:(NSInteger)value;
- (void)max:(NSString *)key value:(NSInteger)value;
- (void)min:(NSString *)key value:(NSInteger)value;
- (void)push:(NSString *)key value:(NSString *)value;
- (void)push:(NSString *)key values:(NSArray *)value;
- (void)pushUnique:(NSString *)key value:(NSString *)value;
- (void)pushUnique:(NSString *)key values:(NSArray *)value;
- (void)pull:(NSString *)key value:(NSString *)value;
- (void)pull:(NSString *)key values:(NSArray *)value;
- (void)save;
@end