Skip to content

Commit 4bc1e6a

Browse files
Automatically update Python SDK
1 parent 069d7f4 commit 4bc1e6a

5 files changed

Lines changed: 18 additions & 13 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.10.0"
7+
version = "1.11.0"
88
description = "A Python library for the Trophy API"
99
license = {text = "MIT"}
1010
readme = "README.md"

trophy/types/leaderboard_event.py

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,17 @@
1111

1212
class LeaderboardEvent(UniversalBaseModel):
1313
"""
14-
A leaderboard event representing a change in a user's rank or value.
14+
A daily leaderboard snapshot entry representing the user's rank/value state and the previous persisted state.
1515
"""
1616

17-
timestamp: typing.Optional[dt.datetime] = pydantic.Field(default=None)
17+
date: str = pydantic.Field()
1818
"""
19-
The timestamp when the event occurred.
19+
The leaderboard snapshot date in YYYY-MM-DD format.
20+
"""
21+
22+
timestamp: dt.datetime = pydantic.Field()
23+
"""
24+
Deprecated ISO timestamp for the snapshot day boundary. Use `date` instead.
2025
"""
2126

2227
previous_rank: typing_extensions.Annotated[typing.Optional[int], FieldMetadata(alias="previousRank")] = (

trophy/types/user_leaderboard_response_with_history.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ class UserLeaderboardResponseWithHistory(UserLeaderboardResponse):
1515

1616
history: typing.List[LeaderboardEvent] = pydantic.Field()
1717
"""
18-
An array of events showing the user's rank and value changes over time.
18+
An array of daily change events showing the user's rank and value over time.
1919
"""
2020

2121
if IS_PYDANTIC_V2:

trophy/users/client.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -736,7 +736,7 @@ def leaderboard(
736736
request_options: typing.Optional[RequestOptions] = None,
737737
) -> UserLeaderboardResponseWithHistory:
738738
"""
739-
Get a user's rank, value, and history for a specific leaderboard.
739+
Get a user's rank, value, and daily ranking history for a specific leaderboard.
740740
741741
Parameters
742742
----------
@@ -750,7 +750,7 @@ def leaderboard(
750750
Specific run date in YYYY-MM-DD format. If not provided, returns the current run.
751751
752752
num_events : typing.Optional[int]
753-
The number of events to return in the history array.
753+
The number of days to return in the leaderboard history for the user.
754754
755755
request_options : typing.Optional[RequestOptions]
756756
Request-specific configuration.
@@ -1643,7 +1643,7 @@ async def leaderboard(
16431643
request_options: typing.Optional[RequestOptions] = None,
16441644
) -> UserLeaderboardResponseWithHistory:
16451645
"""
1646-
Get a user's rank, value, and history for a specific leaderboard.
1646+
Get a user's rank, value, and daily ranking history for a specific leaderboard.
16471647
16481648
Parameters
16491649
----------
@@ -1657,7 +1657,7 @@ async def leaderboard(
16571657
Specific run date in YYYY-MM-DD format. If not provided, returns the current run.
16581658
16591659
num_events : typing.Optional[int]
1660-
The number of events to return in the history array.
1660+
The number of days to return in the leaderboard history for the user.
16611661
16621662
request_options : typing.Optional[RequestOptions]
16631663
Request-specific configuration.

trophy/users/raw_client.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1300,7 +1300,7 @@ def leaderboard(
13001300
request_options: typing.Optional[RequestOptions] = None,
13011301
) -> HttpResponse[UserLeaderboardResponseWithHistory]:
13021302
"""
1303-
Get a user's rank, value, and history for a specific leaderboard.
1303+
Get a user's rank, value, and daily ranking history for a specific leaderboard.
13041304
13051305
Parameters
13061306
----------
@@ -1314,7 +1314,7 @@ def leaderboard(
13141314
Specific run date in YYYY-MM-DD format. If not provided, returns the current run.
13151315
13161316
num_events : typing.Optional[int]
1317-
The number of events to return in the history array.
1317+
The number of days to return in the leaderboard history for the user.
13181318
13191319
request_options : typing.Optional[RequestOptions]
13201320
Request-specific configuration.
@@ -2728,7 +2728,7 @@ async def leaderboard(
27282728
request_options: typing.Optional[RequestOptions] = None,
27292729
) -> AsyncHttpResponse[UserLeaderboardResponseWithHistory]:
27302730
"""
2731-
Get a user's rank, value, and history for a specific leaderboard.
2731+
Get a user's rank, value, and daily ranking history for a specific leaderboard.
27322732
27332733
Parameters
27342734
----------
@@ -2742,7 +2742,7 @@ async def leaderboard(
27422742
Specific run date in YYYY-MM-DD format. If not provided, returns the current run.
27432743
27442744
num_events : typing.Optional[int]
2745-
The number of events to return in the history array.
2745+
The number of days to return in the leaderboard history for the user.
27462746
27472747
request_options : typing.Optional[RequestOptions]
27482748
Request-specific configuration.

0 commit comments

Comments
 (0)