Skip to content

Commit 710ac05

Browse files
committed
Cleaned up simulator
1 parent ac74ee9 commit 710ac05

File tree

1 file changed

+4
-16
lines changed

1 file changed

+4
-16
lines changed

simulator.py

Lines changed: 4 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,8 @@ def failed(status, msg):
4545
raise Exception(msg)
4646

4747

48-
def track():
49-
posthog.track(options.distinct_id, options.event, anonymous_id=options.anonymousId,
48+
def capture():
49+
posthog.capture(options.distinct_id, options.event, anonymous_id=options.anonymousId,
5050
properties=json_hash(options.properties), context=json_hash(options.context))
5151

5252

@@ -55,21 +55,11 @@ def page():
5555
properties=json_hash(options.properties), context=json_hash(options.context))
5656

5757

58-
def screen():
59-
posthog.screen(options.distinct_id, name=options.name, anonymous_id=options.anonymousId,
60-
properties=json_hash(options.properties), context=json_hash(options.context))
61-
62-
6358
def identify():
6459
posthog.identify(options.distinct_id, anonymous_id=options.anonymousId,
6560
traits=json_hash(options.traits), context=json_hash(options.context))
6661

6762

68-
def group():
69-
posthog.group(options.distinct_id, options.groupId, json_hash(options.traits),
70-
json_hash(options.context), anonymous_id=options.anonymousId)
71-
72-
7363
def unknown():
7464
print()
7565

@@ -84,11 +74,9 @@ def unknown():
8474
log.addHandler(ch)
8575

8676
switcher = {
87-
"track": track,
77+
"capture": capture,
8878
"page": page,
89-
"screen": screen,
90-
"identify": identify,
91-
"group": group
79+
"identify": identify
9280
}
9381

9482
func = switcher.get(options.type)

0 commit comments

Comments
 (0)