Skip to content

Commit 390760b

Browse files
feat(api): api update
1 parent 6e12fab commit 390760b

File tree

4 files changed

+20
-2
lines changed

4 files changed

+20
-2
lines changed

.stats.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 20
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/brand-dev%2Fbrand.dev-5e05c22cc2eeb67f80a5f34fe6048cfdc92812c29674b2acd2843ead76bb87c3.yml
3-
openapi_spec_hash: 6abd6cfd3b5a0900519ad0c99bb272f3
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/brand-dev%2Fbrand.dev-c91b0567307b069c250d073074b7c861b64e632a8380b24925e15d981846bb43.yml
3+
openapi_spec_hash: e479aa097b1283c2acf19d6360787449
44
config_hash: 91cf2dcefb99c39eb9cd3e98e15d6011

src/brand/dev/resources/brand.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2066,6 +2066,7 @@ def web_scrape_md(
20662066
include_images: bool | Omit = omit,
20672067
include_links: bool | Omit = omit,
20682068
shorten_base64_images: bool | Omit = omit,
2069+
use_main_content_only: bool | Omit = omit,
20692070
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
20702071
# The extra values given here take precedence over values defined on the client or passed to this method.
20712072
extra_headers: Headers | None = None,
@@ -2087,6 +2088,9 @@ def web_scrape_md(
20872088
20882089
shorten_base64_images: Shorten base64-encoded image data in the Markdown output
20892090
2091+
use_main_content_only: Extract only the main content of the page, excluding headers, footers, sidebars,
2092+
and navigation
2093+
20902094
extra_headers: Send extra headers
20912095
20922096
extra_query: Add additional query parameters to the request
@@ -2108,6 +2112,7 @@ def web_scrape_md(
21082112
"include_images": include_images,
21092113
"include_links": include_links,
21102114
"shorten_base64_images": shorten_base64_images,
2115+
"use_main_content_only": use_main_content_only,
21112116
},
21122117
brand_web_scrape_md_params.BrandWebScrapeMdParams,
21132118
),
@@ -4170,6 +4175,7 @@ async def web_scrape_md(
41704175
include_images: bool | Omit = omit,
41714176
include_links: bool | Omit = omit,
41724177
shorten_base64_images: bool | Omit = omit,
4178+
use_main_content_only: bool | Omit = omit,
41734179
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
41744180
# The extra values given here take precedence over values defined on the client or passed to this method.
41754181
extra_headers: Headers | None = None,
@@ -4191,6 +4197,9 @@ async def web_scrape_md(
41914197
41924198
shorten_base64_images: Shorten base64-encoded image data in the Markdown output
41934199
4200+
use_main_content_only: Extract only the main content of the page, excluding headers, footers, sidebars,
4201+
and navigation
4202+
41944203
extra_headers: Send extra headers
41954204
41964205
extra_query: Add additional query parameters to the request
@@ -4212,6 +4221,7 @@ async def web_scrape_md(
42124221
"include_images": include_images,
42134222
"include_links": include_links,
42144223
"shorten_base64_images": shorten_base64_images,
4224+
"use_main_content_only": use_main_content_only,
42154225
},
42164226
brand_web_scrape_md_params.BrandWebScrapeMdParams,
42174227
),

src/brand/dev/types/brand_web_scrape_md_params.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,3 +24,9 @@ class BrandWebScrapeMdParams(TypedDict, total=False):
2424

2525
shorten_base64_images: Annotated[bool, PropertyInfo(alias="shortenBase64Images")]
2626
"""Shorten base64-encoded image data in the Markdown output"""
27+
28+
use_main_content_only: Annotated[bool, PropertyInfo(alias="useMainContentOnly")]
29+
"""
30+
Extract only the main content of the page, excluding headers, footers, sidebars,
31+
and navigation
32+
"""

tests/api_resources/test_brand.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -922,6 +922,7 @@ def test_method_web_scrape_md_with_all_params(self, client: BrandDev) -> None:
922922
include_images=True,
923923
include_links=True,
924924
shorten_base64_images=True,
925+
use_main_content_only=True,
925926
)
926927
assert_matches_type(BrandWebScrapeMdResponse, brand, path=["response"])
927928

@@ -1884,6 +1885,7 @@ async def test_method_web_scrape_md_with_all_params(self, async_client: AsyncBra
18841885
include_images=True,
18851886
include_links=True,
18861887
shorten_base64_images=True,
1888+
use_main_content_only=True,
18871889
)
18881890
assert_matches_type(BrandWebScrapeMdResponse, brand, path=["response"])
18891891

0 commit comments

Comments
 (0)