Skip to content

Commit 42b486d

Browse files
feat(api): api update
1 parent 1fd7f19 commit 42b486d

3 files changed

Lines changed: 10 additions & 2 deletions

File tree

‎.stats.yml‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 41
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/context-dev/context.dev-f23ab92b85d838bfa0c2741f96f4bf7acf09a22cc17aa88d78ae8a1cafb0c7f0.yml
3-
openapi_spec_hash: 641b62af26fa7bc744bbebc50aeb2ac6
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/context-dev/context.dev-a0e9f5a245a9ad4bf712a35826463af573957da6d3714136cfab643140664566.yml
3+
openapi_spec_hash: 20f2776cd458320c8b66fec4ec4f9332
44
config_hash: 0fb0ceca5946298c416cec0cca5260c7

‎pkg/cmd/web.go‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -240,6 +240,12 @@ var webScreenshot = requestflag.WithInnerFlags(cli.Command{
240240
Usage: "Capture a screenshot of a website.",
241241
Suggest: true,
242242
Flags: []cli.Flag{
243+
&requestflag.Flag[bool]{
244+
Name: "clear-popups",
245+
Usage: "Optional parameter for comprehensive popup cleanup. If 'true', the browser dismisses detected cookie/consent UI and clears other detected obstructive popups and overlays before capture. If 'false' or not provided, this parameter requests no cleanup; handleCookiePopup can still request cookie/consent handling independently.",
246+
Default: false,
247+
QueryPath: "clearPopups",
248+
},
243249
&requestflag.Flag[string]{
244250
Name: "color-scheme",
245251
Usage: "Optional parameter to choose the site's visual theme in the screenshot. Use 'light' or 'dark' when the site offers both appearances.",

‎pkg/cmd/web_test.go‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -158,6 +158,7 @@ func TestWebScreenshot(t *testing.T) {
158158
t,
159159
"--api-key", "string",
160160
"web", "screenshot",
161+
"--clear-popups=true",
161162
"--color-scheme", "light",
162163
"--country", "de",
163164
"--direct-url", "https://example.com",
@@ -185,6 +186,7 @@ func TestWebScreenshot(t *testing.T) {
185186
t,
186187
"--api-key", "string",
187188
"web", "screenshot",
189+
"--clear-popups=true",
188190
"--color-scheme", "light",
189191
"--country", "de",
190192
"--direct-url", "https://example.com",

0 commit comments

Comments
 (0)