ecapi-sdk 3.7.9__tar.gz → 3.7.11__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.7.9
3
+ Version: 3.7.11
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.7.9"
7
+ version = "3.7.11"
8
8
  description = "ECAPI SDK for Python"
9
9
  readme = "README.md"
10
10
  requires-python = ">=3.9"
@@ -725,6 +725,10 @@ class AdminPunishmentAPI(_BaseApi):
725
725
  """创建处罚"""
726
726
  return self._post(f"/admin/players/{quote(str(ecid), safe='')}/punishments", payload, **kwargs)
727
727
 
728
+ def get_report_punishment(self, ecid: str, **kwargs: Any) -> Any:
729
+ """获取玩家禁用举报状态"""
730
+ return self._get(f"/admin/players/{quote(str(ecid), safe='')}/report-punishment", None, **kwargs)
731
+
728
732
  def list(self, query: Optional[QueryParams] = None, **kwargs: Any) -> Any:
729
733
  """分页查询处罚列表"""
730
734
  return self._get(f"/admin/punishments", query, **kwargs)
@@ -1003,6 +1007,15 @@ class GameLogAPI(_BaseApi):
1003
1007
  """生化大逃杀大盘统计"""
1004
1008
  return self._get(f"/game-logs/zombieescape/statistics", query, **kwargs)
1005
1009
 
1010
+ class GameplayAnalyticsAPI(_BaseApi):
1011
+ def catalog(self, **kwargs: Any) -> Any:
1012
+ """第一阶段玩法统计目录"""
1013
+ return self._get(f"/gameplay-analytics/catalog", None, **kwargs)
1014
+
1015
+ def daily(self, query: Optional[QueryParams] = None, **kwargs: Any) -> Any:
1016
+ """玩法每日活跃与首次观测留存"""
1017
+ return self._get(f"/gameplay-analytics/daily", query, **kwargs)
1018
+
1006
1019
  class EchoMelandAPI(_BaseApi):
1007
1020
  def add_favorite(self, worldId: Union[int, float], ecid: str, **kwargs: Any) -> Any:
1008
1021
  """添加玩家家园收藏"""
@@ -1196,6 +1209,7 @@ class MinecraftDeveloperAPI(_BaseApi):
1196
1209
  super().__init__(http)
1197
1210
  self.messages = MinecraftMessagesAPI(http)
1198
1211
  self.mobile_mods = MinecraftMobileModsAPI(http)
1212
+ self.promotions = MinecraftPromotionsAPI(http)
1199
1213
 
1200
1214
  def apply_self_test(self, edition: str, projectId: str, payload: Mapping[str, Any], **kwargs: Any) -> Any:
1201
1215
  """申请手游自测"""
@@ -1267,6 +1281,10 @@ class MinecraftMessagesAPI(_BaseApi):
1267
1281
  """读取审核消息正文"""
1268
1282
  return self._get(f"/mcdev/messages/{quote(str(messageId), safe='')}", None, **kwargs)
1269
1283
 
1284
+ def download_attachment(self, messageId: str, attachmentIndex: int, **kwargs: Any) -> Any:
1285
+ """下载审核或编译消息附件"""
1286
+ return self._get(f"/mcdev/messages/{quote(str(messageId), safe='')}/attachments/{quote(str(attachmentIndex), safe='')}", None, response_type="bytes", **kwargs)
1287
+
1270
1288
  def list(self, query: Optional[QueryParams] = None, **kwargs: Any) -> Any:
1271
1289
  """分页查询审核与打包消息"""
1272
1290
  return self._get(f"/mcdev/messages", query, **kwargs)
@@ -1308,9 +1326,9 @@ class MinecraftMobileModsAPI(_BaseApi):
1308
1326
  """读取手机组件编辑规则"""
1309
1327
  return self._get(f"/mcdev/mobile-mods/metadata", None, **kwargs)
1310
1328
 
1311
- def preview_asset(self, id: str, assetId: str, **kwargs: Any) -> Any:
1329
+ def preview_asset(self, id: str, assetId: str, query: Optional[QueryParams] = None, **kwargs: Any) -> Any:
1312
1330
  """读取手机组件素材"""
1313
- return self._get(f"/mcdev/mobile-mods/{quote(str(id), safe='')}/assets/{quote(str(assetId), safe='')}/content", None, response_type="bytes", **kwargs)
1331
+ return self._get(f"/mcdev/mobile-mods/{quote(str(id), safe='')}/assets/{quote(str(assetId), safe='')}/content", query, response_type="bytes", **kwargs)
1314
1332
 
1315
1333
  def preview_upload(self, uploadId: str, **kwargs: Any) -> Any:
1316
1334
  """预览已上传图片"""
@@ -1337,6 +1355,27 @@ class MinecraftMobileModsAPI(_BaseApi):
1337
1355
  payload = _MultipartBody(payload, ['file'])
