Skip to content
chigusa edited this page Aug 17, 2018 · 1 revision

使用 Http Rest API

在通过CLI参数--enable-rpc或在配置文件中指定rpc.enabletrue后,你可以通过Http Restful API的方式在bgo运行期查看和添加直播间,下面是几个🌰

  • 查看所有直播间的状态

    curl 127.0.0.1:8080/lives

  • 添加直播间

    curl -X POST token:114514@archlinux:8080/lives -d '{"lives":[{"url":"https://www.douyu.com/6655","listen":true}]}'

完整API列表请参见API DOC