$apiInstance = new Fastly\Api\ProductImageOptimizerApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
Note
All URIs are relative to https://api.fastly.com
Method | HTTP request | Description |
---|---|---|
disableProductImageOptimizer() | DELETE /enabled-products/v1/image_optimizer/services/{service_id} | Disable product |
enableProductImageOptimizer() | PUT /enabled-products/v1/image_optimizer/services/{service_id} | Enable product |
getProductImageOptimizer() | GET /enabled-products/v1/image_optimizer/services/{service_id} | Get product enablement status |
disableProductImageOptimizer($options) // Disable product
Disable the Image Optimizer product on a service.
$options['service_id'] = 'service_id_example'; // string | Alphanumeric string identifying the service.
try {
$apiInstance->disableProductImageOptimizer($options);
} catch (Exception $e) {
echo 'Exception when calling ProductImageOptimizerApi->disableProductImageOptimizer: ', $e->getMessage(), PHP_EOL;
}
Note: the input parameter is an associative array with the keys listed below.
Name | Type | Description | Notes |
---|---|---|---|
service_id | string | Alphanumeric string identifying the service. |
void (empty response body)
[Back to top] [Back to API list] [Back to README]
enableProductImageOptimizer($options): \Fastly\Model\ImageOptimizerResponseBodyEnable // Enable product
Enable the Image Optimizer product on a service.
$options['service_id'] = 'service_id_example'; // string | Alphanumeric string identifying the service.
try {
$result = $apiInstance->enableProductImageOptimizer($options);
} catch (Exception $e) {
echo 'Exception when calling ProductImageOptimizerApi->enableProductImageOptimizer: ', $e->getMessage(), PHP_EOL;
}
Note: the input parameter is an associative array with the keys listed below.
Name | Type | Description | Notes |
---|---|---|---|
service_id | string | Alphanumeric string identifying the service. |
\Fastly\Model\ImageOptimizerResponseBodyEnable
[Back to top] [Back to API list] [Back to README]
getProductImageOptimizer($options): \Fastly\Model\ImageOptimizerResponseBodyEnable // Get product enablement status
Get the enablement status of the Image Optimizer product on a service.
$options['service_id'] = 'service_id_example'; // string | Alphanumeric string identifying the service.
try {
$result = $apiInstance->getProductImageOptimizer($options);
} catch (Exception $e) {
echo 'Exception when calling ProductImageOptimizerApi->getProductImageOptimizer: ', $e->getMessage(), PHP_EOL;
}
Note: the input parameter is an associative array with the keys listed below.
Name | Type | Description | Notes |
---|---|---|---|
service_id | string | Alphanumeric string identifying the service. |