新增素材更新功能

This commit is contained in:
18610128193
2026-06-23 14:16:31 +08:00
parent b88546ab66
commit 242030c50b
11 changed files with 1109 additions and 7 deletions
+24
View File
@@ -78,4 +78,28 @@ class DouyinApi:
url,
'POST',
{"json": params or {}}
)
#获取素材消耗
async def get_material_cost(self, oauth_id: str, params: any, request_count: int = 3) -> Dict[str, Any]:
if not oauth_id:
raise RuntimeError('OAuth ID is not set.')
url = "https://api.oceanengine.com/open_api/v3.0/report/custom/get/"
return await self.request.request_with_token_with_context(
oauth_id,
url,
'GET',
{'params': params or {}},
request_count=request_count
)
#获取账户信息
async def get_account_info(self, oauth_id: str, params: any) -> Dict[str, Any]:
if not oauth_id:
raise RuntimeError('OAuth ID is not set.')
url = "https://api.oceanengine.com/open_api/2/agent/advertiser_info/query/"
return await self.request.request_with_token_with_context(
oauth_id,
url,
'GET',
{'params': params or {}}
)