Skip to content

Commit e9d3dc0

Browse files
authored
Update README.md (#28)
1 parent 36d7afd commit e9d3dc0

File tree

1 file changed

+27
-26
lines changed

1 file changed

+27
-26
lines changed

README.md

Lines changed: 27 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
1-
# Xbox-WebAPI
1+
# python-xbox
22

3-
[![PyPi - latest](https://img.shields.io/pypi/v/xbox-webapi.svg)](https://pypi.python.org/pypi/xbox-webapi/)
4-
[![Documentation status](https://readthedocs.org/projects/xbox-webapi-python/badge/?version=latest)](http://xbox-webapi-python.readthedocs.io/en/latest/?badge=latest)
5-
[![Build status](https://img.shields.io/github/actions/workflow/status/OpenXbox/xbox-webapi-python/build.yml?branch=master)](https://github.com/OpenXbox/xbox-webapi-python/actions?query=workflow%3Abuild)
6-
[![Discord chat channel](https://img.shields.io/badge/discord-OpenXbox-blue.svg)](https://openxbox.org/discord)
3+
[![PyPi - latest](https://img.shields.io/pypi/v/python-xbox.svg)](https://pypi.python.org/pypi/python-xbox/)
4+
[![Build](https://github.com/tr4nt0r/python-xbox/actions/workflows/build.yml/badge.svg)](https://github.com/tr4nt0r/python-xbox/actions/workflows/build.yml)
5+
![PyPI - Downloads](https://img.shields.io/pypi/dm/python-xbox?style=flat&label=pypi%20downloads)
6+
[!["Buy Me A Coffee"](https://img.shields.io/badge/-buy_me_a%C2%A0coffee-gray?logo=buy-me-a-coffee)](https://www.buymeacoffee.com/tr4nt0r)
7+
[![GitHub Sponsor](https://img.shields.io/badge/GitHub-Sponsor-blue?logo=github)](https://github.com/sponsors/tr4nt0r)
78

8-
Xbox-WebAPI is a python library to authenticate with Xbox Live via your Microsoft Account and provides Xbox related Web-API.
9+
python-xbox is a python library to authenticate with Xbox Network via your Microsoft Account and provides Xbox related Web-API.
910

1011
Authentication is supported via OAuth2.
1112

@@ -19,21 +20,22 @@ Authentication is supported via OAuth2.
1920

2021
## Dependencies
2122

22-
- Python >= 3.8
23+
- Python >= 3.11
2324

2425
## How to use
2526

26-
Install
27+
### Install
2728

28-
```text
29-
pip install xbox-webapi
29+
```bash
30+
pip install python-xbox
3031
```
3132

32-
Authentication
33+
### Authentication
3334

34-
**Note: You must use non child account (> 18 years old)**
35+
> [!NOTE]
36+
> You must use non child account (> 18 years old)
3537
36-
Token save location: If tokenfile is not provided via cmdline, fallback of `<appdirs.user_data_dir>/tokens.json` is used as save-location
38+
Token save location: If tokenfile is not provided via cmdline, fallback of `<platformdirs.user_data_dir>/tokens.json` is used as save-location
3739

3840
Specifically:
3941

@@ -43,32 +45,32 @@ Mac OSX: `/Users/<username>/Library/Application Support/xbox/tokens.json`
4345

4446
Linux: `/home/<username>/.local/share/xbox`
4547

46-
For more information, see: <https://pypi.org/project/appdirs> and module: `xbox.webapi.scripts.constants`
48+
For more information, see: <https://pypi.org/project/platformdirs> and module: `python-xbox.scripts.constants`
4749

48-
```
50+
```bash
4951
xbox-authenticate --client-id <client-id> --client-secret <client-secret>
5052
```
5153

5254
Example: Search Xbox Live via cmdline tool
5355

54-
```text
56+
```bash
5557
# Search Xbox One Catalog
5658
xbox-searchlive "Some game title"
5759
```
5860

5961
API usage
6062

61-
```py
63+
```python
6264
import asyncio
6365
import sys
6466

6567
from httpx import HTTPStatusError
6668

67-
from xbox.webapi.api.client import XboxLiveClient
68-
from xbox.webapi.authentication.manager import AuthenticationManager
69-
from xbox.webapi.authentication.models import OAuth2TokenResponse
70-
from xbox.webapi.common.signed_session import SignedSession
71-
from xbox.webapi.scripts import CLIENT_ID, CLIENT_SECRET, TOKENS_FILE
69+
from pythonxbox.api.client import XboxLiveClient
70+
from pythonxbox.authentication.manager import AuthenticationManager
71+
from pythonxbox.authentication.models import OAuth2TokenResponse
72+
from pythonxbox.common.signed_session import SignedSession
73+
from pythonxbox.scripts import CLIENT_ID, CLIENT_SECRET, TOKENS_FILE
7274

7375
"""
7476
This uses the global default client identification by OpenXbox
@@ -80,7 +82,7 @@ client_secret = CLIENT_SECRET
8082
tokens_file = TOKENS_FILE
8183

8284
"""
83-
For doing authentication, see xbox/webapi/scripts/authenticate.py
85+
For doing authentication, see pythonxbox/scripts/authenticate.py
8486
"""
8587

8688

@@ -94,7 +96,7 @@ async def async_main():
9496

9597
"""
9698
Read in tokens that you received from the `xbox-authenticate`-script previously
97-
See `xbox/webapi/scripts/authenticate.py`
99+
See `pythonxbox/scripts/authenticate.py`
98100
"""
99101
try:
100102
with open(tokens_file) as f:
@@ -172,8 +174,7 @@ asyncio.run(async_main())
172174

173175
## Credits
174176

175-
This package uses parts of [Cookiecutter](https://github.com/audreyr/cookiecutter)
176-
and the [audreyr/cookiecutter-pypackage](https://github.com/audreyr/cookiecutter-pypackage) project template.
177+
This library is derived from [xbox-webapi](https://github.com/OpenXbox/xbox-webapi-python) library from the [OpenXbox](https://github.com/openxbox) project
177178
The authentication code is based on [joealcorn/xbox](https://github.com/joealcorn/xbox)
178179

179180
Informations on endpoints gathered from:

0 commit comments

Comments
 (0)