您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

123456789101112
  1. from core.plugin.impl.base import BasePluginClient
  2. class PluginAssetManager(BasePluginClient):
  3. def fetch_asset(self, tenant_id: str, id: str) -> bytes:
  4. """
  5. Fetch an asset by id.
  6. """
  7. response = self._request(method="GET", path=f"plugin/{tenant_id}/asset/{id}")
  8. if response.status_code != 200:
  9. raise ValueError(f"can not found asset {id}")
  10. return response.content