Skip to content

Commit 11d3d06

Browse files
changed write_key to api_key
1 parent 8b04293 commit 11d3d06

3 files changed

Lines changed: 8 additions & 8 deletions

File tree

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,15 @@ Install `interakt-track-python` using pip
88
pip install interakt-track-python
99

1010
## Authentication
11-
Inside your app, you’ll want to **set your** `write_key` before making any track calls:
11+
Inside your app, you’ll want to **set your** `api_key` before making any track calls:
1212
```
1313
import track
1414
15-
track.write_key = "YOUR_WRITE_KEY"
15+
track.api_key = "YOUR_API_KEY"
1616
```
1717
Interakt Track APIs uses HTTP Basic Auth, which involves a `‘username:password’` that is **base64 encoded** and prepended with the string `‘Basic ‘`.
1818

19-
Your **write_key** is your `username` and `password` is empty. Which means if your **write_key** is `'abcd123'`, a colon is added to it, and then the password field is left empty.
19+
Your **api_key** is your `username` and `password` is empty. Which means if your **api_key** is `'abcd123'`, a colon is added to it, and then the password field is left empty.
2020

2121
After base64 encoding `'abcd123:'` becomes `'YWJjZDEyMzo='`; and this is passed in the authorization header like so: `'Authorization: Basic YWJjZDEyMzo='`
2222

@@ -61,7 +61,7 @@ track.identify(
6161
}
6262
)
6363
```
64-
The `identify` call has the following fields:
64+
#### The `identify` call has the following fields:
6565
|Field|Data type|Description|
6666
|--|--|--|
6767
|user_id|str or int|The ID for the user in your database.|
@@ -87,7 +87,7 @@ track.event(
8787
traits={"price": 200}
8888
)
8989
```
90-
The `event` call has the following fields:
90+
#### The `event` call has the following fields:
9191

9292
|Field|Data type|Description|
9393
|--|--|--|

track/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
__version__ = VERSION
44

55
"""Settings"""
6-
write_key = None
6+
api_key = None
77
default_client = None
88
host = None
99
sync_mode = False
@@ -45,7 +45,7 @@ def _proxy(method, *args, **kwargs):
4545
global default_client
4646
if not default_client:
4747
default_client = Client(
48-
write_key=write_key,
48+
write_key=api_key,
4949
host=host,
5050
debug=debug,
5151
sync_mode=sync_mode,

track/version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
VERSION = '1.0.1'
1+
VERSION = '1.0.2'

0 commit comments

Comments
 (0)