Skip to content

Commit 3858b53

Browse files
Automatically update Python SDK
1 parent e80cc06 commit 3858b53

36 files changed

+2071
-26
lines changed

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.42"
7+
version = "1.1.0-beta.4"
88
description = "A Python library for the Trophy API"
99
license = {text = "MIT"}
1010
readme = "README.md"

trophy/__init__.py

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,17 @@
1313
AchievementResponseTrigger,
1414
AchievementResponseUserAttributesItem,
1515
AchievementWithStatsResponse,
16+
ArchivePointsBoostsResponse,
1617
BaseStreakResponse,
1718
BulkInsertIssue,
1819
BulkInsertIssueLevel,
1920
BulkStreakResponse,
2021
BulkStreakResponseItem,
22+
CreatePointsBoostsResponse,
2123
CreateStreakFreezesResponse,
24+
CreatedPointsBoost,
25+
CreatedPointsBoostRounding,
26+
CreatedPointsBoostStatus,
2227
ErrorBody,
2328
EventResponse,
2429
GetUserPointsResponse,
@@ -38,6 +43,12 @@
3843
NotificationPreferences,
3944
NotificationType,
4045
PointsAward,
46+
PointsBoost,
47+
PointsBoostRounding,
48+
PointsBoostStatus,
49+
PointsBoostWebhookPayload,
50+
PointsBoostWebhookPayloadRounding,
51+
PointsBoostWebhookPayloadStatus,
4152
PointsRange,
4253
PointsSummaryResponse,
4354
PointsSystemResponse,
@@ -69,6 +80,8 @@
6980
WebhooksLeaderboardFinishedPayload,
7081
WebhooksLeaderboardRankChangedPayload,
7182
WebhooksLeaderboardStartedPayload,
83+
WebhooksPointsBoostFinishedPayload,
84+
WebhooksPointsBoostStartedPayload,
7285
WebhooksPointsChangedPayload,
7386
WebhooksStreakExtendedPayload,
7487
WebhooksStreakFreezeConsumedPayload,
@@ -106,14 +119,19 @@
106119
"AchievementResponseTrigger": ".types",
107120
"AchievementResponseUserAttributesItem": ".types",
108121
"AchievementWithStatsResponse": ".types",
122+
"ArchivePointsBoostsResponse": ".types",
109123
"AsyncTrophyApi": ".client",
110124
"BadRequestError": ".errors",
111125
"BaseStreakResponse": ".types",
112126
"BulkInsertIssue": ".types",
113127
"BulkInsertIssueLevel": ".types",
114128
"BulkStreakResponse": ".types",
115129
"BulkStreakResponseItem": ".types",
130+
"CreatePointsBoostsResponse": ".types",
116131
"CreateStreakFreezesResponse": ".types",
132+
"CreatedPointsBoost": ".types",
133+
"CreatedPointsBoostRounding": ".types",
134+
"CreatedPointsBoostStatus": ".types",
117135
"ErrorBody": ".types",
118136
"EventResponse": ".types",
119137
"GetUserPointsResponse": ".types",
@@ -136,6 +154,12 @@
136154
"NotificationPreferences": ".types",
137155
"NotificationType": ".types",
138156
"PointsAward": ".types",
157+
"PointsBoost": ".types",
158+
"PointsBoostRounding": ".types",
159+
"PointsBoostStatus": ".types",
160+
"PointsBoostWebhookPayload": ".types",
161+
"PointsBoostWebhookPayloadRounding": ".types",
162+
"PointsBoostWebhookPayloadStatus": ".types",
139163
"PointsRange": ".types",
140164
"PointsSummaryResponse": ".types",
141165
"PointsSystemResponse": ".types",
@@ -176,6 +200,8 @@
176200
"WebhooksLeaderboardFinishedPayload": ".types",
177201
"WebhooksLeaderboardRankChangedPayload": ".types",
178202
"WebhooksLeaderboardStartedPayload": ".types",
203+
"WebhooksPointsBoostFinishedPayload": ".types",
204+
"WebhooksPointsBoostStartedPayload": ".types",
179205
"WebhooksPointsChangedPayload": ".types",
180206
"WebhooksStreakExtendedPayload": ".types",
181207
"WebhooksStreakFreezeConsumedPayload": ".types",
@@ -231,14 +257,19 @@ def __dir__():
231257
"AchievementResponseTrigger",
232258
"AchievementResponseUserAttributesItem",
233259
"AchievementWithStatsResponse",
260+
"ArchivePointsBoostsResponse",
234261
"AsyncTrophyApi",
235262
"BadRequestError",
236263
"BaseStreakResponse",
237264
"BulkInsertIssue",
238265
"BulkInsertIssueLevel",
239266
"BulkStreakResponse",
240267
"BulkStreakResponseItem",
268+
"CreatePointsBoostsResponse",
241269
"CreateStreakFreezesResponse",
270+
"CreatedPointsBoost",
271+
"CreatedPointsBoostRounding",
272+
"CreatedPointsBoostStatus",
242273
"ErrorBody",
243274
"EventResponse",
244275
"GetUserPointsResponse",
@@ -261,6 +292,12 @@ def __dir__():
261292
"NotificationPreferences",
262293
"NotificationType",
263294
"PointsAward",
295+
"PointsBoost",
296+
"PointsBoostRounding",
297+
"PointsBoostStatus",
298+
"PointsBoostWebhookPayload",
299+
"PointsBoostWebhookPayloadRounding",
300+
"PointsBoostWebhookPayloadStatus",
264301
"PointsRange",
265302
"PointsSummaryResponse",
266303
"PointsSystemResponse",
@@ -301,6 +338,8 @@ def __dir__():
301338
"WebhooksLeaderboardFinishedPayload",
302339
"WebhooksLeaderboardRankChangedPayload",
303340
"WebhooksLeaderboardStartedPayload",
341+
"WebhooksPointsBoostFinishedPayload",
342+
"WebhooksPointsBoostStartedPayload",
304343
"WebhooksPointsChangedPayload",
305344
"WebhooksStreakExtendedPayload",
306345
"WebhooksStreakFreezeConsumedPayload",