1338
1356
  return self._post(f"/mcdev/mobile-mods/uploads", payload, **kwargs)
1339
1357
 
1358
+ class MinecraftPromotionsAPI(_BaseApi):
1359
+ def applications(self, query: Optional[QueryParams] = None, **kwargs: Any) -> Any:
1360
+ """查询本人手机版推广申请"""
1361
+ return self._get(f"/mcdev/promotions/applications", query, **kwargs)
1362
+
1363
+ def eligibility(self, **kwargs: Any) -> Any:
1364
+ """查询手机版推广申请资格"""
1365
+ return self._get(f"/mcdev/promotions/eligibility", None, **kwargs)
1366
+
1367
+ def items(self, query: Optional[QueryParams] = None, **kwargs: Any) -> Any:
1368
+ """搜索推广位可申请作品"""
1369
+ return self._get(f"/mcdev/promotions/items", query, **kwargs)
1370
+
1371
+ def positions(self, **kwargs: Any) -> Any:
1372
+ """查询手机版推广资源位"""
1373
+ return self._get(f"/mcdev/promotions/positions", None, **kwargs)
1374
+
1375
+ def settings(self, **kwargs: Any) -> Any:
1376
+ """查询手机版推广功能开关"""
1377
+ return self._get(f"/mcdev/promotions/settings", None, **kwargs)
1378
+
1340
1379
  class OSSAPI(_BaseApi):
1341
1380
  def get_ze_content(self, fileName: str, query: Optional[QueryParams] = None, **kwargs: Any) -> Any:
1342
1381
  """读取 ZE OSS 配置内容"""
@@ -1386,6 +1425,10 @@ class OSSAPI(_BaseApi):
1386
1425
  """更新 ZE OSS 配置内容"""
1387
1426
  return self._put(f"/managed-objects/ze/content/{quote(str(fileName), safe='')}", payload, **kwargs)
1388
1427
 
1428
+ def update_zi_configuration(self, payload: Mapping[str, Any], **kwargs: Any) -> Any:
1429
+ """批量更新 ZI OSS 配置"""
1430
+ return self._put(f"/managed-objects/zombie-infect/configuration", payload, **kwargs)
1431
+
1389
1432
  def update_zi_content(self, fileName: str, payload: Mapping[str, Any], **kwargs: Any) -> Any:
1390
1433
  """更新 ZI OSS 配置内容"""
1391
1434
  return self._put(f"/managed-objects/zombie-infect/content/{quote(str(fileName), safe='')}", payload, **kwargs)
@@ -2017,6 +2060,7 @@ class ECAPIClient:
2017
2060
  self.catalog = CatalogAPI(self._http)
2018
2061
  self.disasters = DisastersAPI(self._http)
2019
2062
  self.game_log = GameLogAPI(self._http)
2063
+ self.gameplay_analytics = GameplayAnalyticsAPI(self._http)
2020
2064
  self.homeland = EchoMelandAPI(self._http)
2021
2065
  self.log = LogAPI(self._http)
2022
2066
  self.lottery = LotteryAPI(self._http)
@@ -697,7 +697,7 @@ class AuthAPILoginByOauth2BodyRequired(TypedDict):
697
697
  code: str
698
698
 
699
699
  class AuthAPILoginByOauth2Body(AuthAPILoginByOauth2BodyRequired, total=False):
700
- pass
700
+ redirectUri: str
701
701
 
702
702
  class AuthAPIRefreshTokenBodyRequired(TypedDict):
703
703
  refreshToken: str
@@ -865,6 +865,14 @@ class GameLogAPIGetZeStatisticsQueryRequired(TypedDict):
865
865
  class GameLogAPIGetZeStatisticsQuery(GameLogAPIGetZeStatisticsQueryRequired, total=False):
866
866
  pass
867
867
 
868
+ class GameplayAnalyticsAPIDailyQueryRequired(TypedDict):
869
+ startDate: QueryValue
870
+ endDate: QueryValue
871
+
872
+ class GameplayAnalyticsAPIDailyQuery(GameplayAnalyticsAPIDailyQueryRequired, total=False):
873
+ scope: QueryValue
874
+ scopeId: QueryValue
875
+
868
876
  class EchoMelandAPIUpdateEnderChestBodyRequired(TypedDict):
869
877
  nbtBase64: Optional[str]
870
878
 
