ecapi-sdk 3.4.2__tar.gz → 3.4.4__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: ecapi-sdk
3
- Version: 3.4.2
3
+ Version: 3.4.4
4
4
  Summary: ECAPI SDK for Python
5
5
  Author: EaseCation
6
6
  License: MIT
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "ecapi-sdk"
7
- version = "3.4.2"
7
+ version = "3.4.4"
8
8
  description = "ECAPI SDK for Python"
9
9
  readme = "README.md"
10
10
  requires-python = ">=3.9"
@@ -313,6 +313,10 @@ class PIT2API(_BaseApi):
313
313
  """生成或解析 PIT2 物品"""
314
314
  return self._post(f"/pit2/item-builds", payload, **kwargs)
315
315
 
316
+ def create_global_mail(self, payload: Mapping[str, Any], **kwargs: Any) -> Any:
317
+ """创建 PIT2 全服邮件活动"""
318
+ return self._post(f"/pit2/global-mails", payload, **kwargs)
319
+
316
320
  def get_draws(self, query: Optional[QueryParams] = None, **kwargs: Any) -> Any:
317
321
  """分页查询全服 PIT2 抽奖会话"""
318
322
  return self._get(f"/pit2/gacha-draws", query, **kwargs)
@@ -936,6 +940,7 @@ class PlayerStatusAPI(_BaseApi):
936
940
  class ServerAPI(_BaseApi):
937
941
  def __init__(self, http: _HttpClient) -> None:
938
942
  super().__init__(http)
943
+ self.attendance = ServerAttendanceAPI(http)
939
944
  self.broadcast = ServerBroadcastAPI(http)
940
945
  self.config_sync = ServerConfigSyncAPI(http)
941
946
  self.easechat = ServerEaseChatAPI(http)
@@ -962,6 +967,11 @@ class ServerAPI(_BaseApi):
962
967
  """查询服务器运行列表"""
963
968
  return self._get(f"/servers", query, **kwargs)
964
969
 
970
+ class ServerAttendanceAPI(_BaseApi):
971
+ def set_projection(self, ecid: str, payload: Mapping[str, Any], **kwargs: Any) -> Any:
972
+ """设置管理员出勤投影"""
973
+ return self._put(f"/admin/players/{quote(str(ecid), safe='')}/attendance-projection", payload, **kwargs)
974
+
965
975
  class ServerBroadcastAPI(_BaseApi):
966
976
  def compare(self, **kwargs: Any) -> Any:
967
977
  """查询 Broadcast 差异"""
@@ -38,6 +38,23 @@ class PIT2APIGetSeasonExchangesQuery(TypedDict, total=False):
38
38
  seasonId: QueryValue
39
39
  itemKey: QueryValue
40
40
 
41
+ class PIT2APICreateGlobalMailBodyRequired(TypedDict):
42
+ requestId: str
43
+ title: str
44
+ content: str
45
+
46
+ class PIT2APICreateGlobalMailBody(PIT2APICreateGlobalMailBodyRequired, total=False):
47
+ startsAt: str
48
+ endsAt: str
49
+ coins: Union[int, float]
50
+ exp: Union[int, float]
51
+ renown: int
52
+ limitPermission: str
53
+ limitLevel: Union[int, float]
54
+ serializedInventory: str
55
+ items: Sequence[Any]
56
+ reason: str
57
+
41
58
  class PIT2APIBuildItemBodyRequired(TypedDict):
42
59
  source: Mapping[str, Any]
43
60
 
@@ -294,7 +311,7 @@ class AdminPlayerDataAPIUpdateBody(TypedDict, total=False):
294
311
  coin: int
295
312
  diamond: int
296
313
  exp: int
297
- email: str
314
+ email: Optional[str]
298
315
 
299
316
  class AdminPlayerDataAPISetRankLevelBodyRequired(TypedDict):
300
317
  level: int
@@ -344,10 +361,10 @@ class AdminPlayerTaskAPICreateBodyRequired(TypedDict):
344
361
  taskId: str
345
362
 
346
363
  class AdminPlayerTaskAPICreateBody(AdminPlayerTaskAPICreateBodyRequired, total=False):
347
- data: str
364
+ data: Optional[str]
348
365
 
349
366
  class AdminPlayerTaskAPIUpdateBodyRequired(TypedDict):
350
- data: str
367
+ data: Optional[str]
351
368
 
352
369
  class AdminPlayerTaskAPIUpdateBody(AdminPlayerTaskAPIUpdateBodyRequired, total=False):
353
370
  pass
@@ -802,6 +819,18 @@ class ServerAPIGetMainstackEventsQueryRequired(TypedDict):
802
819
  class ServerAPIGetMainstackEventsQuery(ServerAPIGetMainstackEventsQueryRequired, total=False):
803
820
  pass
804
821
 
822
+ class ServerAttendanceAPISetProjectionBodyRequired(TypedDict):
823
+ eventId: str
824
+ revision: int
825
+ state: str
826
+ sessionId: Optional[str]
827
+ startedAt: Optional[str]
828
+ elapsedMinutes: int
829
+ occurredAt: str
830
+
831
+ class ServerAttendanceAPISetProjectionBody(ServerAttendanceAPISetProjectionBodyRequired, total=False):
832
+ reason: str
833
+
805
834
  class ServerBroadcastAPIDeployBodyRequired(TypedDict):
806
835
  items: Sequence[Any]
807
836
 
@@ -1102,6 +1131,7 @@ class ECAPIError(Exception):
1102
1131
 
1103
1132
  class PIT2API:
1104
1133
  def build_item(self, payload: PIT2APIBuildItemBody, **kwargs: Any) -> Any: ...
1134
+ def create_global_mail(self, payload: PIT2APICreateGlobalMailBody, **kwargs: Any) -> Any: ...
1105
1135
  def get_draws(self, query: Optional[PIT2APIGetDrawsQuery] = ..., **kwargs: Any) -> Any: ...
1106
1136
  def get_ender_chest(self, xuid: str, query: Optional[PIT2APIGetEnderChestQuery] = ..., **kwargs: Any) -> Any: ...
1107
1137
  def get_event_queue(self, **kwargs: Any) -> Any: ...
@@ -1324,6 +1354,7 @@ class PlayerStatusAPI:
1324
1354
  def get(self, query: PlayerStatusAPIGetQuery, **kwargs: Any) -> Any: ...
1325
1355
 
1326
1356
  class ServerAPI:
1357
+ attendance: ServerAttendanceAPI
1327
1358
  broadcast: ServerBroadcastAPI
1328
1359
  config_sync: ServerConfigSyncAPI
1329
1360
  easechat: ServerEaseChatAPI
@@ -1341,6 +1372,9 @@ class ServerAPI:
1341
1372
  def get_statistics(self, **kwargs: Any) -> Any: ...
1342
1373
  def list(self, query: Optional[ServerAPIListQuery] = ..., **kwargs: Any) -> Any: ...
1343
1374
 
1375
+ class ServerAttendanceAPI:
1376
+ def set_projection(self, ecid: str, payload: ServerAttendanceAPISetProjectionBody, **kwargs: Any) -> Any: ...
1377
+
1344
1378
  class ServerBroadcastAPI:
1345
1379
  def compare(self, **kwargs: Any) -> Any: ...
1346
1380
  def create(self, payload: ServerBroadcastAPICreateBody, **kwargs: Any) -> Any: ...
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: ecapi-sdk
3
- Version: 3.4.2
3
+ Version: 3.4.4
4
4
  Summary: ECAPI SDK for Python
5
5
  Author: EaseCation
6
6
  License: MIT
File without changes
File without changes