trophy/admin/__init__.py

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,13 @@
66
from importlib import import_module
77

88
if typing.TYPE_CHECKING:
9-
from . import streaks
9+
from . import points, streaks
1010
from .streaks import RestoreStreaksRequestUsersItem
11-
_dynamic_imports: typing.Dict[str, str] = {"RestoreStreaksRequestUsersItem": ".streaks", "streaks": ".streaks"}
11+
_dynamic_imports: typing.Dict[str, str] = {
12+
"RestoreStreaksRequestUsersItem": ".streaks",
13+
"points": ".points",
14+
"streaks": ".streaks",
15+
}
1216

1317

1418
def __getattr__(attr_name: str) -> typing.Any:
@@ -32,4 +36,4 @@ def __dir__():
3236
return sorted(lazy_attrs)
3337

3438

35-
__all__ = ["RestoreStreaksRequestUsersItem", "streaks"]
39+
__all__ = ["RestoreStreaksRequestUsersItem", "points", "streaks"]

trophy/admin/client.py

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
from .raw_client import AsyncRawAdminClient, RawAdminClient
99

1010
if typing.TYPE_CHECKING:
11+
from .points.client import AsyncPointsClient, PointsClient
1112
from .streaks.client import AsyncStreaksClient, StreaksClient
1213

1314

@@ -16,6 +17,7 @@ def __init__(self, *, client_wrapper: SyncClientWrapper):
1617
self._raw_client = RawAdminClient(client_wrapper=client_wrapper)
1718
self._client_wrapper = client_wrapper
1819
self._streaks: typing.Optional[StreaksClient] = None
20+
self._points: typing.Optional[PointsClient] = None
1921

2022
@property
2123
def with_raw_response(self) -> RawAdminClient:
@@ -36,12 +38,21 @@ def streaks(self):
3638
self._streaks = StreaksClient(client_wrapper=self._client_wrapper)
3739
return self._streaks
3840

41+
@property
42+
def points(self):
43+
if self._points is None:
44+
from .points.client import PointsClient # noqa: E402
45+
46+
self._points = PointsClient(client_wrapper=self._client_wrapper)
47+
return self._points
48+
3949

