forked from stampsy/mixpanel-monotouch
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathApiDefinition.cs
127 lines (90 loc) · 3.74 KB
/
ApiDefinition.cs
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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
using System;
using System.Drawing;
using MonoTouch.ObjCRuntime;
using MonoTouch.Foundation;
using MonoTouch.UIKit;
namespace MixpanelApi
{
[BaseType (typeof (NSObject), Delegates = new string [] { "Delegate" }, Events = new Type [] { typeof(MixpanelDelegate) })]
interface Mixpanel {
[Export ("people", ArgumentSemantic.Retain)]
MixpanelPeople People { get; }
[Export ("distinctId", ArgumentSemantic.Copy)]
string DistinctId { get; [Bind ("identify:")] set; }
[Export ("nameTag", ArgumentSemantic.Copy)]
string NameTag { get; set; }
[Export ("serverURL", ArgumentSemantic.Copy)]
string ServerURL { get; set; }
[Export ("flushInterval")]
uint FlushInterval { get; set; }
[Export ("flushOnBackground")]
bool FlushOnBackground { get; set; }
[Export ("showNetworkActivityIndicator")]
bool ShowNetworkActivityIndicator { get; set; }
[Wrap ("WeakDelegate")]
MixpanelDelegate Delegate { get; set; }
[Export ("delegate", ArgumentSemantic.Assign)][NullAllowed]
NSObject WeakDelegate { get; set; }
[Static]
[Export ("sharedInstanceWithToken:")]
Mixpanel SharedInstanceWithToken (string apiToken);
[Static]
[Export ("sharedInstance")]
Mixpanel SharedInstance { get; }
[Export ("initWithToken:andFlushInterval:")]
IntPtr Constructor (string apiToken, uint flushInterval);
[Export ("track:")]
void Track (string eventName);
[Export ("track:properties:")]
void Track (string eventName, NSDictionary properties);
[Export ("registerSuperProperties:")]
void RegisterSuperProperties (NSDictionary properties);
[Export ("registerSuperPropertiesOnce:")]
void RegisterSuperPropertiesOnce (NSDictionary properties);
[Export ("registerSuperPropertiesOnce:defaultValue:")]
void RegisterSuperPropertiesOnce (NSDictionary properties, NSObject defaultValue);
[Export ("unregisterSuperProperty:")]
void UnregisterSuperProperty (string propertyName);
[Export ("clearSuperProperties")]
void ClearSuperProperties ();
[Export ("currentSuperProperties")]
NSDictionary CurrentSuperProperties ();
[Export ("reset")]
void Reset ();
[Export ("flush")]
void Flush ();
[Export ("archive")]
void Archive ();
}
[BaseType (typeof (NSObject))]
interface MixpanelPeople {
[Export ("addPushDeviceToken:")]
void AddPushDeviceToken (NSData deviceToken);
[Export ("set:")]
void Set (NSDictionary properties);
[Export ("set:to:")]
void Set (string property, NSObject toObject);
[Export("setOnce:")]
void SetOnce (NSDictionary properties);
[Export ("increment:")]
void Increment (NSDictionary properties);
[Export ("increment:by:")]
void Increment (string property, NSNumber amount);
[Export ("append:")]
void Append(NSDictionary properties);
[Export ("trackCharge:")]
void TrackCharge(NSNumber amount);
[Export ("trackCharge:withProperties:")]
void TrackCharge(NSNumber amount, NSDictionary properties);
[Export ("clearCharges")]
void ClearCharges();
[Export ("deleteUser")]
void DeleteUser ();
}
[BaseType (typeof (NSObject))]
[Model]
interface MixpanelDelegate {
[Export ("mixpanelWillFlush:"), DelegateName("MixpanelWillFlushDelegate"), DefaultValue("null")]
bool WillFlush (Mixpanel mixpanel);
}
}