You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.rst
+4-6Lines changed: 4 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -118,11 +118,10 @@ Here is a simple example of track event.
118
118
.. code:: python
119
119
120
120
from castle.client import Client
121
-
from castle import events
122
121
123
122
castle = Client.from_request(request)
124
123
castle.track({
125
-
'event': events.LOGIN_SUCCEEDED,
124
+
'event': '$login',
126
125
'user_id': 'user_id'
127
126
})
128
127
@@ -148,11 +147,10 @@ background worker you can generate data for a worker:
148
147
.. code:: python
149
148
150
149
from castle.payload.prepare import PayloadPrepare
151
-
from castle import events
152
150
153
151
payload = PayloadPrepare.call(
154
152
{
155
-
'event': events.LOGIN_SUCCEEDED,
153
+
'event': '$login',
156
154
'user_id': user.id,
157
155
'properties': { 'key': 'value' },
158
156
'user_traits': { 'key': 'value' }
@@ -172,7 +170,7 @@ and use it later in a way
172
170
Events
173
171
--------------
174
172
175
-
List of Recognized Events can be found `here <https://github.com/castle/castle-python/tree/master/castle/events.py>`_ or in the `docs <https://docs.castle.io/api_reference/#list-of-recognized-events>`_.
173
+
List of Recognized Events can be found in the `docs <https://docs.castle.io/api_reference/#list-of-recognized-events>`_.
0 commit comments