{"id":18569804,"url":"https://github.com/n-thumann/xbox-cloud-statistics","last_synced_at":"2025-04-10T06:32:16.347Z","repository":{"id":202931953,"uuid":"708399748","full_name":"n-thumann/xbox-cloud-statistics","owner":"n-thumann","description":"View the current wait times of games on Xbox Cloud.","archived":true,"fork":false,"pushed_at":"2025-01-01T20:52:31.000Z","size":854,"stargazers_count":12,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-07T00:42:35.453Z","etag":null,"topics":["xbox-cloud","xcloud"],"latest_commit_sha":null,"homepage":"https://n-thumann.github.io/xbox-cloud-statistics/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/n-thumann.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-10-22T13:05:00.000Z","updated_at":"2025-01-01T20:52:31.000Z","dependencies_parsed_at":null,"dependency_job_id":"134b57b5-1062-4ee3-8f26-d654d41e8802","html_url":"https://github.com/n-thumann/xbox-cloud-statistics","commit_stats":null,"previous_names":["n-thumann/xbox-cloud-statistics"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/n-thumann%2Fxbox-cloud-statistics","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/n-thumann%2Fxbox-cloud-statistics/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/n-thumann%2Fxbox-cloud-statistics/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/n-thumann%2Fxbox-cloud-statistics/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/n-thumann","download_url":"https://codeload.github.com/n-thumann/xbox-cloud-statistics/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248168325,"owners_count":21058816,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["xbox-cloud","xcloud"],"created_at":"2024-11-06T22:35:12.242Z","updated_at":"2025-04-10T06:32:16.335Z","avatar_url":"https://github.com/n-thumann.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# xbox-cloud-statistics\n\nA backend and frontend application to gather and visualize the current wait times on Xbox Cloud Gaming.\n\n## Backend\n\n### Setup\n\n1. `cd xbox_cloud_statistics/`\n2. `poetry install` to install the dependencies\n3. Create an App registration at Microsoft Azure\n   - See https://learn.microsoft.com/en-us/azure/active-directory/develop/quickstart-register-app\n   - Use `Personal Microsoft accounts only` as `Supported account types`\n   - `CLIENT_ID` refers to `Application (client) ID` in Azure\n   - `CLIENT_SECRET` refers to the value of the client secret in Azure\n4. Authenticate as a Xbox Cloud Gaming user\n   - Run `poetry run xbox-cloud-authenticate --client-id $CLIENT_ID --client-secret $CLIENT_SECRET`\n   - Open the URL displayed in your browser and log in with your Xbox Cloud Gaming account\n   - You will be redirected to e.g. `http://localhost/auth/callback?code=...`, paste the `code` into `xbox-cloud-authenticate` and hit enter\n   - The output will contain a `refresh_token`\n     - If you authenticated with a Free-to-Play account, this this the `F2P_TOKEN`\n     - If you authenticated with a Game Pass Ultimate account, this this the `GPU_TOKEN`\n5. Setup InfluxDB (create organization, bucket and API token)\n\n### Usage\n\n1. Export environment variables `CLIENT_ID` and `CLIENT_SECRET` to authenticate as the App registration\n2. Export environment variables `F2P_TOKEN` and `GPU_TOKEN` to authenticate as the user\n3. Export environment variables `INFLUXDB_URL`, `INFLUXDB_ORG`, `INFLUXDB_BUCKET` and `INFLUXDB_TOKEN` to connect to InfluxDB\n4. Run `poetry run xbox-cloud-statistics`, printing a table with the results and writing them to InfluxDB\n\n```\n➜  xbox_cloud_statistics git:(main) poetry run xbox-cloud-statistics\n| Game                                         | Region             | Subscription     | Server time               |   Wait time (s) |\n|----------------------------------------------|--------------------|------------------|---------------------------|-----------------|\n| FORTNITE                                     | AustraliaEast      | Subscription.F2P | 2023-10-22 10:05:46+00:00 |             704 |\n| FORTNITE                                     | AustraliaEast      | Subscription.GPU | 2023-10-22 10:05:47+00:00 |              38 |\n| FORTNITE                                     | AustraliaSouthEast | Subscription.F2P | 2023-10-22 10:05:46+00:00 |             704 |\n| FORTNITE                                     | AustraliaSouthEast | Subscription.GPU | 2023-10-22 10:05:47+00:00 |              38 |\n| FORTNITE                                     | BrazilSouth        | Subscription.F2P | 2023-10-22 10:05:45+00:00 |              10 |\n| FORTNITE                                     | BrazilSouth        | Subscription.GPU | 2023-10-22 10:05:47+00:00 |              10 |\n| FORTNITE                                     | EastUS             | Subscription.F2P | 2023-10-22 10:05:45+00:00 |              10 |\n[...]\n```\n\n### Configuration\n\nThe configuration file ([config.toml](config.toml)) contains all games that should be queried.\nThe example below shows the configuration for Fortnite with Xbox Cloud ID `FORTNITE`, title `Fortnite` and image (poster) URL and the subscriptions its available in (Free-to-Play and Game Pass Ultimate):\n\n```\n[games.FORTNITE]\ntitle = \"Fortnite\"\nimage_url = \"https://store-images.s-microsoft.com/image/apps.9582.70702278257994163.a9af653c-54d0-4c47-a1f0-bd2f08fe0fd1.3ea1af1a-95a6-4543-be33-94c112ed5dc3\"\nsubscriptions = [\"F2P\", \"GPU\"]\n```\n\nAfter adding new games to the configuration, please run `poetry run toml-sort -i config.toml` to keep them sorted.\n\n## Frontend\n\n### Setup\n\n1. `cd site_generator/`\n2. Run `poetry install` to install the dependencies\n3. Run `python3 -m http.server -d dist/` to start a local HTTP server (useful for development)\n\n### Usage\n\n1. Export environment variables `INFLUXDB_URL`, `INFLUXDB_ORG`, `INFLUXDB_BUCKET` and `INFLUXDB_TOKEN` to connect to InfluxDB\n2. Run `poetry run site-generator` to build the static page to `dist/`\n\nhttps://github.com/n-thumann/xbox-cloud-statistics/assets/46975855/05949add-87a4-4710-b908-41b47aa48b0a\n\n## Measurement data\n\nThe measurement data is available in a private InfluxDB instance. Feel free to message me to request access.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fn-thumann%2Fxbox-cloud-statistics","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fn-thumann%2Fxbox-cloud-statistics","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fn-thumann%2Fxbox-cloud-statistics/lists"}