ecapi-sdk 3.4.1__tar.gz → 3.4.3__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.1
3
+ Version: 3.4.3
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.1"
7
+ version = "3.4.3"
8
8
  description = "ECAPI SDK for Python"
9
9
  readme = "README.md"
10
10
  requires-python = ">=3.9"
@@ -936,6 +936,7 @@ class PlayerStatusAPI(_BaseApi):
936
936
  class ServerAPI(_BaseApi):
937
937
  def __init__(self, http: _HttpClient) -> None:
938
938
  super().__init__(http)
939
+ self.attendance = ServerAttendanceAPI(http)
939
940
  self.broadcast = ServerBroadcastAPI(http)
940
941
  self.config_sync = ServerConfigSyncAPI(http)
941
942
  self.easechat = ServerEaseChatAPI(http)
@@ -962,6 +963,11 @@ class ServerAPI(_BaseApi):
962
963
  """查询服务器运行列表"""
963
964
  return self._get(f"/servers", query, **kwargs)
964
965
 
966
+ class ServerAttendanceAPI(_BaseApi):
967
+ def set_projection(self, ecid: str, payload: Mapping[str, Any], **kwargs: Any) -> Any:
968
+ """设置管理员出勤投影"""
969
+ return self._put(f"/admin/players/{quote(str(ecid), safe='')}/attendance-projection", payload, **kwargs)
970
+
965
971
  class ServerBroadcastAPI(_BaseApi):
966
972
  def compare(self, **kwargs: Any) -> Any:
967
973
  """查询 Broadcast 差异"""
@@ -1141,6 +1147,10 @@ class ServerRoomAPI(_BaseApi):
1141
1147
  """创建自定义房间"""
1142
1148
  return self._post(f"/rooms", payload, **kwargs)
1143
1149
 
1150
+ def create_command(self, payload: Mapping[str, Any], **kwargs: Any) -> Any:
1151
+ """创建房间控制命令"""
1152
+ return self._post(f"/room-control-commands", payload, **kwargs)
1153
+
1144
1154
  def get_db_id(self, query: Optional[QueryParams] = None, **kwargs: Any) -> Any:
1145
1155
  """查询房间数据库 ID"""
1146
1156
  return self._get(f"/rooms/database-ids", query, **kwargs)
@@ -294,7 +294,7 @@ class AdminPlayerDataAPIUpdateBody(TypedDict, total=False):
294
294
  coin: int
295
295
  diamond: int
296
296
  exp: int
297
- email: str
297
+ email: Optional[str]
298
298
 
299
299
  class AdminPlayerDataAPISetRankLevelBodyRequired(TypedDict):
300
300
  level: int
@@ -344,10 +344,10 @@ class AdminPlayerTaskAPICreateBodyRequired(TypedDict):
344
344
  taskId: str
345
345
 
346
346
  class AdminPlayerTaskAPICreateBody(AdminPlayerTaskAPICreateBodyRequired, total=False):
347
- data: str
347
+ data: Optional[str]
348
348
 
349
349
  class AdminPlayerTaskAPIUpdateBodyRequired(TypedDict):
350
- data: str
350
+ data: Optional[str]
351
351
 
352
352
  class AdminPlayerTaskAPIUpdateBody(AdminPlayerTaskAPIUpdateBodyRequired, total=False):
353
353
  pass
@@ -802,6 +802,18 @@ class ServerAPIGetMainstackEventsQueryRequired(TypedDict):
802
802
  class ServerAPIGetMainstackEventsQuery(ServerAPIGetMainstackEventsQueryRequired, total=False):
803
803
  pass
804
804
 
805
+ class ServerAttendanceAPISetProjectionBodyRequired(TypedDict):
806
+ eventId: str
807
+ revision: int
808
+ state: str
809
+ sessionId: Optional[str]
810
+ startedAt: Optional[str]
811
+ elapsedMinutes: int
812
+ occurredAt: str
813
+
814
+ class ServerAttendanceAPISetProjectionBody(ServerAttendanceAPISetProjectionBodyRequired, total=False):
815
+ reason: str
816
+
805
817
  class ServerBroadcastAPIDeployBodyRequired(TypedDict):
806
818
  items: Sequence[Any]
807
819
 
@@ -1006,6 +1018,13 @@ class ServerPlayerCountAPIGetHistoryQuery(ServerPlayerCountAPIGetHistoryQueryReq
1006
1018
  class ServerPlayerCountAPIGetLatestQuery(TypedDict, total=False):
1007
1019
  types: QueryValue
1008
1020
 
1021
+ class ServerRoomAPICreateCommandBodyRequired(TypedDict):
1022
+ runtimeId: int
1023
+ action: str
1024
+
1025
+ class ServerRoomAPICreateCommandBody(ServerRoomAPICreateCommandBodyRequired, total=False):
1026
+ pass
1027
+
1009
1028
  class ServerRoomAPIGetInfoQuery(TypedDict, total=False):
1010
1029
  game: QueryValue
1011
1030
  state: QueryValue
@@ -1317,6 +1336,7 @@ class PlayerStatusAPI:
1317
1336
  def get(self, query: PlayerStatusAPIGetQuery, **kwargs: Any) -> Any: ...
1318
1337
 
1319
1338
  class ServerAPI:
1339
+ attendance: ServerAttendanceAPI
1320
1340
  broadcast: ServerBroadcastAPI
1321
1341
  config_sync: ServerConfigSyncAPI
1322
1342
  easechat: ServerEaseChatAPI
@@ -1334,6 +1354,9 @@ class ServerAPI:
1334
1354
  def get_statistics(self, **kwargs: Any) -> Any: ...
1335
1355
  def list(self, query: Optional[ServerAPIListQuery] = ..., **kwargs: Any) -> Any: ...
1336
1356
 
1357
+ class ServerAttendanceAPI:
1358
+ def set_projection(self, ecid: str, payload: ServerAttendanceAPISetProjectionBody, **kwargs: Any) -> Any: ...
1359
+
1337
1360
  class ServerBroadcastAPI:
1338
1361
  def compare(self, **kwargs: Any) -> Any: ...
1339
1362
  def create(self, payload: ServerBroadcastAPICreateBody, **kwargs: Any) -> Any: ...
@@ -1397,6 +1420,7 @@ class ServerPlayerCountAPI:
1397
1420
 
1398
1421
  class ServerRoomAPI:
1399
1422
  def create(self, payload: ServerRoomAPICreateBody, **kwargs: Any) -> Any: ...
1423
+ def create_command(self, payload: ServerRoomAPICreateCommandBody, **kwargs: Any) -> Any: ...
1400
1424
  def get_db_id(self, query: ServerRoomAPIGetDbIdQuery, **kwargs: Any) -> Any: ...
1401
1425
  def get_info(self, query: Optional[ServerRoomAPIGetInfoQuery] = ..., **kwargs: Any) -> Any: ...
1402
1426
  def get_types(self, **kwargs: Any) -> Any: ...
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: ecapi-sdk
3
- Version: 3.4.1
3
+ Version: 3.4.3
4
4
  Summary: ECAPI SDK for Python
5
5
  Author: EaseCation
6
6
  License: MIT
File without changes
File without changes