From 6598fec81180c8e33416e7faadd2a30673e831a1 Mon Sep 17 00:00:00 2001 From: abbodi1406 <33669284+abbodi1406@users.noreply.github.com> Date: Sat, 6 Feb 2021 16:30:55 +0300 Subject: [PATCH] Add support for WCOS ReleaseType --- fetchupd.php | 5 +++-- readme.md | 19 ++++++++++--------- shared/main.php | 2 +- 3 files changed, 14 insertions(+), 12 deletions(-) diff --git a/fetchupd.php b/fetchupd.php index 7316abd..943e132 100644 --- a/fetchupd.php +++ b/fetchupd.php @@ -8,17 +8,18 @@ $ring = isset($_GET['ring']) ? $_GET['ring'] : 'WIF'; $flight = isset($_GET['flight']) ? $_GET['flight'] : 'Active'; $build = isset($_GET['build']) ? $_GET['build'] : 'latest'; $sku = isset($_GET['sku']) ? $_GET['sku'] : '48'; +$type = isset($_GET['type']) ? $_GET['type'] : 'Production'; header('Content-Type: application/json'); -$resource = hash('sha1', strtolower("fetch-$arch-$ring-$flight-$build-$sku")); +$resource = hash('sha1', strtolower("fetch-$arch-$ring-$flight-$build-$sku-$type")); if(checkIfUserIsRateLimited($resource)) { http_response_code(429); sendResponse(['error' => 'USER_RATE_LIMITED']); die(); } -$apiResponse = uupFetchUpd($arch, $ring, $flight, $build, 0, $sku, 1); +$apiResponse = uupFetchUpd($arch, $ring, $flight, $build, 0, $sku, $type, 1); if(isset($apiResponse['error'])) { switch($apiResponse['error']) { case 'EMPTY_FILELIST': diff --git a/readme.md b/readme.md index 39bca8b..e66ce82 100644 --- a/readme.md +++ b/readme.md @@ -70,17 +70,15 @@ parameters. (like "Fetch the latest build" on the website) Parameters: - `arch` - Specifies which architecture the API will return. - - **Supported values:** `amd64`, `arm64`, `x86` + - **Supported values:** `amd64`, `x86`, `arm64`, `all` - - `ring` - Specifies the ring the API uses when querying Windows Update servers. - - **Supported values:** `WIF`, `WIS`, `RP`, `RETAIL` - - `WIF` - Windows Insider Fast - - `WIS` - Windows Insider Slow - - `RP` - Release Preview - - `RETAIL` - Retail + - `ring` - Specifies the channel (ring) the API uses when querying Windows Update servers. + - **Supported values:** `Dev`, `Beta`, `ReleasePreview`, `Retail` + - **Supported Ring values :** `WIF`, `WIS`, `RP`, `RETAIL` - - `flight` - Flight to use when fetching information - - **Supported values:** `Active`, `Skip`, `Current` + - `flight` - Content (Flight) tye to use when fetching information + - **Supported values:** `Mainline` + - **Supported Flight values:** `Active`, `Skip`, `Current` - **NOTE:** `Skip` is for `WIF` ring only. `Current` is for `RP` ring only. - `build` - Build number to use by the API when fetching information @@ -89,6 +87,9 @@ Parameters: - `sku` - SKU number to use when fetching information - **Supported values:** Any SKU integer + - `type` - Release type to use when fetching information for Windows Core OS (WCOS), e.g. Windows 10X + - **Supported values:** `Production`, `Test` + #### JSON response format: ```javascript { diff --git a/shared/main.php b/shared/main.php index aaaba76..46114cc 100644 --- a/shared/main.php +++ b/shared/main.php @@ -1,5 +1,5 @@