Skip to content

Commit

Permalink
Fixed example weigh-in data
Browse files Browse the repository at this point in the history
  • Loading branch information
cyberjunky committed Nov 10, 2024
1 parent 9f93af0 commit 0d91b93
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions example.py
Original file line number Diff line number Diff line change
Expand Up @@ -704,11 +704,9 @@ def switch(api, i):
)
elif i == "E":
# Add a weigh-in
weight = 83.6
unit = "kg"
display_json(
f"api.add_weigh_in(weight={weight}, unitKey={unit})",
api.add_weigh_in(weight=weight, unitKey=unit),
f"api.add_weigh_in(weight={weight}, unitKey={weightunit})",
api.add_weigh_in(weight=weight, unitKey=weightunit),
)

# Add a weigh-in with timestamps
Expand All @@ -718,10 +716,10 @@ def switch(api, i):
gmt_timestamp = weigh_in_date.astimezone(timezone.utc).strftime('%Y-%m-%dT%H:%M:%S')

display_json(
f"api.add_weigh_in_with_timestamps(weight={weight}, unitKey={unit}, dateTimestamp={local_timestamp}, gmtTimestamp={gmt_timestamp})",
f"api.add_weigh_in_with_timestamps(weight={weight}, unitKey={weightunit}, dateTimestamp={local_timestamp}, gmtTimestamp={gmt_timestamp})",
api.add_weigh_in_with_timestamps(
weight=weight,
unitKey=unit,
unitKey=weightunit,
dateTimestamp=local_timestamp,
gmtTimestamp=gmt_timestamp
)
Expand Down

0 comments on commit 0d91b93

Please sign in to comment.