ecapi-sdk 3.1.1__tar.gz → 3.1.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.1.1
3
+ Version: 3.1.3
4
4
  Summary: ECAPI SDK for Python
5
5
  Author: EaseCation
6
6
  License: MIT
@@ -56,7 +56,7 @@ except ECAPIError as error:
56
56
 
57
57
  ```python
58
58
  client.set_api_key("ec_xxx")
59
- client.set_bearer_token("legacy-or-jwt-token")
59
+ client.set_bearer_token("iam-jwt-token")
60
60
  client.set_app_session_token("app-session-token")
61
61
  client.clear_auth()
62
62
  ```
@@ -38,7 +38,7 @@ except ECAPIError as error:
38
38
 
39
39
  ```python
40
40
  client.set_api_key("ec_xxx")
41
- client.set_bearer_token("legacy-or-jwt-token")
41
+ client.set_bearer_token("iam-jwt-token")
42
42
  client.set_app_session_token("app-session-token")
43
43
  client.clear_auth()
44
44
  ```
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "ecapi-sdk"
7
- version = "3.1.1"
7
+ version = "3.1.3"
8
8
  description = "ECAPI SDK for Python"
9
9
  readme = "README.md"
10
10
  requires-python = ">=3.9"
@@ -348,10 +348,6 @@ class AuthAPI(_BaseApi):
348
348
  """创建 OAuth2 登录会话"""
349
349
  return self._post(f"/auth/oauth2", payload, **kwargs)
350
350
 
351
- def login_by_password(self, payload: Mapping[str, Any], **kwargs: Any) -> Any:
352
- """创建密码登录会话"""
353
- return self._post(f"/auth/login", payload, **kwargs)
354
-
355
351
  def refresh_token(self, payload: Mapping[str, Any], **kwargs: Any) -> Any:
356
352
  """刷新 Token"""
357
353
  return self._post(f"/auth/refresh", payload, **kwargs)
@@ -962,14 +958,6 @@ class UserAPI(_BaseApi):
962
958
  """获取当前用户资料"""
963
959
  return self._get(f"/users/me", None, **kwargs)
964
960
 
965
- def list_all(self, query: Optional[QueryParams] = None, **kwargs: Any) -> Any:
966
- """分页查询用户"""
967
- return self._get(f"/users", query, **kwargs)
968
-
969
- def update_permissions(self, username: str, payload: Mapping[str, Any], **kwargs: Any) -> Any:
970
- """更新用户访问权限"""
971
- return self._put(f"/users/{quote(str(username), safe='')}/accesses", payload, **kwargs)
972
-
973
961
  @dataclass
974
962
  class ClientOptions:
975
963
  base_url: str = DEFAULT_BASE_URL
@@ -139,13 +139,6 @@ class AuditAPIGetPunishmentLogsQuery(TypedDict, total=False):
139
139
  banType: QueryValue
140
140
  durationRange: QueryValue
141
141
 
142
- class AuthAPILoginByPasswordBodyRequired(TypedDict):
143
- username: str
144
- password: str
145
-
146
- class AuthAPILoginByPasswordBody(AuthAPILoginByPasswordBodyRequired, total=False):
147
- pass
148
-
149
142
  class AuthAPILoginByOauth2BodyRequired(TypedDict):
150
143
  code: str
151
144
 
@@ -848,16 +841,6 @@ class StageLogAPIListQuery(TypedDict, total=False):
848
841
  current: QueryValue
849
842
  pageSize: QueryValue
850
843
 
851
- class UserAPIListAllQuery(TypedDict, total=False):
852
- current: QueryValue
853
- pageSize: QueryValue
854
-
855
- class UserAPIUpdatePermissionsBodyRequired(TypedDict):
856
- accesses: Sequence[Any]
857
-
858
- class UserAPIUpdatePermissionsBody(UserAPIUpdatePermissionsBodyRequired, total=False):
859
- password: str
860
-
861
844
  class ECAPIError(Exception):
862
845
  status: int
863
846
  payload: Any
@@ -889,7 +872,6 @@ class AuditAPI:
889
872
  class AuthAPI:
890
873
  def get_open_id(self, **kwargs: Any) -> Any: ...
891
874
  def login_by_oauth2(self, payload: AuthAPILoginByOauth2Body, **kwargs: Any) -> Any: ...
892
- def login_by_password(self, payload: AuthAPILoginByPasswordBody, **kwargs: Any) -> Any: ...
893
875
  def refresh_token(self, payload: AuthAPIRefreshTokenBody, **kwargs: Any) -> Any: ...
894
876
 
895
877
  class BroadcastAPI:
@@ -1096,8 +1078,6 @@ class SystemAPI:
1096
1078
  class UserAPI:
1097
1079
  def get_by_id(self, id: str, **kwargs: Any) -> Any: ...
1098
1080
  def get_me(self, **kwargs: Any) -> Any: ...
1099
- def list_all(self, query: Optional[UserAPIListAllQuery] = ..., **kwargs: Any) -> Any: ...
1100
- def update_permissions(self, username: str, payload: UserAPIUpdatePermissionsBody, **kwargs: Any) -> Any: ...
1101
1081
 
1102
1082
  @dataclass
1103
1083
  class ClientOptions:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: ecapi-sdk
3
- Version: 3.1.1
3
+ Version: 3.1.3
4
4
  Summary: ECAPI SDK for Python
5
5
  Author: EaseCation
6
6
  License: MIT
@@ -56,7 +56,7 @@ except ECAPIError as error:
56
56
 
57
57
  ```python
58
58
  client.set_api_key("ec_xxx")
59
- client.set_bearer_token("legacy-or-jwt-token")
59
+ client.set_bearer_token("iam-jwt-token")
60
60
  client.set_app_session_token("app-session-token")
61
61
  client.clear_auth()
62
62
  ```
File without changes