auth

账号状况

这个模块提供了一些和账号状况有关的函数

p115client.tool.auth.open_app_check(app_id: int, base_url: str = 'https://hnqrcodeapi.115.com', *, async_: Literal[False] = False, **request_kwargs) bool[source]
p115client.tool.auth.open_app_check(app_id: int, base_url: str = 'https://hnqrcodeapi.115.com', *, async_: Literal[True], **request_kwargs) Coroutine[Any, Any, bool]

检查 open 平台的某个 app_id 是否可用

Parameters:
  • app_id – AppID (也叫 client_id

  • base_url – 接口的基地址

  • async – 是否异步

  • request_kwargs – 其它请求参数

Returns:

是否可用

p115client.tool.auth.open_app_name(client: str | PathLike | P115Client, app_id: int, base_url: str = 'https://hnqrcodeapi.115.com', *, async_: Literal[False] = False, **request_kwargs) None | str[source]
p115client.tool.auth.open_app_name(client: str | PathLike | P115Client, app_id: int, base_url: str = 'https://hnqrcodeapi.115.com', *, async_: Literal[True], **request_kwargs) Coroutine[Any, Any, None | str]

获取 open 平台的某个 app_id 对应的名字

Parameters:
  • client – 115 客户端或 cookies

  • app_id – AppID (也叫 client_id

  • base_url – 接口的基地址

  • async – 是否异步

  • request_kwargs – 其它请求参数

Returns:

名字,如果为 None,说明此应用不可用

p115client.tool.auth.open_deauth(client: str | PathLike | P115Client, predicate: None | Callable = None, *, async_: Literal[False] = False, **request_kwargs) None[source]
p115client.tool.auth.open_deauth(client: str | PathLike | P115Client, predicate: None | Callable = None, *, async_: Literal[True], **request_kwargs) Coroutine[Any, Any, None]

批量解绑开放应用

Parameters:
  • client – 115 客户端或 cookies

  • predicate – 筛选条件

  • async – 是否异步

  • request_kwargs – 其它请求参数