該庫為與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項目模板的一部分