Skip to content

Commit 9db4493

Browse files
Automatically update Python SDK
1 parent c54898a commit 9db4493

3 files changed

Lines changed: 13 additions & 3 deletions

File tree

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
44

55
[project]
66
name = "trophy"
7-
version = "1.0.11"
7+
version = "1.0.12"
88
description = "A Python library for the Trophy API"
99
license = {text = "MIT"}
1010
readme = "README.md"

trophy/types/event_response.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
import typing
88
from .completed_achievement_response import CompletedAchievementResponse
99
from .metric_event_streak_response import MetricEventStreakResponse
10-
from .points_award import PointsAward
10+
from .metric_event_points_response import MetricEventPointsResponse
1111
from ..core.pydantic_utilities import IS_PYDANTIC_V2
1212

1313

@@ -45,7 +45,7 @@ class EventResponse(UniversalBaseModel):
4545
The user's current streak for the metric, if the metric has streaks enabled.
4646
"""
4747

48-
points: typing.Optional[PointsAward] = pydantic.Field(default=None)
48+
points: typing.Optional[MetricEventPointsResponse] = pydantic.Field(default=None)
4949
"""
5050
The points added by this event, and a breakdown of the points awards that added points.
5151
"""

trophy/types/points_award.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,16 @@ class PointsAward(UniversalBaseModel):
1818
The points awarded by this trigger
1919
"""
2020

21+
date: typing.Optional[str] = pydantic.Field(default=None)
22+
"""
23+
The date these points were awarded, in ISO 8601 format.
24+
"""
25+
26+
total: typing.Optional[float] = pydantic.Field(default=None)
27+
"""
28+
The user's total points after this award occurred.
29+
"""
30+
2131
trigger: typing.Optional[PointsTrigger] = None
2232

2333
if IS_PYDANTIC_V2:

0 commit comments

Comments
 (0)