UNPKG

918 BJavaScriptView Raw
1// @flow
2import { NativeModules } from 'react-native';
3
4const { ExponentAmplitude } = NativeModules;
5
6export default {
7 initialize(apiKey: string): void {
8 return ExponentAmplitude.initialize(apiKey);
9 },
10
11 setUserId(userId: string): void {
12 return ExponentAmplitude.setUserId(userId);
13 },
14
15 setUserProperties(userProperties: { [string]: any }): void {
16 return ExponentAmplitude.setUserProperties(userProperties);
17 },
18
19 clearUserProperties(): void {
20 return ExponentAmplitude.clearUserProperties();
21 },
22
23 logEvent(eventName: string): void {
24 return ExponentAmplitude.logEvent(eventName);
25 },
26
27 logEventWithProperties(eventName: string, properties: { [string]: any }): void {
28 return ExponentAmplitude.logEventWithProperties(eventName, properties);
29 },
30
31 setGroup(groupType: string, groupNames: Array<string>): void {
32 return ExponentAmplitude.setGroup(groupType, groupNames);
33 },
34};