4050
class AsyncAdminClient:
4151
def __init__(self, *, client_wrapper: AsyncClientWrapper):
4252
self._raw_client = AsyncRawAdminClient(client_wrapper=client_wrapper)
4353
self._client_wrapper = client_wrapper
4454
self._streaks: typing.Optional[AsyncStreaksClient] = None
55+
self._points: typing.Optional[AsyncPointsClient] = None
4556

4657
@property
4758
def with_raw_response(self) -> AsyncRawAdminClient:
@@ -61,3 +72,11 @@ def streaks(self):
6172

6273
self._streaks = AsyncStreaksClient(client_wrapper=self._client_wrapper)
6374
return self._streaks
75+
76+
@property
77+
def points(self):
78+
if self._points is None:
79+
from .points.client import AsyncPointsClient # noqa: E402
80+
81+
self._points = AsyncPointsClient(client_wrapper=self._client_wrapper)
82+
return self._points

trophy/admin/points/__init__.py

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
# This file was auto-generated by Fern from our API Definition.
2+
3+
# isort: skip_file
4+
5+
import typing
6+
from importlib import import_module
7+
8+
if typing.TYPE_CHECKING:
9+
from . import boosts
10+
from .boosts import CreatePointsBoostsRequestBoostsItem, CreatePointsBoostsRequestBoostsItemRounding
11+
_dynamic_imports: typing.Dict[str, str] = {
12+
"CreatePointsBoostsRequestBoostsItem": ".boosts",
13+
"CreatePointsBoostsRequestBoostsItemRounding": ".boosts",
14+
"boosts": ".boosts",
15+
}
16+
17+
18+
def __getattr__(attr_name: str) -> typing.Any:
19+
module_name = _dynamic_imports.get(attr_name)
20+
if module_name is None:
21+
raise AttributeError(f"No {attr_name} found in _dynamic_imports for module name -> {__name__}")
22+
try:
23+
module = import_module(module_name, __package__)
24+
if module_name == f".{attr_name}":
25+
return module
26+
else:
27+
return getattr(module, attr_name)
28+
except ImportError as e:
29+
raise ImportError(f"Failed to import {attr_name} from {module_name}: {e}") from e
30+
except AttributeError as e:
31+
raise AttributeError(f"Failed to get {attr_name} from {module_name}: {e}") from e
32+
33+
34+
def __dir__():
35+
lazy_attrs = list(_dynamic_imports.keys())
36+
return sorted(lazy_attrs)
37+
38+
39+
__all__ = ["CreatePointsBoostsRequestBoostsItem", "CreatePointsBoostsRequestBoostsItemRounding", "boosts"]
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
# This file was auto-generated by Fern from our API Definition.
2+
3+
# isort: skip_file
4+
5+
import typing
6+
from importlib import import_module
7+
8+
if typing.TYPE_CHECKING:
9+
from .types import CreatePointsBoostsRequestBoostsItem, CreatePointsBoostsRequestBoostsItemRounding
10+
_dynamic_imports: typing.Dict[str, str] = {
11+
"CreatePointsBoostsRequestBoostsItem": ".types",
12+
"CreatePointsBoostsRequestBoostsItemRounding": ".types",
13+
}
14+
15+
16+
def __getattr__(attr_name: str) -> typing.Any:
17+
module_name = _dynamic_imports.get(attr_name)
18+
if module_name is None:
19+
raise AttributeError(f"No {attr_name} found in _dynamic_imports for module name -> {__name__}")
20+
try:
21+
module = import_module(module_name, __package__)
22+
if module_name == f".{attr_name}":
23+
return module
24+
else:
25+
return getattr(module, attr_name)
26+
except ImportError as e:
27+
raise ImportError(f"Failed to import {attr_name} from {module_name}: {e}") from e
28+
except AttributeError as e:
29+
raise AttributeError(f"Failed to get {attr_name} from {module_name}: {e}") from e
30+
31+
32+
def __dir__():
33+
lazy_attrs = list(_dynamic_imports.keys())
34+
return sorted(lazy_attrs)
35+
36+
37+
__all__ = ["CreatePointsBoostsRequestBoostsItem", "CreatePointsBoostsRequestBoostsItemRounding"]

0 commit comments

Comments
 (0)