Merge pull request #2 from abbodi1406/master
Add support for WCOS ReleaseType
This commit is contained in:
commit
88e85dfdbf
@ -8,17 +8,18 @@ $ring = isset($_GET['ring']) ? $_GET['ring'] : 'WIF';
|
|||||||
$flight = isset($_GET['flight']) ? $_GET['flight'] : 'Active';
|
$flight = isset($_GET['flight']) ? $_GET['flight'] : 'Active';
|
||||||
$build = isset($_GET['build']) ? $_GET['build'] : 'latest';
|
$build = isset($_GET['build']) ? $_GET['build'] : 'latest';
|
||||||
$sku = isset($_GET['sku']) ? $_GET['sku'] : '48';
|
$sku = isset($_GET['sku']) ? $_GET['sku'] : '48';
|
||||||
|
$type = isset($_GET['type']) ? $_GET['type'] : 'Production';
|
||||||
|
|
||||||
header('Content-Type: application/json');
|
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)) {
|
if(checkIfUserIsRateLimited($resource)) {
|
||||||
http_response_code(429);
|
http_response_code(429);
|
||||||
sendResponse(['error' => 'USER_RATE_LIMITED']);
|
sendResponse(['error' => 'USER_RATE_LIMITED']);
|
||||||
die();
|
die();
|
||||||
}
|
}
|
||||||
|
|
||||||
$apiResponse = uupFetchUpd($arch, $ring, $flight, $build, 0, $sku, 1);
|
$apiResponse = uupFetchUpd($arch, $ring, $flight, $build, 0, $sku, $type, 1);
|
||||||
if(isset($apiResponse['error'])) {
|
if(isset($apiResponse['error'])) {
|
||||||
switch($apiResponse['error']) {
|
switch($apiResponse['error']) {
|
||||||
case 'EMPTY_FILELIST':
|
case 'EMPTY_FILELIST':
|
||||||
|
19
readme.md
19
readme.md
@ -70,17 +70,15 @@ parameters. (like "Fetch the latest build" on the website)
|
|||||||
|
|
||||||
Parameters:
|
Parameters:
|
||||||
- `arch` - Specifies which architecture the API will return.
|
- `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.
|
- `ring` - Specifies the channel (ring) the API uses when querying Windows Update servers.
|
||||||
- **Supported values:** `WIF`, `WIS`, `RP`, `RETAIL`
|
- **Supported values:** `Dev`, `Beta`, `ReleasePreview`, `Retail`
|
||||||
- `WIF` - Windows Insider Fast
|
- **Supported Ring values :** `WIF`, `WIS`, `RP`, `RETAIL`
|
||||||
- `WIS` - Windows Insider Slow
|
|
||||||
- `RP` - Release Preview
|
|
||||||
- `RETAIL` - Retail
|
|
||||||
|
|
||||||
- `flight` - Flight to use when fetching information
|
- `flight` - Content (Flight) tye to use when fetching information
|
||||||
- **Supported values:** `Active`, `Skip`, `Current`
|
- **Supported values:** `Mainline`
|
||||||
|
- **Supported Flight values:** `Active`, `Skip`, `Current`
|
||||||
- **NOTE:** `Skip` is for `WIF` ring only. `Current` is for `RP` ring only.
|
- **NOTE:** `Skip` is for `WIF` ring only. `Current` is for `RP` ring only.
|
||||||
|
|
||||||
- `build` - Build number to use by the API when fetching information
|
- `build` - Build number to use by the API when fetching information
|
||||||
@ -89,6 +87,9 @@ Parameters:
|
|||||||
- `sku` - SKU number to use when fetching information
|
- `sku` - SKU number to use when fetching information
|
||||||
- **Supported values:** Any SKU integer
|
- **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:
|
#### JSON response format:
|
||||||
```javascript
|
```javascript
|
||||||
{
|
{
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
$webApiVersion = '0.2.0';
|
$webApiVersion = '0.2.1';
|
||||||
|
|
||||||
function sendResponse($apiResponse) {
|
function sendResponse($apiResponse) {
|
||||||
global $webApiVersion;
|
global $webApiVersion;
|
||||||
|
Loading…
Reference in New Issue
Block a user