查询余额 Args: at: Access Token Returns: { "credits": 920, "userPaygateTier": "PAYGATE_TIER_ONE" }
(self, at: str)
| 1341 | # ========== 余额查询 (使用AT) ========== |
| 1342 | |
| 1343 | async def get_credits(self, at: str) -> dict: |
| 1344 | """查询余额 |
| 1345 | |
| 1346 | Args: |
| 1347 | at: Access Token |
| 1348 | |
| 1349 | Returns: |
| 1350 | { |
| 1351 | "credits": 920, |
| 1352 | "userPaygateTier": "PAYGATE_TIER_ONE" |
| 1353 | } |
| 1354 | """ |
| 1355 | url = f"{self.api_base_url}/credits" |
| 1356 | result = await self._make_request( |
| 1357 | method="GET", |
| 1358 | url=url, |
| 1359 | use_at=True, |
| 1360 | at_token=at, |
| 1361 | timeout=self._get_control_plane_timeout(), |
| 1362 | ) |
| 1363 | return result |
| 1364 | |
| 1365 | # ========== 图片上传 (使用AT) ========== |
| 1366 |
no test coverage detected