Skip to content

Commit

Permalink
Merge pull request #101 from n-thumann/update_readme
Browse files Browse the repository at this point in the history
Change: Update README
  • Loading branch information
n-thumann authored Dec 14, 2024
2 parents 42e93f0 + b3b8cef commit 2404f2b
Showing 1 changed file with 13 additions and 10 deletions.
23 changes: 13 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ A backend and frontend application to gather and visualize the current wait time

### Setup

1. Run `poetry install` to install the dependencies
2. Download https://github.com/n-thumann/xbox-cloud-statistics/releases/download/results/results.tar.gz and extract it to get latest results locally (optionally)
1. `cd xbox_cloud_statistics/`
2. `poetry install` to install the dependencies
3. Create an App registration at Microsoft Azure
- See https://learn.microsoft.com/en-us/azure/active-directory/develop/quickstart-register-app
- Use `Personal Microsoft accounts only` as `Supported account types`
Expand All @@ -20,15 +20,17 @@ A backend and frontend application to gather and visualize the current wait time
- The output will contain a `refresh_token`
- If you authenticated with a Free-to-Play account, this this the `F2P_TOKEN`
- If you authenticated with a Game Pass Ultimate account, this this the `GPU_TOKEN`
5. Setup InfluxDB (create organization, bucket and API token)

### Usage

1. Export environment variables `CLIENT_ID` and `CLIENT_SECRET` to authenticate as the App registration
2. Export environment variables `F2P_TOKEN` and `GPU_TOKEN` to authenticate as the user
3. Run `poetry run xbox-cloud-statistics`, printing a table with the results and writing them to `./results`
3. Export environment variables `INFLUXDB_URL`, `INFLUXDB_ORG`, `INFLUXDB_BUCKET` and `INFLUXDB_TOKEN` to connect to InfluxDB
4. Run `poetry run xbox-cloud-statistics`, printing a table with the results and writing them to InfluxDB

```
backend git:(main) poetry run xbox-cloud-statistics
xbox_cloud_statistics git:(main) poetry run xbox-cloud-statistics
| Game | Region | Subscription | Server time | Wait time (s) |
|----------------------------------------------|--------------------|------------------|---------------------------|-----------------|
| FORTNITE | AustraliaEast | Subscription.F2P | 2023-10-22 10:05:46+00:00 | 704 |
Expand Down Expand Up @@ -59,16 +61,17 @@ After adding new games to the configuration, please run `poetry run toml-sort -i

### Setup

1. Run `poetry install` to install the dependencies
2. Download https://github.com/n-thumann/xbox-cloud-statistics/releases/download/results/results.tar.gz and extract it to get latest results locally
3. Run `python3 -m http.server -d dist/` to start a local HTTP server
1. `cd site_generator/`
2. Run `poetry install` to install the dependencies
3. Run `python3 -m http.server -d dist/` to start a local HTTP server (useful for development)

### Build
### Usage

Run `poetry run site-generator` to build the static page.
1. Export environment variables `INFLUXDB_URL`, `INFLUXDB_ORG`, `INFLUXDB_BUCKET` and `INFLUXDB_TOKEN` to connect to InfluxDB
2. Run `poetry run site-generator` to build the static page to `dist/`

https://github.com/n-thumann/xbox-cloud-statistics/assets/46975855/05949add-87a4-4710-b908-41b47aa48b0a

## Measurement data

The measurement data is available as JSON in `results.tar.gz` of [this](https://github.com/n-thumann/xbox-cloud-statistics/releases/tag/results) release.
The measurement data is available in a private InfluxDB instance. Feel free to message me to request access.

0 comments on commit 2404f2b

Please sign in to comment.