MCPcopy Create free account
hub / github.com/TheSmallHanCat/flow2api / get_credits

Method get_credits

src/services/flow_client.py:1343–1363  ·  view source on GitHub ↗

查询余额 Args: at: Access Token Returns: { "credits": 920, "userPaygateTier": "PAYGATE_TIER_ONE" }

(self, at: str)

Source from the content-addressed store, hash-verified

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

Callers 4

add_tokenMethod · 0.80
_do_refresh_atMethod · 0.80
refresh_creditsMethod · 0.80

Calls 2

_make_requestMethod · 0.95

Tested by

no test coverage detected