Skip to content

Latest commit

 

History

1 Commit

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

xiaoyuzhouapi

小宇宙 API 文档和测试仓库。

这个仓库整理当前使用的小宇宙接口,包含:

  • docs/apis/*.md: 每个 API 一份 Markdown 文档
  • tests/xiaoyuzhou_api_test.py: Python 测试客户端
  • .github/workflows/check.yml: 基础语法校验
  • .env.example: 环境变量示例

当前支持接口

凭据

不要把 Token 写进仓库。测试脚本从环境变量读取:

$env:XIAOYUZHOU_ACCESS_TOKEN="你的 access token"
$env:XIAOYUZHOU_REFRESH_TOKEN="你的 refresh token"

XIAOYUZHOU_DEVICE_ID 可选,不设置时脚本会根据 token 生成稳定 device id。

安装

cd APIS/xiaoyuzhouapi
python -m pip install -r requirements.txt

登录

python tests/xiaoyuzhou_api_test.py send-code --phone 13800000000
python tests/xiaoyuzhou_api_test.py login-sms --phone 13800000000 --code 123456

登录成功会输出 credential.accessTokencredential.refreshToken

测试

python tests/xiaoyuzhou_api_test.py all
python tests/xiaoyuzhou_api_test.py discovery-feed
python tests/xiaoyuzhou_api_test.py search-podcasts --keyword "科技"
python tests/xiaoyuzhou_api_test.py top-list --category HOT

写入类接口默认 dry-run,必须显式加 --execute 才会真实调用:

python tests/xiaoyuzhou_api_test.py update-subscription --pid xxx --mode ON --execute

文档索引

docs/README.md

About

小宇宙播客api

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages