File tree Expand file tree Collapse file tree 2 files changed +16
-14
lines changed
Expand file tree Collapse file tree 2 files changed +16
-14
lines changed Original file line number Diff line number Diff line change @@ -25,17 +25,19 @@ The package needs to be configured with your account's API key which is availabl
2525dashboard.
2626
2727``` python
28- from trophy import TrophyApiClient
29-
30- client = TrophyApiClient(api_key = ' your-api-key' )
31-
32- # Send a metric event
33- client.metrics.event(" words-written" , {
34- " user" : {
35- " id" : " 18" ,
36- " email" : " jk.rowling@harrypotter.com" ,
37- " tz" : " Europe/London"
38- },
39- " value" : 750
40- })
28+ from trophy import EventRequestUser, TrophyApi
29+
30+ client = TrophyApi(
31+ api_key = " YOUR_API_KEY" ,
32+ )
33+
34+ client.metrics.event(
35+ key = " words-written" ,
36+ user = EventRequestUser(
37+ id = " 18" ,
38+ email = " jk.rowling@harrypotter.com" ,
39+ tz = " Europe/London" ,
40+ ),
41+ value = 750.0 ,
42+ )
4143```
Original file line number Diff line number Diff line change @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
44
55[project ]
66name = " trophy"
7- version = " 0.1.7 "
7+ version = " 0.1.8 "
88description = " A Python library for the Trophy API"
99license = {text = " MIT" }
1010readme = " README.md"
You can’t perform that action at this time.
0 commit comments