Skip to content

Commit 4d341f1

Browse files
authored
Merge pull request #19 from brand-dot-dev/release-please--branches--main--changes--next
release: 1.15.0
2 parents 6b69c93 + e0d7c5c commit 4d341f1

9 files changed

Lines changed: 92 additions & 10 deletions

File tree

.release-please-manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
{
2-
".": "1.14.0"
2+
".": "1.15.0"
33
}

.stats.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 8
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/brand-dev%2Fbrand.dev-a38595b18a0fe26de444a0dd332f15f1e9e35667fca933d454c303676fac93e2.yml
3-
openapi_spec_hash: 1c4882ef9df6782c91ee94c1f2908a90
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/brand-dev%2Fbrand.dev-558cea4d1e47f7f79e5a42b1113401d9488399f96ce57000488ba82eefc74119.yml
3+
openapi_spec_hash: 576db82fb9e7648107687ee308db7eae
44
config_hash: 4e76a07aea49753a61313dcd8c10fb0f

CHANGELOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,13 @@
11
# Changelog
22

3+
## 1.15.0 (2025-09-14)
4+
5+
Full Changelog: [v1.14.0...v1.15.0](https://github.com/brand-dot-dev/python-sdk/compare/v1.14.0...v1.15.0)
6+
7+
### Features
8+
9+
* **api:** api update ([7f5f368](https://github.com/brand-dot-dev/python-sdk/commit/7f5f368fee87e0b76cb2598bd84fe74be2ca3c98))
10+
311
## 1.14.0 (2025-09-07)
412

513
Full Changelog: [v1.13.0...v1.14.0](https://github.com/brand-dot-dev/python-sdk/compare/v1.13.0...v1.14.0)

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[project]
22
name = "brand.dev"
3-
version = "1.14.0"
3+
version = "1.15.0"
44
description = "The official Python library for the brand.dev API"
55
dynamic = ["readme"]
66
license = "Apache-2.0"

src/brand/dev/_version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
22

33
__title__ = "brand.dev"
4-
__version__ = "1.14.0" # x-release-please-version
4+
__version__ = "1.15.0" # x-release-please-version

src/brand/dev/resources/brand.py

Lines changed: 48 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -445,6 +445,9 @@ def screenshot(
445445
*,
446446
domain: str,
447447
full_screenshot: Literal["true", "false"] | NotGiven = NOT_GIVEN,
448+
page: Literal["login", "signup", "blog", "careers", "pricing", "terms", "privacy", "contact"]
449+
| NotGiven = NOT_GIVEN,
450+
prioritize: Literal["speed", "quality"] | NotGiven = NOT_GIVEN,
448451
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
449452
# The extra values given here take precedence over values defined on the client or passed to this method.
450453
extra_headers: Headers | None = None,
@@ -455,8 +458,9 @@ def screenshot(
455458
"""Beta feature: Capture a screenshot of a website.
456459
457460
Supports both viewport
458-
(standard browser view) and full-page screenshots. Returns a URL to the uploaded
459-
screenshot image hosted on our CDN.
461+
(standard browser view) and full-page screenshots. Can also screenshot specific
462+
page types (login, pricing, etc.) by using heuristics to find the appropriate
463+
URL. Returns a URL to the uploaded screenshot image hosted on our CDN.
460464
461465
Args:
462466
domain: Domain name to take screenshot of (e.g., 'example.com', 'google.com'). The
@@ -466,6 +470,15 @@ def screenshot(
466470
screenshot capturing all content. If 'false' or not provided, takes a viewport
467471
screenshot (standard browser view).
468472
473+
page: Optional parameter to specify which page type to screenshot. If provided, the
474+
system will scrape the domain's links and use heuristics to find the most
475+
appropriate URL for the specified page type (30 supported languages). If not
476+
provided, screenshots the main domain landing page.
477+
478+
prioritize: Optional parameter to prioritize screenshot capture. If 'speed', optimizes for
479+
faster capture with basic quality. If 'quality', optimizes for higher quality
480+
with longer wait times. Defaults to 'quality' if not provided.
481+
469482
extra_headers: Send extra headers
470483
471484
extra_query: Add additional query parameters to the request
@@ -485,6 +498,8 @@ def screenshot(
485498
{
486499
"domain": domain,
487500
"full_screenshot": full_screenshot,
501+
"page": page,
502+
"prioritize": prioritize,
488503
},
489504
brand_screenshot_params.BrandScreenshotParams,
490505
),
@@ -496,6 +511,7 @@ def styleguide(
496511
self,
497512
*,
498513
domain: str,
514+
prioritize: Literal["speed", "quality"] | NotGiven = NOT_GIVEN,
499515
timeout_ms: int | NotGiven = NOT_GIVEN,
500516
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
501517
# The extra values given here take precedence over values defined on the client or passed to this method.
@@ -513,6 +529,11 @@ def styleguide(
513529
domain: Domain name to extract styleguide from (e.g., 'example.com', 'google.com'). The
514530
domain will be automatically normalized and validated.
515531
532+
prioritize: Optional parameter to prioritize screenshot capture for styleguide extraction.
533+
If 'speed', optimizes for faster capture with basic quality. If 'quality',
534+
optimizes for higher quality with longer wait times. Defaults to 'speed' if not
535+
provided.
536+
516537
timeout_ms: Optional timeout in milliseconds for the request. If the request takes longer
517538
than this value, it will be aborted with a 408 status code. Maximum allowed
518539
value is 300000ms (5 minutes).
@@ -535,6 +556,7 @@ def styleguide(
535556
query=maybe_transform(
536557
{
537558
"domain": domain,
559+
"prioritize": prioritize,
538560
"timeout_ms": timeout_ms,
539561
},
540562
brand_styleguide_params.BrandStyleguideParams,
@@ -949,6 +971,9 @@ async def screenshot(
949971
*,
950972
domain: str,
951973
full_screenshot: Literal["true", "false"] | NotGiven = NOT_GIVEN,
974+
page: Literal["login", "signup", "blog", "careers", "pricing", "terms", "privacy", "contact"]
975+
| NotGiven = NOT_GIVEN,
976+
prioritize: Literal["speed", "quality"] | NotGiven = NOT_GIVEN,
952977
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
953978
# The extra values given here take precedence over values defined on the client or passed to this method.
954979
extra_headers: Headers | None = None,
@@ -959,8 +984,9 @@ async def screenshot(
959984
"""Beta feature: Capture a screenshot of a website.
960985
961986
Supports both viewport
962-
(standard browser view) and full-page screenshots. Returns a URL to the uploaded
963-
screenshot image hosted on our CDN.
987+
(standard browser view) and full-page screenshots. Can also screenshot specific
988+
page types (login, pricing, etc.) by using heuristics to find the appropriate
989+
URL. Returns a URL to the uploaded screenshot image hosted on our CDN.
964990
965991
Args:
966992
domain: Domain name to take screenshot of (e.g., 'example.com', 'google.com'). The
@@ -970,6 +996,15 @@ async def screenshot(
970996
screenshot capturing all content. If 'false' or not provided, takes a viewport
971997
screenshot (standard browser view).
972998
999+
page: Optional parameter to specify which page type to screenshot. If provided, the
1000+
system will scrape the domain's links and use heuristics to find the most
1001+
appropriate URL for the specified page type (30 supported languages). If not
1002+
provided, screenshots the main domain landing page.
1003+
1004+
prioritize: Optional parameter to prioritize screenshot capture. If 'speed', optimizes for
1005+
faster capture with basic quality. If 'quality', optimizes for higher quality
1006+
with longer wait times. Defaults to 'quality' if not provided.
1007+
9731008
extra_headers: Send extra headers
9741009
9751010
extra_query: Add additional query parameters to the request
@@ -989,6 +1024,8 @@ async def screenshot(
9891024
{
9901025
"domain": domain,
9911026
"full_screenshot": full_screenshot,
1027+
"page": page,
1028+
"prioritize": prioritize,
9921029
},
9931030
brand_screenshot_params.BrandScreenshotParams,
9941031
),
@@ -1000,6 +1037,7 @@ async def styleguide(
10001037
self,
10011038
*,
10021039
domain: str,
1040+
prioritize: Literal["speed", "quality"] | NotGiven = NOT_GIVEN,
10031041
timeout_ms: int | NotGiven = NOT_GIVEN,
10041042
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
10051043
# The extra values given here take precedence over values defined on the client or passed to this method.
@@ -1017,6 +1055,11 @@ async def styleguide(
10171055
domain: Domain name to extract styleguide from (e.g., 'example.com', 'google.com'). The
10181056
domain will be automatically normalized and validated.
10191057
1058+
prioritize: Optional parameter to prioritize screenshot capture for styleguide extraction.
1059+
If 'speed', optimizes for faster capture with basic quality. If 'quality',
1060+
optimizes for higher quality with longer wait times. Defaults to 'speed' if not
1061+
provided.
1062+
10201063
timeout_ms: Optional timeout in milliseconds for the request. If the request takes longer
10211064
than this value, it will be aborted with a 408 status code. Maximum allowed
10221065
value is 300000ms (5 minutes).
@@ -1039,6 +1082,7 @@ async def styleguide(
10391082
query=await async_maybe_transform(
10401083
{
10411084
"domain": domain,
1085+
"prioritize": prioritize,
10421086
"timeout_ms": timeout_ms,
10431087
},
10441088
brand_styleguide_params.BrandStyleguideParams,

src/brand/dev/types/brand_screenshot_params.py

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,3 +22,19 @@ class BrandScreenshotParams(TypedDict, total=False):
2222
If 'true', takes a full page screenshot capturing all content. If 'false' or not
2323
provided, takes a viewport screenshot (standard browser view).
2424
"""
25+
26+
page: Literal["login", "signup", "blog", "careers", "pricing", "terms", "privacy", "contact"]
27+
"""Optional parameter to specify which page type to screenshot.
28+
29+
If provided, the system will scrape the domain's links and use heuristics to
30+
find the most appropriate URL for the specified page type (30 supported
31+
languages). If not provided, screenshots the main domain landing page.
32+
"""
33+
34+
prioritize: Literal["speed", "quality"]
35+
"""Optional parameter to prioritize screenshot capture.
36+
37+
If 'speed', optimizes for faster capture with basic quality. If 'quality',
38+
optimizes for higher quality with longer wait times. Defaults to 'quality' if
39+
not provided.
40+
"""

src/brand/dev/types/brand_styleguide_params.py

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
from __future__ import annotations
44

5-
from typing_extensions import Required, Annotated, TypedDict
5+
from typing_extensions import Literal, Required, Annotated, TypedDict
66

77
from .._utils import PropertyInfo
88

@@ -16,6 +16,14 @@ class BrandStyleguideParams(TypedDict, total=False):
1616
The domain will be automatically normalized and validated.
1717
"""
1818

19+
prioritize: Literal["speed", "quality"]
20+
"""Optional parameter to prioritize screenshot capture for styleguide extraction.
21+
22+
If 'speed', optimizes for faster capture with basic quality. If 'quality',
23+
optimizes for higher quality with longer wait times. Defaults to 'speed' if not
24+
provided.
25+
"""
26+
1927
timeout_ms: Annotated[int, PropertyInfo(alias="timeoutMS")]
2028
"""Optional timeout in milliseconds for the request.
2129

tests/api_resources/test_brand.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -338,6 +338,8 @@ def test_method_screenshot_with_all_params(self, client: BrandDev) -> None:
338338
brand = client.brand.screenshot(
339339
domain="domain",
340340
full_screenshot="true",
341+
page="login",
342+
prioritize="speed",
341343
)
342344
assert_matches_type(BrandScreenshotResponse, brand, path=["response"])
343345

@@ -380,6 +382,7 @@ def test_method_styleguide(self, client: BrandDev) -> None:
380382
def test_method_styleguide_with_all_params(self, client: BrandDev) -> None:
381383
brand = client.brand.styleguide(
382384
domain="domain",
385+
prioritize="speed",
383386
timeout_ms=1,
384387
)
385388
assert_matches_type(BrandStyleguideResponse, brand, path=["response"])
@@ -728,6 +731,8 @@ async def test_method_screenshot_with_all_params(self, async_client: AsyncBrandD
728731
brand = await async_client.brand.screenshot(
729732
domain="domain",
730733
full_screenshot="true",
734+
page="login",
735+
prioritize="speed",
731736
)
732737
assert_matches_type(BrandScreenshotResponse, brand, path=["response"])
733738

@@ -770,6 +775,7 @@ async def test_method_styleguide(self, async_client: AsyncBrandDev) -> None:
770775
async def test_method_styleguide_with_all_params(self, async_client: AsyncBrandDev) -> None:
771776
brand = await async_client.brand.styleguide(
772777
domain="domain",
778+
prioritize="speed",
773779
timeout_ms=1,
774780
)
775781
assert_matches_type(BrandStyleguideResponse, brand, path=["response"])

0 commit comments

Comments
 (0)