Skip to content

Commit 1f4c6a3

Browse files
Automatically update Python SDK
1 parent 35c9c30 commit 1f4c6a3

87 files changed

Lines changed: 7027 additions & 274 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

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

‎trophy/__init__.py‎

Lines changed: 192 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,21 @@
2222
AdminLeaderboardRankBy,
2323
AdminLeaderboardRunUnit,
2424
AdminLeaderboardStatus,
25+
AdminPointsBoost,
26+
AdminPointsBoostRounding,
27+
AdminPointsBoostStatus,
28+
AdminPointsBoostUserAttributesItem,
29+
AdminPointsLevel,
30+
AdminPointsLevelBadge,
31+
AdminPointsSystem,
32+
AdminPointsSystemBadge,
33+
AdminPointsSystemStatus,
34+
AdminPointsTrigger,
35+
AdminPointsTriggerEventAttributesItem,
36+
AdminPointsTriggerStatus,
37+
AdminPointsTriggerTimeUnit,
38+
AdminPointsTriggerType,
39+
AdminPointsTriggerUserAttributesItem,
2540
BaseStreakResponse,
2641
BulkStreakResponse,
2742
BulkStreakResponseItem,
@@ -39,17 +54,38 @@
3954
CreateMetricRequestItemUnitType,
4055
CreateMetricsRequest,
4156
CreateMetricsResponse,
57+
CreatePointsBoostRequestItem,
58+
CreatePointsBoostRequestItemRounding,
59+
CreatePointsBoostRequestItemUserAttributesItem,
60+
CreatePointsBoostsRequest,
4261
CreatePointsBoostsResponse,
62+
CreatePointsLevelRequestItem,
63+
CreatePointsLevelRequestItemBadge,
64+
CreatePointsLevelsRequest,
65+
CreatePointsLevelsResponse,
66+
CreatePointsSystemRequestItem,
67+
CreatePointsSystemRequestItemBadge,
68+
CreatePointsSystemsRequest,
69+
CreatePointsSystemsResponse,
70+
CreatePointsTriggerRequestItem,
71+
CreatePointsTriggerRequestItemEventAttributesItem,
72+
CreatePointsTriggerRequestItemStatus,
73+
CreatePointsTriggerRequestItemTimeUnit,
74+
CreatePointsTriggerRequestItemType,
75+
CreatePointsTriggerRequestItemUserAttributesItem,
76+
CreatePointsTriggersRequest,
77+
CreatePointsTriggersResponse,
4378
CreateStreakFreezesResponse,
79+
CreatedAdminPointsSystem,
4480
CreatedMetric,
4581
CreatedMetricUnitType,
46-
CreatedPointsBoost,
47-
CreatedPointsBoostRounding,
48-
CreatedPointsBoostStatus,
4982
DeleteAttributesResponse,
5083
DeleteLeaderboardsResponse,
5184
DeleteMetricsResponse,
5285
DeletePointsBoostsResponse,
86+
DeletePointsLevelsResponse,
87+
DeletePointsSystemsResponse,
88+
DeletePointsTriggersResponse,
5389
DeletedResource,
5490
ErrorBody,
5591
EventResponse,
@@ -64,13 +100,34 @@
64100
ListAttributesResponse,
65101
ListLeaderboardsResponse,
66102
ListMetricsResponse,
103+
ListPointsBoostsResponse,
104+
ListPointsLevelsResponse,
105+
ListPointsSystemsResponse,
106+
ListPointsTriggersResponse,
67107
MetricEventLeaderboardResponse,
68108
MetricEventLeaderboardResponseBreakdownAttributeValuesItem,
69109
MetricEventPointsResponse,
70110
MetricEventStreakResponse,
71111
MetricResponse,
72112
NotificationChannel,
73113
NotificationPreferences,
114+
PatchPointsBoostsRequest,
115+
PatchPointsBoostsRequestItem,
116+
PatchPointsBoostsRequestItemRounding,
117+
PatchPointsBoostsRequestItemUserAttributesItem,
118+
PatchPointsBoostsResponse,
119+
PatchPointsLevelsRequest,
120+
PatchPointsLevelsRequestItem,
121+
PatchPointsLevelsRequestItemBadge,
122+
PatchPointsLevelsResponse,
123+
PatchPointsTriggersRequest,
124+
PatchPointsTriggersRequestItem,
125+
PatchPointsTriggersRequestItemEventAttributesItem,
126+
PatchPointsTriggersRequestItemStatus,
127+
PatchPointsTriggersRequestItemTimeUnit,
128+
PatchPointsTriggersRequestItemType,
129+
PatchPointsTriggersRequestItemUserAttributesItem,
130+
PatchPointsTriggersResponse,
74131
PointsAward,
75132
PointsBoost,
76133
PointsBoostRounding,
@@ -110,6 +167,10 @@
110167
UpdateMetricRequestItemUnitType,
111168
UpdateMetricsRequest,
112169
UpdateMetricsResponse,
170+
UpdatePointsSystemRequestItem,
171+
UpdatePointsSystemRequestItemBadge,
172+
UpdatePointsSystemsRequest,
173+
UpdatePointsSystemsResponse,
113174
UpdatedUser,
114175
UpsertedUser,
115176
User,
@@ -174,6 +235,21 @@
174235
"AdminLeaderboardRankBy": ".types",
175236
"AdminLeaderboardRunUnit": ".types",
176237
"AdminLeaderboardStatus": ".types",
238+
"AdminPointsBoost": ".types",
239+
"AdminPointsBoostRounding": ".types",
240+
"AdminPointsBoostStatus": ".types",
241+
"AdminPointsBoostUserAttributesItem": ".types",
242+
"AdminPointsLevel": ".types",
243+
"AdminPointsLevelBadge": ".types",
244+
"AdminPointsSystem": ".types",
245+
"AdminPointsSystemBadge": ".types",
246+
"AdminPointsSystemStatus": ".types",
247+
"AdminPointsTrigger": ".types",
248+
"AdminPointsTriggerEventAttributesItem": ".types",
249+
"AdminPointsTriggerStatus": ".types",
250+
"AdminPointsTriggerTimeUnit": ".types",
251+
"AdminPointsTriggerType": ".types",
252+
"AdminPointsTriggerUserAttributesItem": ".types",
177253
"AsyncTrophyApi": ".client",
178254
"BadRequestError": ".errors",
179255
"BaseStreakResponse": ".types",
@@ -193,17 +269,38 @@
193269
"CreateMetricRequestItemUnitType": ".types",
194270
"CreateMetricsRequest": ".types",
195271
"CreateMetricsResponse": ".types",
272+
"CreatePointsBoostRequestItem": ".types",
273+
"CreatePointsBoostRequestItemRounding": ".types",
274+
"CreatePointsBoostRequestItemUserAttributesItem": ".types",
275+
"CreatePointsBoostsRequest": ".types",
196276
"CreatePointsBoostsResponse": ".types",
277+
"CreatePointsLevelRequestItem": ".types",
278+
"CreatePointsLevelRequestItemBadge": ".types",
279+
"CreatePointsLevelsRequest": ".types",
280+
"CreatePointsLevelsResponse": ".types",
281+
"CreatePointsSystemRequestItem": ".types",
282+
"CreatePointsSystemRequestItemBadge": ".types",
283+
"CreatePointsSystemsRequest": ".types",
284+
"CreatePointsSystemsResponse": ".types",
285+
"CreatePointsTriggerRequestItem": ".types",
286+
"CreatePointsTriggerRequestItemEventAttributesItem": ".types",
287+
"CreatePointsTriggerRequestItemStatus": ".types",
288+
"CreatePointsTriggerRequestItemTimeUnit": ".types",
289+
"CreatePointsTriggerRequestItemType": ".types",
290+
"CreatePointsTriggerRequestItemUserAttributesItem": ".types",
291+
"CreatePointsTriggersRequest": ".types",
292+
"CreatePointsTriggersResponse": ".types",
197293
"CreateStreakFreezesResponse": ".types",
294+
"CreatedAdminPointsSystem": ".types",
198295
"CreatedMetric": ".types",
199296
"CreatedMetricUnitType": ".types",
200-
"CreatedPointsBoost": ".types",
201-
"CreatedPointsBoostRounding": ".types",
202-
"CreatedPointsBoostStatus": ".types",
203297
"DeleteAttributesResponse": ".types",
204298
"DeleteLeaderboardsResponse": ".types",
205299
"DeleteMetricsResponse": ".types",
206300
"DeletePointsBoostsResponse": ".types",
301+
"DeletePointsLevelsResponse": ".types",
302+
"DeletePointsSystemsResponse": ".types",
303+
"DeletePointsTriggersResponse": ".types",
207304
"DeletedResource": ".types",
208305
"ErrorBody": ".types",
209306
"EventResponse": ".types",
@@ -220,6 +317,10 @@
220317
"ListAttributesResponse": ".types",
221318
"ListLeaderboardsResponse": ".types",
222319
"ListMetricsResponse": ".types",
320+
"ListPointsBoostsResponse": ".types",
321+
"ListPointsLevelsResponse": ".types",
322+
"ListPointsSystemsResponse": ".types",
323+
"ListPointsTriggersResponse": ".types",
223324
"MetricEventLeaderboardResponse": ".types",
224325
"MetricEventLeaderboardResponseBreakdownAttributeValuesItem": ".types",
225326
"MetricEventPointsResponse": ".types",
@@ -228,6 +329,23 @@
228329
"NotFoundError": ".errors",
229330
"NotificationChannel": ".types",
230331
"NotificationPreferences": ".types",
332+
"PatchPointsBoostsRequest": ".types",
333+
"PatchPointsBoostsRequestItem": ".types",
334+
"PatchPointsBoostsRequestItemRounding": ".types",
335+
"PatchPointsBoostsRequestItemUserAttributesItem": ".types",
336+
"PatchPointsBoostsResponse": ".types",
337+
"PatchPointsLevelsRequest": ".types",
338+
"PatchPointsLevelsRequestItem": ".types",
339+
"PatchPointsLevelsRequestItemBadge": ".types",
340+
"PatchPointsLevelsResponse": ".types",
341+
"PatchPointsTriggersRequest": ".types",
342+
"PatchPointsTriggersRequestItem": ".types",
343+
"PatchPointsTriggersRequestItemEventAttributesItem": ".types",
344+
"PatchPointsTriggersRequestItemStatus": ".types",
345+
"PatchPointsTriggersRequestItemTimeUnit": ".types",
346+
"PatchPointsTriggersRequestItemType": ".types",
347+
"PatchPointsTriggersRequestItemUserAttributesItem": ".types",
348+
"PatchPointsTriggersResponse": ".types",
231349
"PointsAward": ".types",
232350
"PointsBoost": ".types",
233351
"PointsBoostRounding": ".types",
@@ -272,6 +390,10 @@
272390
"UpdateMetricRequestItemUnitType": ".types",
273391
"UpdateMetricsRequest": ".types",
274392
"UpdateMetricsResponse": ".types",
393+
"UpdatePointsSystemRequestItem": ".types",
394+
"UpdatePointsSystemRequestItemBadge": ".types",
395+
"UpdatePointsSystemsRequest": ".types",
396+
"UpdatePointsSystemsResponse": ".types",
275397
"UpdatedUser": ".types",
276398
"UpsertedUser": ".types",
277399
"User": ".types",
@@ -358,6 +480,21 @@ def __dir__():
358480
"AdminLeaderboardRankBy",
359481
"AdminLeaderboardRunUnit",
360482
"AdminLeaderboardStatus",
483+
"AdminPointsBoost",
484+
"AdminPointsBoostRounding",
485+
"AdminPointsBoostStatus",
486+
"AdminPointsBoostUserAttributesItem",
487+
"AdminPointsLevel",
488+
"AdminPointsLevelBadge",
489+
"AdminPointsSystem",
490+
"AdminPointsSystemBadge",
491+
"AdminPointsSystemStatus",
492+
"AdminPointsTrigger",
493+
"AdminPointsTriggerEventAttributesItem",
494+
"AdminPointsTriggerStatus",
495+
"AdminPointsTriggerTimeUnit",
496+
"AdminPointsTriggerType",
497+
"AdminPointsTriggerUserAttributesItem",
361498
"AsyncTrophyApi",
362499
"BadRequestError",
363500
"BaseStreakResponse",
@@ -377,17 +514,38 @@ def __dir__():
377514
"CreateMetricRequestItemUnitType",
378515
"CreateMetricsRequest",
379516
"CreateMetricsResponse",
517+
"CreatePointsBoostRequestItem",
518+
"CreatePointsBoostRequestItemRounding",
519+
"CreatePointsBoostRequestItemUserAttributesItem",
520+
"CreatePointsBoostsRequest",
380521
"CreatePointsBoostsResponse",
522+
"CreatePointsLevelRequestItem",
523+
"CreatePointsLevelRequestItemBadge",
524+
"CreatePointsLevelsRequest",
525+
"CreatePointsLevelsResponse",
526+
"CreatePointsSystemRequestItem",
527+
"CreatePointsSystemRequestItemBadge",
528+
"CreatePointsSystemsRequest",
529+
"CreatePointsSystemsResponse",
530+
"CreatePointsTriggerRequestItem",
531+
"CreatePointsTriggerRequestItemEventAttributesItem",
532+
"CreatePointsTriggerRequestItemStatus",
533+
"CreatePointsTriggerRequestItemTimeUnit",
534+
"CreatePointsTriggerRequestItemType",
535+
"CreatePointsTriggerRequestItemUserAttributesItem",
536+
"CreatePointsTriggersRequest",
537+
"CreatePointsTriggersResponse",
381538
"CreateStreakFreezesResponse",
539+
"CreatedAdminPointsSystem",
382540
"CreatedMetric",
383541
"CreatedMetricUnitType",
384-
"CreatedPointsBoost",
385-
"CreatedPointsBoostRounding",
386-
"CreatedPointsBoostStatus",
387542
"DeleteAttributesResponse",
388543
"DeleteLeaderboardsResponse",
389544
"DeleteMetricsResponse",
390545
"DeletePointsBoostsResponse",
546+
"DeletePointsLevelsResponse",
547+
"DeletePointsSystemsResponse",
548+
"DeletePointsTriggersResponse",
391549
"DeletedResource",
392550
"ErrorBody",
393551
"EventResponse",
@@ -404,6 +562,10 @@ def __dir__():
404562
"ListAttributesResponse",
405563
"ListLeaderboardsResponse",
406564
"ListMetricsResponse",
565+
"ListPointsBoostsResponse",
566+
"ListPointsLevelsResponse",
567+
"ListPointsSystemsResponse",
568+
"ListPointsTriggersResponse",
407569
"MetricEventLeaderboardResponse",
408570
"MetricEventLeaderboardResponseBreakdownAttributeValuesItem",
409571
"MetricEventPointsResponse",
@@ -412,6 +574,23 @@ def __dir__():
412574
"NotFoundError",
413575
"NotificationChannel",
414576
"NotificationPreferences",
577+
"PatchPointsBoostsRequest",
578+
"PatchPointsBoostsRequestItem",
579+
"PatchPointsBoostsRequestItemRounding",
580+
"PatchPointsBoostsRequestItemUserAttributesItem",
581+
"PatchPointsBoostsResponse",
582+
"PatchPointsLevelsRequest",
583+
"PatchPointsLevelsRequestItem",
584+
"PatchPointsLevelsRequestItemBadge",
585+
"PatchPointsLevelsResponse",
586+
"PatchPointsTriggersRequest",
587+
"PatchPointsTriggersRequestItem",
588+
"PatchPointsTriggersRequestItemEventAttributesItem",
589+
"PatchPointsTriggersRequestItemStatus",
590+
"PatchPointsTriggersRequestItemTimeUnit",
591+
"PatchPointsTriggersRequestItemType",
592+
"PatchPointsTriggersRequestItemUserAttributesItem",
593+
"PatchPointsTriggersResponse",
415594
"PointsAward",
416595
"PointsBoost",
417596
"PointsBoostRounding",
@@ -456,6 +635,10 @@ def __dir__():
456635
"UpdateMetricRequestItemUnitType",
457636
"UpdateMetricsRequest",
458637
"UpdateMetricsResponse",
638+
"UpdatePointsSystemRequestItem",
639+
"UpdatePointsSystemRequestItemBadge",
640+
"UpdatePointsSystemsRequest",
641+
"UpdatePointsSystemsResponse",
459642
"UpdatedUser",
460643
"UpsertedUser",
461644
"User",

‎trophy/admin/points/__init__.py‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,12 @@
66
from importlib import import_module
77

88
if typing.TYPE_CHECKING:
9-
from . import boosts
10-
from .boosts import CreatePointsBoostsRequestBoostsItem, CreatePointsBoostsRequestBoostsItemRounding
9+
from . import boosts, levels, systems, triggers
1110
_dynamic_imports: typing.Dict[str, str] = {
12-
"CreatePointsBoostsRequestBoostsItem": ".boosts",
13-
"CreatePointsBoostsRequestBoostsItemRounding": ".boosts",
1411
"boosts": ".boosts",
12+
"levels": ".levels",
13+
"systems": ".systems",
14+
"triggers": ".triggers",
1515
}
1616

1717

@@ -36,4 +36,4 @@ def __dir__():
3636
return sorted(lazy_attrs)
3737

3838

39-
__all__ = ["CreatePointsBoostsRequestBoostsItem", "CreatePointsBoostsRequestBoostsItemRounding", "boosts"]
39+
__all__ = ["boosts", "levels", "systems", "triggers"]

‎trophy/admin/points/boosts/__init__.py‎

Lines changed: 0 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -2,36 +2,3 @@
22

33
# isort: skip_file
44

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)