|
1 | 1 | abstract class Events { |
| 2 | + /// Records a custom event with the specified values. |
| 3 | + /// |
| 4 | + /// [key]: Name of the custom event, required, must not be an empty string. |
| 5 | + /// [segmentation]: Segmentation map to associate with the event, can be null. (optional) |
| 6 | + /// [count]: Count to associate with the event, should be more than zero. (optional) |
| 7 | + /// [sum]: Sum to associate with the event. (optional) |
| 8 | + /// [duration]: Duration of the event. (optional) |
| 9 | + /// |
| 10 | + /// Returns a future that resolves to the result of the operation whether success or not. |
2 | 11 | Future<String?> recordEvent(String key, [Map<String, Object>? segmentation, int? count, double? sum, int? duration]); |
| 12 | + |
| 13 | + /// Start timed event with a specified key |
| 14 | + /// |
| 15 | + /// [key]: Name of the custom event, required, must not be an empty string. |
| 16 | + /// |
| 17 | + /// Returns a future that resolves to the result of the operation whether success or not. |
3 | 18 | Future<String?> startEvent(String key); |
| 19 | + |
| 20 | + /// Ends a timed event with a specified key. |
| 21 | + /// |
| 22 | + /// [key]: Name of the custom event, required, must not be an empty string. |
| 23 | + /// [segmentation]: Segmentation map to associate with the event, can be null. (optional) |
| 24 | + /// [count]: Count to associate with the event, should be more than zero. Default value is 1. (optional) |
| 25 | + /// [sum]: Sum to associate with the event. Default value is 0. (optional) |
| 26 | + /// |
| 27 | + /// Returns a future that resolves to the result of the operation whether success or not. |
4 | 28 | Future<String?> endEvent(String key, [Map<String, Object>? segmentation, int? count, double? sum]); |
| 29 | + |
| 30 | + /// Cancel timed event with a specified key |
| 31 | + /// |
| 32 | + /// [key]: Name of the custom event, required, must not be an empty string. |
| 33 | + /// |
| 34 | + /// Returns a future that resolves to the result of the operation whether success or not. |
5 | 35 | Future<String?> cancelEvent(String key); |
6 | 36 | } |
0 commit comments