Skip to content

Commit ad50292

Browse files
feat(api): api update
1 parent 5650e87 commit ad50292

3 files changed

Lines changed: 9 additions & 3 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: 38
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/context-dev/context.dev-b73de7a5f87b3bed7d9e4259bd109cd62f4eb5f61fa082f31fc22d5bf8e69bcc.yml
3-
openapi_spec_hash: 5dcb5ba9b8487329adc2f89eeb4df7c4
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/context-dev/context.dev-b5a46cf886759797353b250da971e46cf66804b825ded9c51609f34d72d1169c.yml
3+
openapi_spec_hash: 1947de2a731ddab05bfb781f37cd42b6
44
config_hash: bff282047fafdad771fb7ec685f56944

pkg/cmd/web.go

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -930,7 +930,7 @@ var webWebScrapeMd = requestflag.WithInnerFlags(cli.Command{
930930

931931
var webWebScrapeSitemap = cli.Command{
932932
Name: "web-scrape-sitemap",
933-
Usage: "Crawl an entire website's sitemap and return all discovered page URLs.",
933+
Usage: "Crawl an entire website's sitemap and return all discovered page URLs. Pass\n`search` to have the crawled sitemap filtered down to the pages about a phrase\n(for example `pricing and plans` or `api authentication docs`), most relevant\nfirst — a searched crawl scans the whole sitemap and costs 2 credits instead\nof 1.",
934934
Suggest: true,
935935
Flags: []cli.Flag{
936936
&requestflag.Flag[string]{
@@ -950,6 +950,11 @@ var webWebScrapeSitemap = cli.Command{
950950
Default: 10000,
951951
QueryPath: "maxLinks",
952952
},
953+
&requestflag.Flag[string]{
954+
Name: "search",
955+
Usage: "Optional search phrase. When provided, the crawled sitemap is filtered to the pages whose URLs are about that phrase, most relevant first, and the request costs 2 credits instead of 1.",
956+
QueryPath: "search",
957+
},
953958
&requestflag.Flag[string]{
954959
Name: "sitemap-url",
955960
Usage: "Optional explicit sitemap URL. When provided, exactly this sitemap is crawled instead of discovering the domain's sitemaps.",

pkg/cmd/web_test.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -583,6 +583,7 @@ func TestWebWebScrapeSitemap(t *testing.T) {
583583
"--domain", "xxx",
584584
"--headers", "{foo: J!}",
585585
"--max-links", "1",
586+
"--search", "help center and troubleshooting articles",
586587
"--sitemap-url", "https://example.com",
587588
"--tag", "production",
588589
"--tag", "team-alpha",

0 commit comments

Comments
 (0)