@@ -1239,6 +1247,9 @@ class MinecraftMobileModsAPIUpdateBody(MinecraftMobileModsAPIUpdateBodyRequired,
1239
1247
  increaseVersion: bool
1240
1248
  confirmQueue: bool
1241
1249
 
1250
+ class MinecraftMobileModsAPIPreviewAssetQuery(TypedDict, total=False):
1251
+ variant: QueryValue
1252
+
1242
1253
  class MinecraftMobileModsAPISubmitReviewBody(TypedDict, total=False):
1243
1254
  note: str
1244
1255
  conflictNotify: str
@@ -1249,6 +1260,17 @@ class MinecraftMobileModsAPIApplySelfTestBody(TypedDict, total=False):
1249
1260
  mode: str
1250
1261
  confirmQueue: bool
1251
1262
 
1263
+ class MinecraftPromotionsAPIApplicationsQuery(TypedDict, total=False):
1264
+ current: QueryValue
1265
+ pageSize: QueryValue
1266
+
1267
+ class MinecraftPromotionsAPIItemsQuery(TypedDict, total=False):
1268
+ current: QueryValue
1269
+ pageSize: QueryValue
1270
+ category: QueryValue
1271
+ positionId: QueryValue
1272
+ search: QueryValue
1273
+
1252
1274
  class OSSAPIGetZeContentQuery(TypedDict, total=False):
1253
1275
  versionId: QueryValue
1254
1276
 
@@ -1269,6 +1291,12 @@ class OSSAPIPublishZeFromBbdevBodyRequired(TypedDict):
1269
1291
  class OSSAPIPublishZeFromBbdevBody(OSSAPIPublishZeFromBbdevBodyRequired, total=False):
1270
1292
  pass
1271
1293
 
1294
+ class OSSAPIUpdateZiConfigurationBodyRequired(TypedDict):
1295
+ files: Sequence[Any]
1296
+
1297
+ class OSSAPIUpdateZiConfigurationBody(OSSAPIUpdateZiConfigurationBodyRequired, total=False):
1298
+ pass
1299
+
1272
1300
  class OSSAPIGetZiContentQuery(TypedDict, total=False):
1273
1301
  versionId: QueryValue
1274
1302
 
@@ -1781,6 +1809,7 @@ class ServerRoomAPICreateBody(ServerRoomAPICreateBodyRequired, total=False):
1781
1809
  map: str
1782
1810
  name: str
1783
1811
  owner: str
1812
+ publicRoom: bool
1784
1813
  metadata: str
1785
1814
  ownerOnlyStart: bool
1786
1815
  allowCreative: bool
@@ -1993,6 +2022,7 @@ class AdminPlayerWalletAPI:
1993
2022
  class AdminPunishmentAPI:
1994
2023
  def clear_degree(self, ecid: str, **kwargs: Any) -> Any: ...
1995
2024
  def create(self, ecid: str, payload: AdminPunishmentAPICreateBody, **kwargs: Any) -> Any: ...
2025
+ def get_report_punishment(self, ecid: str, **kwargs: Any) -> Any: ...
1996
2026
  def list(self, query: Optional[AdminPunishmentAPIListQuery] = ..., **kwargs: Any) -> Any: ...
1997
2027
  def list_prism_device_ban_logs(self, query: Optional[AdminPunishmentAPIListPrismDeviceBanLogsQuery] = ..., **kwargs: Any) -> Any: ...
1998
2028
  def remove(self, ecid: str, type: str, query: Optional[AdminPunishmentAPIRemoveQuery] = ..., **kwargs: Any) -> Any: ...
@@ -2081,6 +2111,10 @@ class GameLogAPI:
2081
2111
  def get_players(self, query: GameLogAPIGetPlayersQuery, **kwargs: Any) -> Any: ...
2082
2112
  def get_ze_statistics(self, query: GameLogAPIGetZeStatisticsQuery, **kwargs: Any) -> Any: ...
2083
2113
 
2114
+ class GameplayAnalyticsAPI:
2115
+ def catalog(self, **kwargs: Any) -> Any: ...
2116
+ def daily(self, query: GameplayAnalyticsAPIDailyQuery, **kwargs: Any) -> Any: ...
2117
+
2084
2118
  class EchoMelandAPI:
2085
2119
  def add_favorite(self, worldId: Union[int, float], ecid: str, **kwargs: Any) -> Any: ...
2086
2120
  def delete_member(self, worldId: Union[int, float], ecid: str, **kwargs: Any) -> Any: ...
@@ -2143,6 +2177,7 @@ class LotteryAPI:
2143
2177
  class MinecraftDeveloperAPI:
2144
2178
  messages: MinecraftMessagesAPI
2145
2179
  mobile_mods: MinecraftMobileModsAPI
2180
+ promotions: MinecraftPromotionsAPI
2146
2181
  def apply_self_test(self, edition: str, projectId: str, payload: MinecraftDeveloperAPIApplySelfTestBody, **kwargs: Any) -> Any: ...
2147
2182
  def cancel_self_test(self, edition: str, projectId: str, query: MinecraftDeveloperAPICancelSelfTestQuery, **kwargs: Any) -> Any: ...
2148
2183
  def connect_session(self, payload: MinecraftDeveloperAPIConnectSessionBody, **kwargs: Any) -> Any: ...
@@ -2162,6 +2197,7 @@ class MinecraftDeveloperAPI:
2162
2197
 
2163
2198
  class MinecraftMessagesAPI:
2164
2199
  def detail(self, messageId: str, **kwargs: Any) -> Any: ...
2200
+ def download_attachment(self, messageId: str, attachmentIndex: int, **kwargs: Any) -> Any: ...
2165
2201
  def list(self, query: Optional[MinecraftMessagesAPIListQuery] = ..., **kwargs: Any) -> Any: ...
2166
2202
  def mark_read(self, payload: MinecraftMessagesAPIMarkReadBody, **kwargs: Any) -> Any: ...
2167
2203
  def unread(self, **kwargs: Any) -> Any: ...
@@ -2174,7 +2210,7 @@ class MinecraftMobileModsAPI:
2174
2210
  def feedback(self, id: str, **kwargs: Any) -> Any: ...
2175
2211
  def list(self, query: Optional[MinecraftMobileModsAPIListQuery] = ..., **kwargs: Any) -> Any: ...
2176
2212
  def metadata(self, **kwargs: Any) -> Any: ...
2177
- def preview_asset(self, id: str, assetId: str, **kwargs: Any) -> Any: ...
2213
+ def preview_asset(self, id: str, assetId: str, query: Optional[MinecraftMobileModsAPIPreviewAssetQuery] = ..., **kwargs: Any) -> Any: ...
2178
2214
  def preview_upload(self, uploadId: str, **kwargs: Any) -> Any: ...
2179
2215
  def revoke_review(self, id: str, **kwargs: Any) -> Any: ...
2180
2216
  def status(self, id: str, **kwargs: Any) -> Any: ...
@@ -2182,6 +2218,13 @@ class MinecraftMobileModsAPI:
2182
2218
  def update(self, id: str, payload: MinecraftMobileModsAPIUpdateBody, **kwargs: Any) -> Any: ...
2183
2219
  def upload(self, payload: MinecraftMobileModsAPIUploadBody, **kwargs: Any) -> Any: ...
2184
2220
 
2221
+ class MinecraftPromotionsAPI:
2222
+ def applications(self, query: Optional[MinecraftPromotionsAPIApplicationsQuery] = ..., **kwargs: Any) -> Any: ...
2223
+ def eligibility(self, **kwargs: Any) -> Any: ...
2224
+ def items(self, query: Optional[MinecraftPromotionsAPIItemsQuery] = ..., **kwargs: Any) -> Any: ...
2225
+ def positions(self, **kwargs: Any) -> Any: ...
2226
+ def settings(self, **kwargs: Any) -> Any: ...
2227
+
2185
2228
  class OSSAPI:
2186
2229
  def get_ze_content(self, fileName: str, query: Optional[OSSAPIGetZeContentQuery] = ..., **kwargs: Any) -> Any: ...
2187
2230
  def get_zi_content(self, fileName: str, query: Optional[OSSAPIGetZiContentQuery] = ..., **kwargs: Any) -> Any: ...
@@ -2195,6 +2238,7 @@ class OSSAPI:
2195
2238
  def preview_ze_sync(self, mapKey: str, **kwargs: Any) -> Any: ...
2196
2239
  def publish_ze_from_bbdev(self, mapKey: str, payload: OSSAPIPublishZeFromBbdevBody, **kwargs: Any) -> Any: ...
2197
2240
  def update_ze_content(self, fileName: str, payload: OSSAPIUpdateZeContentBody, **kwargs: Any) -> Any: ...
2241
+ def update_zi_configuration(self, payload: OSSAPIUpdateZiConfigurationBody, **kwargs: Any) -> Any: ...
2198
2242
  def update_zi_content(self, fileName: str, payload: OSSAPIUpdateZiContentBody, **kwargs: Any) -> Any: ...
2199
2243
  def update_zvs_reload_content(self, fileName: str, payload: OSSAPIUpdateZvsReloadContentBody, **kwargs: Any) -> Any: ...
2200
2244
 
@@ -2432,6 +2476,7 @@ class ECAPIClient:
2432
2476
  catalog: CatalogAPI
2433
2477
  disasters: DisastersAPI
2434
2478
  game_log: GameLogAPI
2479
+ gameplay_analytics: GameplayAnalyticsAPI
2435
2480
  homeland: EchoMelandAPI
2436
2481
  log: LogAPI
2437
2482
  lottery: LotteryAPI
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: ecapi-sdk
3
- Version: 3.7.9
3
+ Version: 3.7.11
4
4
  Summary: ECAPI SDK for Python
5
5
  Author: EaseCation
6
6
  License: MIT
File without changes
File without changes