该库为与Xbox One游戏机一起使用的SmartGlass协议提供了核心基础
有关深度信息,请查看文档:https://openxbox.org/smartglass-documentation
注意:自29.02.2020以来
通过PIP
pip install xbox-smartglass-core
有关开发定位的说明,请参见此读数的结尾。
有几个命令行实用程序可以退房::
xbox-cli
某些功能(例如GAMEDVR记录)需要使用您的Microsoft帐户进行身份验证,以验证您有权触发此类操作。
验证 /获取身份验证令牌使用::
xbox-authenticate
使用信息
示例Localhost:
# Serve on '127.0.0.1:5557'
$ xbox-rest-server
INFO: Started server process [927195]
INFO: Waiting for application startup.
INFO: Application startup complete.
INFO: Uvicorn running on http://127.0.0.1:5557 (Press CTRL+C to quit)
示例本地网络:
192.168.0.100是运行服务器的计算机的IP地址:
xbox-rest-server --host 192.168.0.100 -p 1234
INFO: Started server process [927195]
INFO: Waiting for application startup.
INFO: Application startup complete.
INFO: Uvicorn running on http://192.168.0.100:1234 (Press CTRL+C to quit)
由于从烧瓶框架迁移到Fastapi,因此有一个不错的OpenAPI文档可用:
http:// {ipaddress}:{port}/docs
如果您的服务器在127.0.0.1:5557或127.0.0.1:8080上运行,则需要在Azure AD上注册自己的OAUTH应用程序,并向REST服务器的登录端点提供适当的参数。
查看:https://github.com/openxbox/xbox-webapi-python/blob/master/master/readme.md
将标题通信从Xbox转发到您本地主机,以使用第三方辐射4 PIP男孩应用程序或扩展程序
xbox-fo4-relay
在这里,您可以看到SmartGlass TUI(文本用户界面):
准备贡献了吗?这是为本地开发设置xbox-smartglass-core-python
的方法。
xbox-smartglass-core-python
repo。 git clone [email protected]:your_name_here/xbox-smartglass-core-python.git
python -m venv ~/pyvenv/xbox-smartglass
source ~/pyvenv/xbox-smartglass/bin/activate
cd xbox-smartglass-core-python
pip install -e .[dev]
git checkout -b name-of-your-bugfix-or-feature
进行更改。
在将更改推向git之前,请验证他们实际上有效
pytest
git commit -m "Your detailed description of your changes."
git push origin name-of-your-bugfix-or-feature
在提交拉动请求之前,请检查它符合以下准则:
首先要弄清楚AuxiliaryStream / Titlechannel通信,感谢Joelday!您可以在此处找到原始实现:smartglass.csharp
该包装使用CookieCutter和Audreyr/CookieCutter-Pypackage项目模板的一部分