-
Notifications
You must be signed in to change notification settings - Fork 127
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add API for new Image Optimizer default settings API
- Loading branch information
Showing
13 changed files
with
877 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
45 changes: 45 additions & 0 deletions
45
fastly/fixtures/image_optimizer_default_settings/disable_product.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
--- | ||
version: 1 | ||
interactions: | ||
- request: | ||
body: "" | ||
form: {} | ||
headers: | ||
User-Agent: | ||
- FastlyGo/9.2.2 (+github.com/fastly/go-fastly; go1.22.2) | ||
url: https://api.fastly.com/enabled-products/image_optimizer/services/7i6HN3TK9wS159v2gPAZ8A | ||
method: DELETE | ||
response: | ||
body: "" | ||
headers: | ||
Accept-Ranges: | ||
- bytes | ||
Cache-Control: | ||
- no-store | ||
Content-Type: | ||
- application/json | ||
Date: | ||
- Sat, 13 Apr 2024 05:21:42 GMT | ||
Pragma: | ||
- no-cache | ||
Server: | ||
- control-gateway | ||
Status: | ||
- 204 No Content | ||
Strict-Transport-Security: | ||
- max-age=31536000 | ||
Vary: | ||
- Accept-Encoding | ||
Via: | ||
- 1.1 varnish | ||
X-Cache: | ||
- MISS | ||
X-Cache-Hits: | ||
- "0" | ||
X-Served-By: | ||
- cache-bfi-krnt7300024-BFI | ||
X-Timer: | ||
- S1712985702.726396,VS0,VE671 | ||
status: 204 No Content | ||
code: 204 | ||
duration: "" |
54 changes: 54 additions & 0 deletions
54
fastly/fixtures/image_optimizer_default_settings/enable_product.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
--- | ||
version: 1 | ||
interactions: | ||
- request: | ||
body: ProductID=image_optimizer&ServiceID=7i6HN3TK9wS159v2gPAZ8A | ||
form: | ||
ProductID: | ||
- image_optimizer | ||
ServiceID: | ||
- 7i6HN3TK9wS159v2gPAZ8A | ||
headers: | ||
Content-Type: | ||
- application/x-www-form-urlencoded | ||
User-Agent: | ||
- FastlyGo/9.2.2 (+github.com/fastly/go-fastly; go1.22.2) | ||
url: https://api.fastly.com/enabled-products/image_optimizer/services/7i6HN3TK9wS159v2gPAZ8A | ||
method: PUT | ||
response: | ||
body: | | ||
{"product":{"id":"image_optimizer","object":"product"},"service":{"id":"7i6HN3TK9wS159v2gPAZ8A","object":"service"},"_links":{"self":"/enabled-products/image_optimizer/services/7i6HN3TK9wS159v2gPAZ8A"}} | ||
headers: | ||
Accept-Ranges: | ||
- bytes | ||
Cache-Control: | ||
- no-store | ||
Content-Length: | ||
- "203" | ||
Content-Type: | ||
- application/json | ||
Date: | ||
- Sat, 13 Apr 2024 05:21:39 GMT | ||
Pragma: | ||
- no-cache | ||
Server: | ||
- control-gateway | ||
Status: | ||
- 200 OK | ||
Strict-Transport-Security: | ||
- max-age=31536000 | ||
Vary: | ||
- Accept-Encoding | ||
Via: | ||
- 1.1 varnish | ||
X-Cache: | ||
- MISS | ||
X-Cache-Hits: | ||
- "0" | ||
X-Served-By: | ||
- cache-bfi-krnt7300024-BFI | ||
X-Timer: | ||
- S1712985699.911813,VS0,VE952 | ||
status: 200 OK | ||
code: 200 | ||
duration: "" |
53 changes: 53 additions & 0 deletions
53
fastly/fixtures/image_optimizer_default_settings/final_reset.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
--- | ||
version: 1 | ||
interactions: | ||
- request: | ||
body: '{"webp":false,"webp_quality":85,"upscale":false}' | ||
form: {} | ||
headers: | ||
Accept: | ||
- application/json | ||
Content-Type: | ||
- application/json | ||
User-Agent: | ||
- FastlyGo/9.2.2 (+github.com/fastly/go-fastly; go1.22.2) | ||
url: https://api.fastly.com/service/7i6HN3TK9wS159v2gPAZ8A/version/22/image_optimizer_default_settings | ||
method: PATCH | ||
response: | ||
body: '{"resize_filter":"lanczos3","webp":false,"webp_quality":85,"jpeg_type":"auto","jpeg_quality":85,"upscale":false,"allow_video":false}' | ||
headers: | ||
Accept-Ranges: | ||
- bytes | ||
Cache-Control: | ||
- no-store | ||
Content-Type: | ||
- application/json | ||
Date: | ||
- Sat, 13 Apr 2024 05:21:41 GMT | ||
Fastly-Ratelimit-Remaining: | ||
- "980" | ||
Fastly-Ratelimit-Reset: | ||
- "1712988000" | ||
Pragma: | ||
- no-cache | ||
Server: | ||
- control-gateway | ||
Status: | ||
- 200 OK | ||
Strict-Transport-Security: | ||
- max-age=31536000 | ||
Vary: | ||
- Accept-Encoding | ||
Via: | ||
- 1.1 varnish | ||
X-Cache: | ||
- MISS | ||
X-Cache-Hits: | ||
- "0" | ||
X-Served-By: | ||
- cache-bfi-krnt7300024-BFI | ||
X-Timer: | ||
- S1712985701.362264,VS0,VE305 | ||
status: 200 OK | ||
code: 200 | ||
duration: "" |
54 changes: 54 additions & 0 deletions
54
fastly/fixtures/image_optimizer_default_settings/incorrect_fetch.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
--- | ||
version: 1 | ||
interactions: | ||
- request: | ||
body: '{"webp_quality":105}' | ||
form: {} | ||
headers: | ||
Accept: | ||
- application/json | ||
Content-Type: | ||
- application/json | ||
User-Agent: | ||
- FastlyGo/9.2.2 (+github.com/fastly/go-fastly; go1.22.2) | ||
url: https://api.fastly.com/service/7i6HN3TK9wS159v2gPAZ8A/version/22/image_optimizer_default_settings | ||
method: PATCH | ||
response: | ||
body: '{"type":"https://www.fastly.com/documentation/reference/api/services/image_optimizer_default_settings/","title":"Bad | ||
request","detail":"Webp quality must be less than or equal to 100"}' | ||
headers: | ||
Accept-Ranges: | ||
- bytes | ||
Cache-Control: | ||
- no-store | ||
Content-Type: | ||
- application/json | ||
Date: | ||
- Sat, 13 Apr 2024 05:21:41 GMT | ||
Fastly-Ratelimit-Remaining: | ||
- "981" | ||
Fastly-Ratelimit-Reset: | ||
- "1712988000" | ||
Pragma: | ||
- no-cache | ||
Server: | ||
- control-gateway | ||
Status: | ||
- 400 Bad Request | ||
Strict-Transport-Security: | ||
- max-age=31536000 | ||
Vary: | ||
- Accept-Encoding | ||
Via: | ||
- 1.1 varnish | ||
X-Cache: | ||
- MISS | ||
X-Cache-Hits: | ||
- "0" | ||
X-Served-By: | ||
- cache-bfi-krnt7300024-BFI | ||
X-Timer: | ||
- S1712985701.156217,VS0,VE150 | ||
status: 400 Bad Request | ||
code: 400 | ||
duration: "" |
45 changes: 45 additions & 0 deletions
45
fastly/fixtures/image_optimizer_default_settings/original_fetch.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
--- | ||
version: 1 | ||
interactions: | ||
- request: | ||
body: "" | ||
form: {} | ||
headers: | ||
User-Agent: | ||
- FastlyGo/9.2.2 (+github.com/fastly/go-fastly; go1.22.2) | ||
url: https://api.fastly.com/service/7i6HN3TK9wS159v2gPAZ8A/version/22/image_optimizer_default_settings | ||
method: GET | ||
response: | ||
body: '{"resize_filter":"lanczos3","webp":false,"webp_quality":85,"jpeg_type":"auto","jpeg_quality":85,"upscale":false,"allow_video":false}' | ||
headers: | ||
Accept-Ranges: | ||
- bytes | ||
Cache-Control: | ||
- no-store | ||
Content-Type: | ||
- application/json | ||
Date: | ||
- Sat, 13 Apr 2024 05:21:40 GMT | ||
Pragma: | ||
- no-cache | ||
Server: | ||
- control-gateway | ||
Status: | ||
- 200 OK | ||
Strict-Transport-Security: | ||
- max-age=31536000 | ||
Vary: | ||
- Accept-Encoding | ||
Via: | ||
- 1.1 varnish | ||
X-Cache: | ||
- MISS | ||
X-Cache-Hits: | ||
- "0" | ||
X-Served-By: | ||
- cache-bfi-krnt7300024-BFI | ||
X-Timer: | ||
- S1712985700.911043,VS0,VE160 | ||
status: 200 OK | ||
code: 200 | ||
duration: "" |
45 changes: 45 additions & 0 deletions
45
fastly/fixtures/image_optimizer_default_settings/update_1_get.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
--- | ||
version: 1 | ||
interactions: | ||
- request: | ||
body: "" | ||
form: {} | ||
headers: | ||
User-Agent: | ||
- FastlyGo/9.2.2 (+github.com/fastly/go-fastly; go1.22.2) | ||
url: https://api.fastly.com/service/7i6HN3TK9wS159v2gPAZ8A/version/22/image_optimizer_default_settings | ||
method: GET | ||
response: | ||
body: '{"resize_filter":"lanczos3","webp":false,"webp_quality":20,"jpeg_type":"auto","jpeg_quality":85,"upscale":false,"allow_video":false}' | ||
headers: | ||
Accept-Ranges: | ||
- bytes | ||
Cache-Control: | ||
- no-store | ||
Content-Type: | ||
- application/json | ||
Date: | ||
- Sat, 13 Apr 2024 05:21:40 GMT | ||
Pragma: | ||
- no-cache | ||
Server: | ||
- control-gateway | ||
Status: | ||
- 200 OK | ||
Strict-Transport-Security: | ||
- max-age=31536000 | ||
Vary: | ||
- Accept-Encoding | ||
Via: | ||
- 1.1 varnish | ||
X-Cache: | ||
- MISS | ||
X-Cache-Hits: | ||
- "0" | ||
X-Served-By: | ||
- cache-bfi-krnt7300024-BFI | ||
X-Timer: | ||
- S1712985700.407525,VS0,VE169 | ||
status: 200 OK | ||
code: 200 | ||
duration: "" |
53 changes: 53 additions & 0 deletions
53
fastly/fixtures/image_optimizer_default_settings/update_1_patch.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
--- | ||
version: 1 | ||
interactions: | ||
- request: | ||
body: '{"webp":false,"webp_quality":20,"upscale":false}' | ||
form: {} | ||
headers: | ||
Accept: | ||
- application/json | ||
Content-Type: | ||
- application/json | ||
User-Agent: | ||
- FastlyGo/9.2.2 (+github.com/fastly/go-fastly; go1.22.2) | ||
url: https://api.fastly.com/service/7i6HN3TK9wS159v2gPAZ8A/version/22/image_optimizer_default_settings | ||
method: PATCH | ||
response: | ||
body: '{"resize_filter":"lanczos3","webp":false,"webp_quality":20,"jpeg_type":"auto","jpeg_quality":85,"upscale":false,"allow_video":false}' | ||
headers: | ||
Accept-Ranges: | ||
- bytes | ||
Cache-Control: | ||
- no-store | ||
Content-Type: | ||
- application/json | ||
Date: | ||
- Sat, 13 Apr 2024 05:21:40 GMT | ||
Fastly-Ratelimit-Remaining: | ||
- "983" | ||
Fastly-Ratelimit-Reset: | ||
- "1712988000" | ||
Pragma: | ||
- no-cache | ||
Server: | ||
- control-gateway | ||
Status: | ||
- 200 OK | ||
Strict-Transport-Security: | ||
- max-age=31536000 | ||
Vary: | ||
- Accept-Encoding | ||
Via: | ||
- 1.1 varnish | ||
X-Cache: | ||
- MISS | ||
X-Cache-Hits: | ||
- "0" | ||
X-Served-By: | ||
- cache-bfi-krnt7300024-BFI | ||
X-Timer: | ||
- S1712985700.118285,VS0,VE241 | ||
status: 200 OK | ||
code: 200 | ||
duration: "" |
Oops, something went wrong.