brand.dev 0.4.0 → 0.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +16 -0
- data/README.md +3 -1
- data/SECURITY.md +4 -0
- data/lib/brand_dev/models/brand_screenshot_params.rb +55 -1
- data/lib/brand_dev/models/brand_styleguide_params.rb +26 -1
- data/lib/brand_dev/resources/brand.rb +11 -4
- data/lib/brand_dev/version.rb +1 -1
- data/rbi/brand_dev/models/brand_screenshot_params.rbi +110 -0
- data/rbi/brand_dev/models/brand_styleguide_params.rbi +58 -0
- data/rbi/brand_dev/resources/brand.rbi +20 -2
- data/sig/brand_dev/models/brand_screenshot_params.rbs +55 -1
- data/sig/brand_dev/models/brand_styleguide_params.rbs +24 -1
- data/sig/brand_dev/resources/brand.rbs +3 -0
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 01b317f9acb3113358073f005ff31643703c16777fc8752e69bc19ec56fecb1a
|
4
|
+
data.tar.gz: 670ba8cf1d6e745e01337e301ade43b415d60b8260c3545652fe7131f000e880
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4d283a5947b0a3697afde17e94e0f019cb2f5001ba5c2d73bc867f8463327bc76a1e965d5669549d37264a64ffc8e0e8c5ceed24e11a5a02f50e9872bd0e3f24
|
7
|
+
data.tar.gz: 1b546ff6476dd2a14b69c4359e4fe45617007803986e142c772b3cb6f56c393d58d790510b6aee30a85862bd9f7d7fbcb6c9ed7c8b697d2000da8e54020a90ae
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,21 @@
|
|
1
1
|
# Changelog
|
2
2
|
|
3
|
+
## 0.6.0 (2025-09-14)
|
4
|
+
|
5
|
+
Full Changelog: [v0.5.0...v0.6.0](https://github.com/brand-dot-dev/ruby-sdk/compare/v0.5.0...v0.6.0)
|
6
|
+
|
7
|
+
### Features
|
8
|
+
|
9
|
+
* **api:** api update ([f3a2056](https://github.com/brand-dot-dev/ruby-sdk/commit/f3a205642cd53962780b1789830c1d99665bb1b0))
|
10
|
+
|
11
|
+
## 0.5.0 (2025-09-07)
|
12
|
+
|
13
|
+
Full Changelog: [v0.4.0...v0.5.0](https://github.com/brand-dot-dev/ruby-sdk/compare/v0.4.0...v0.5.0)
|
14
|
+
|
15
|
+
### Features
|
16
|
+
|
17
|
+
* **api:** manual updates ([474915a](https://github.com/brand-dot-dev/ruby-sdk/commit/474915acc723c741b0de7ce1dcb64e0bc331435c))
|
18
|
+
|
3
19
|
## 0.4.0 (2025-09-07)
|
4
20
|
|
5
21
|
Full Changelog: [v0.3.2...v0.4.0](https://github.com/brand-dot-dev/ruby-sdk/compare/v0.3.2...v0.4.0)
|
data/README.md
CHANGED
@@ -8,6 +8,8 @@ It is generated with [Stainless](https://www.stainless.com/).
|
|
8
8
|
|
9
9
|
Documentation for releases of this gem can be found [on RubyDoc](https://gemdocs.org/gems/brand.dev).
|
10
10
|
|
11
|
+
The REST API documentation can be found on [docs.brand.dev](https://docs.brand.dev/).
|
12
|
+
|
11
13
|
## Installation
|
12
14
|
|
13
15
|
To use this gem, install via Bundler by adding the following to your application's `Gemfile`:
|
@@ -15,7 +17,7 @@ To use this gem, install via Bundler by adding the following to your application
|
|
15
17
|
<!-- x-release-please-start-version -->
|
16
18
|
|
17
19
|
```ruby
|
18
|
-
gem "brand.dev", "~> 0.
|
20
|
+
gem "brand.dev", "~> 0.6.0"
|
19
21
|
```
|
20
22
|
|
21
23
|
<!-- x-release-please-end -->
|
data/SECURITY.md
CHANGED
@@ -18,6 +18,10 @@ before making any information public.
|
|
18
18
|
If you encounter security issues that are not directly related to SDKs but pertain to the services
|
19
19
|
or products provided by Brand Dev, please follow the respective company's security reporting guidelines.
|
20
20
|
|
21
|
+
### Brand Dev Terms and Policies
|
22
|
+
|
23
|
+
Please contact hello@brand.dev for any questions or concerns regarding the security of our services.
|
24
|
+
|
21
25
|
---
|
22
26
|
|
23
27
|
Thank you for helping us keep the SDKs and systems they interact with secure.
|
@@ -22,7 +22,24 @@ module BrandDev
|
|
22
22
|
# @return [Symbol, BrandDev::Models::BrandScreenshotParams::FullScreenshot, nil]
|
23
23
|
optional :full_screenshot, enum: -> { BrandDev::BrandScreenshotParams::FullScreenshot }
|
24
24
|
|
25
|
-
# @!
|
25
|
+
# @!attribute page
|
26
|
+
# Optional parameter to specify which page type to screenshot. If provided, the
|
27
|
+
# system will scrape the domain's links and use heuristics to find the most
|
28
|
+
# appropriate URL for the specified page type (30 supported languages). If not
|
29
|
+
# provided, screenshots the main domain landing page.
|
30
|
+
#
|
31
|
+
# @return [Symbol, BrandDev::Models::BrandScreenshotParams::Page, nil]
|
32
|
+
optional :page, enum: -> { BrandDev::BrandScreenshotParams::Page }
|
33
|
+
|
34
|
+
# @!attribute prioritize
|
35
|
+
# Optional parameter to prioritize screenshot capture. If 'speed', optimizes for
|
36
|
+
# faster capture with basic quality. If 'quality', optimizes for higher quality
|
37
|
+
# with longer wait times. Defaults to 'quality' if not provided.
|
38
|
+
#
|
39
|
+
# @return [Symbol, BrandDev::Models::BrandScreenshotParams::Prioritize, nil]
|
40
|
+
optional :prioritize, enum: -> { BrandDev::BrandScreenshotParams::Prioritize }
|
41
|
+
|
42
|
+
# @!method initialize(domain:, full_screenshot: nil, page: nil, prioritize: nil, request_options: {})
|
26
43
|
# Some parameter documentations has been truncated, see
|
27
44
|
# {BrandDev::Models::BrandScreenshotParams} for more details.
|
28
45
|
#
|
@@ -30,6 +47,10 @@ module BrandDev
|
|
30
47
|
#
|
31
48
|
# @param full_screenshot [Symbol, BrandDev::Models::BrandScreenshotParams::FullScreenshot] Optional parameter to determine screenshot type. If 'true', takes a full page sc
|
32
49
|
#
|
50
|
+
# @param page [Symbol, BrandDev::Models::BrandScreenshotParams::Page] Optional parameter to specify which page type to screenshot. If provided, the sy
|
51
|
+
#
|
52
|
+
# @param prioritize [Symbol, BrandDev::Models::BrandScreenshotParams::Prioritize] Optional parameter to prioritize screenshot capture. If 'speed', optimizes for f
|
53
|
+
#
|
33
54
|
# @param request_options [BrandDev::RequestOptions, Hash{Symbol=>Object}]
|
34
55
|
|
35
56
|
# Optional parameter to determine screenshot type. If 'true', takes a full page
|
@@ -44,6 +65,39 @@ module BrandDev
|
|
44
65
|
# @!method self.values
|
45
66
|
# @return [Array<Symbol>]
|
46
67
|
end
|
68
|
+
|
69
|
+
# Optional parameter to specify which page type to screenshot. If provided, the
|
70
|
+
# system will scrape the domain's links and use heuristics to find the most
|
71
|
+
# appropriate URL for the specified page type (30 supported languages). If not
|
72
|
+
# provided, screenshots the main domain landing page.
|
73
|
+
module Page
|
74
|
+
extend BrandDev::Internal::Type::Enum
|
75
|
+
|
76
|
+
LOGIN = :login
|
77
|
+
SIGNUP = :signup
|
78
|
+
BLOG = :blog
|
79
|
+
CAREERS = :careers
|
80
|
+
PRICING = :pricing
|
81
|
+
TERMS = :terms
|
82
|
+
PRIVACY = :privacy
|
83
|
+
CONTACT = :contact
|
84
|
+
|
85
|
+
# @!method self.values
|
86
|
+
# @return [Array<Symbol>]
|
87
|
+
end
|
88
|
+
|
89
|
+
# Optional parameter to prioritize screenshot capture. If 'speed', optimizes for
|
90
|
+
# faster capture with basic quality. If 'quality', optimizes for higher quality
|
91
|
+
# with longer wait times. Defaults to 'quality' if not provided.
|
92
|
+
module Prioritize
|
93
|
+
extend BrandDev::Internal::Type::Enum
|
94
|
+
|
95
|
+
SPEED = :speed
|
96
|
+
QUALITY = :quality
|
97
|
+
|
98
|
+
# @!method self.values
|
99
|
+
# @return [Array<Symbol>]
|
100
|
+
end
|
47
101
|
end
|
48
102
|
end
|
49
103
|
end
|
@@ -14,6 +14,15 @@ module BrandDev
|
|
14
14
|
# @return [String]
|
15
15
|
required :domain, String
|
16
16
|
|
17
|
+
# @!attribute prioritize
|
18
|
+
# Optional parameter to prioritize screenshot capture for styleguide extraction.
|
19
|
+
# If 'speed', optimizes for faster capture with basic quality. If 'quality',
|
20
|
+
# optimizes for higher quality with longer wait times. Defaults to 'speed' if not
|
21
|
+
# provided.
|
22
|
+
#
|
23
|
+
# @return [Symbol, BrandDev::Models::BrandStyleguideParams::Prioritize, nil]
|
24
|
+
optional :prioritize, enum: -> { BrandDev::BrandStyleguideParams::Prioritize }
|
25
|
+
|
17
26
|
# @!attribute timeout_ms
|
18
27
|
# Optional timeout in milliseconds for the request. If the request takes longer
|
19
28
|
# than this value, it will be aborted with a 408 status code. Maximum allowed
|
@@ -22,15 +31,31 @@ module BrandDev
|
|
22
31
|
# @return [Integer, nil]
|
23
32
|
optional :timeout_ms, Integer
|
24
33
|
|
25
|
-
# @!method initialize(domain:, timeout_ms: nil, request_options: {})
|
34
|
+
# @!method initialize(domain:, prioritize: nil, timeout_ms: nil, request_options: {})
|
26
35
|
# Some parameter documentations has been truncated, see
|
27
36
|
# {BrandDev::Models::BrandStyleguideParams} for more details.
|
28
37
|
#
|
29
38
|
# @param domain [String] Domain name to extract styleguide from (e.g., 'example.com', 'google.com'). The
|
30
39
|
#
|
40
|
+
# @param prioritize [Symbol, BrandDev::Models::BrandStyleguideParams::Prioritize] Optional parameter to prioritize screenshot capture for styleguide extraction. I
|
41
|
+
#
|
31
42
|
# @param timeout_ms [Integer] Optional timeout in milliseconds for the request. If the request takes longer th
|
32
43
|
#
|
33
44
|
# @param request_options [BrandDev::RequestOptions, Hash{Symbol=>Object}]
|
45
|
+
|
46
|
+
# Optional parameter to prioritize screenshot capture for styleguide extraction.
|
47
|
+
# If 'speed', optimizes for faster capture with basic quality. If 'quality',
|
48
|
+
# optimizes for higher quality with longer wait times. Defaults to 'speed' if not
|
49
|
+
# provided.
|
50
|
+
module Prioritize
|
51
|
+
extend BrandDev::Internal::Type::Enum
|
52
|
+
|
53
|
+
SPEED = :speed
|
54
|
+
QUALITY = :quality
|
55
|
+
|
56
|
+
# @!method self.values
|
57
|
+
# @return [Array<Symbol>]
|
58
|
+
end
|
34
59
|
end
|
35
60
|
end
|
36
61
|
end
|
@@ -190,15 +190,20 @@ module BrandDev
|
|
190
190
|
# {BrandDev::Models::BrandScreenshotParams} for more details.
|
191
191
|
#
|
192
192
|
# Beta feature: Capture a screenshot of a website. Supports both viewport
|
193
|
-
# (standard browser view) and full-page screenshots.
|
194
|
-
#
|
193
|
+
# (standard browser view) and full-page screenshots. Can also screenshot specific
|
194
|
+
# page types (login, pricing, etc.) by using heuristics to find the appropriate
|
195
|
+
# URL. Returns a URL to the uploaded screenshot image hosted on our CDN.
|
195
196
|
#
|
196
|
-
# @overload screenshot(domain:, full_screenshot: nil, request_options: {})
|
197
|
+
# @overload screenshot(domain:, full_screenshot: nil, page: nil, prioritize: nil, request_options: {})
|
197
198
|
#
|
198
199
|
# @param domain [String] Domain name to take screenshot of (e.g., 'example.com', 'google.com'). The domai
|
199
200
|
#
|
200
201
|
# @param full_screenshot [Symbol, BrandDev::Models::BrandScreenshotParams::FullScreenshot] Optional parameter to determine screenshot type. If 'true', takes a full page sc
|
201
202
|
#
|
203
|
+
# @param page [Symbol, BrandDev::Models::BrandScreenshotParams::Page] Optional parameter to specify which page type to screenshot. If provided, the sy
|
204
|
+
#
|
205
|
+
# @param prioritize [Symbol, BrandDev::Models::BrandScreenshotParams::Prioritize] Optional parameter to prioritize screenshot capture. If 'speed', optimizes for f
|
206
|
+
#
|
202
207
|
# @param request_options [BrandDev::RequestOptions, Hash{Symbol=>Object}, nil]
|
203
208
|
#
|
204
209
|
# @return [BrandDev::Models::BrandScreenshotResponse]
|
@@ -222,10 +227,12 @@ module BrandDev
|
|
222
227
|
# a brand's website including colors, typography, spacing, shadows, and UI
|
223
228
|
# components.
|
224
229
|
#
|
225
|
-
# @overload styleguide(domain:, timeout_ms: nil, request_options: {})
|
230
|
+
# @overload styleguide(domain:, prioritize: nil, timeout_ms: nil, request_options: {})
|
226
231
|
#
|
227
232
|
# @param domain [String] Domain name to extract styleguide from (e.g., 'example.com', 'google.com'). The
|
228
233
|
#
|
234
|
+
# @param prioritize [Symbol, BrandDev::Models::BrandStyleguideParams::Prioritize] Optional parameter to prioritize screenshot capture for styleguide extraction. I
|
235
|
+
#
|
229
236
|
# @param timeout_ms [Integer] Optional timeout in milliseconds for the request. If the request takes longer th
|
230
237
|
#
|
231
238
|
# @param request_options [BrandDev::RequestOptions, Hash{Symbol=>Object}, nil]
|
data/lib/brand_dev/version.rb
CHANGED
@@ -34,11 +34,42 @@ module BrandDev
|
|
34
34
|
end
|
35
35
|
attr_writer :full_screenshot
|
36
36
|
|
37
|
+
# Optional parameter to specify which page type to screenshot. If provided, the
|
38
|
+
# system will scrape the domain's links and use heuristics to find the most
|
39
|
+
# appropriate URL for the specified page type (30 supported languages). If not
|
40
|
+
# provided, screenshots the main domain landing page.
|
41
|
+
sig do
|
42
|
+
returns(T.nilable(BrandDev::BrandScreenshotParams::Page::OrSymbol))
|
43
|
+
end
|
44
|
+
attr_reader :page
|
45
|
+
|
46
|
+
sig { params(page: BrandDev::BrandScreenshotParams::Page::OrSymbol).void }
|
47
|
+
attr_writer :page
|
48
|
+
|
49
|
+
# Optional parameter to prioritize screenshot capture. If 'speed', optimizes for
|
50
|
+
# faster capture with basic quality. If 'quality', optimizes for higher quality
|
51
|
+
# with longer wait times. Defaults to 'quality' if not provided.
|
52
|
+
sig do
|
53
|
+
returns(
|
54
|
+
T.nilable(BrandDev::BrandScreenshotParams::Prioritize::OrSymbol)
|
55
|
+
)
|
56
|
+
end
|
57
|
+
attr_reader :prioritize
|
58
|
+
|
59
|
+
sig do
|
60
|
+
params(
|
61
|
+
prioritize: BrandDev::BrandScreenshotParams::Prioritize::OrSymbol
|
62
|
+
).void
|
63
|
+
end
|
64
|
+
attr_writer :prioritize
|
65
|
+
|
37
66
|
sig do
|
38
67
|
params(
|
39
68
|
domain: String,
|
40
69
|
full_screenshot:
|
41
70
|
BrandDev::BrandScreenshotParams::FullScreenshot::OrSymbol,
|
71
|
+
page: BrandDev::BrandScreenshotParams::Page::OrSymbol,
|
72
|
+
prioritize: BrandDev::BrandScreenshotParams::Prioritize::OrSymbol,
|
42
73
|
request_options: BrandDev::RequestOptions::OrHash
|
43
74
|
).returns(T.attached_class)
|
44
75
|
end
|
@@ -50,6 +81,15 @@ module BrandDev
|
|
50
81
|
# screenshot capturing all content. If 'false' or not provided, takes a viewport
|
51
82
|
# screenshot (standard browser view).
|
52
83
|
full_screenshot: nil,
|
84
|
+
# Optional parameter to specify which page type to screenshot. If provided, the
|
85
|
+
# system will scrape the domain's links and use heuristics to find the most
|
86
|
+
# appropriate URL for the specified page type (30 supported languages). If not
|
87
|
+
# provided, screenshots the main domain landing page.
|
88
|
+
page: nil,
|
89
|
+
# Optional parameter to prioritize screenshot capture. If 'speed', optimizes for
|
90
|
+
# faster capture with basic quality. If 'quality', optimizes for higher quality
|
91
|
+
# with longer wait times. Defaults to 'quality' if not provided.
|
92
|
+
prioritize: nil,
|
53
93
|
request_options: {}
|
54
94
|
)
|
55
95
|
end
|
@@ -60,6 +100,8 @@ module BrandDev
|
|
60
100
|
domain: String,
|
61
101
|
full_screenshot:
|
62
102
|
BrandDev::BrandScreenshotParams::FullScreenshot::OrSymbol,
|
103
|
+
page: BrandDev::BrandScreenshotParams::Page::OrSymbol,
|
104
|
+
prioritize: BrandDev::BrandScreenshotParams::Prioritize::OrSymbol,
|
63
105
|
request_options: BrandDev::RequestOptions
|
64
106
|
}
|
65
107
|
)
|
@@ -100,6 +142,74 @@ module BrandDev
|
|
100
142
|
def self.values
|
101
143
|
end
|
102
144
|
end
|
145
|
+
|
146
|
+
# Optional parameter to specify which page type to screenshot. If provided, the
|
147
|
+
# system will scrape the domain's links and use heuristics to find the most
|
148
|
+
# appropriate URL for the specified page type (30 supported languages). If not
|
149
|
+
# provided, screenshots the main domain landing page.
|
150
|
+
module Page
|
151
|
+
extend BrandDev::Internal::Type::Enum
|
152
|
+
|
153
|
+
TaggedSymbol =
|
154
|
+
T.type_alias { T.all(Symbol, BrandDev::BrandScreenshotParams::Page) }
|
155
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
156
|
+
|
157
|
+
LOGIN =
|
158
|
+
T.let(:login, BrandDev::BrandScreenshotParams::Page::TaggedSymbol)
|
159
|
+
SIGNUP =
|
160
|
+
T.let(:signup, BrandDev::BrandScreenshotParams::Page::TaggedSymbol)
|
161
|
+
BLOG = T.let(:blog, BrandDev::BrandScreenshotParams::Page::TaggedSymbol)
|
162
|
+
CAREERS =
|
163
|
+
T.let(:careers, BrandDev::BrandScreenshotParams::Page::TaggedSymbol)
|
164
|
+
PRICING =
|
165
|
+
T.let(:pricing, BrandDev::BrandScreenshotParams::Page::TaggedSymbol)
|
166
|
+
TERMS =
|
167
|
+
T.let(:terms, BrandDev::BrandScreenshotParams::Page::TaggedSymbol)
|
168
|
+
PRIVACY =
|
169
|
+
T.let(:privacy, BrandDev::BrandScreenshotParams::Page::TaggedSymbol)
|
170
|
+
CONTACT =
|
171
|
+
T.let(:contact, BrandDev::BrandScreenshotParams::Page::TaggedSymbol)
|
172
|
+
|
173
|
+
sig do
|
174
|
+
override.returns(
|
175
|
+
T::Array[BrandDev::BrandScreenshotParams::Page::TaggedSymbol]
|
176
|
+
)
|
177
|
+
end
|
178
|
+
def self.values
|
179
|
+
end
|
180
|
+
end
|
181
|
+
|
182
|
+
# Optional parameter to prioritize screenshot capture. If 'speed', optimizes for
|
183
|
+
# faster capture with basic quality. If 'quality', optimizes for higher quality
|
184
|
+
# with longer wait times. Defaults to 'quality' if not provided.
|
185
|
+
module Prioritize
|
186
|
+
extend BrandDev::Internal::Type::Enum
|
187
|
+
|
188
|
+
TaggedSymbol =
|
189
|
+
T.type_alias do
|
190
|
+
T.all(Symbol, BrandDev::BrandScreenshotParams::Prioritize)
|
191
|
+
end
|
192
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
193
|
+
|
194
|
+
SPEED =
|
195
|
+
T.let(
|
196
|
+
:speed,
|
197
|
+
BrandDev::BrandScreenshotParams::Prioritize::TaggedSymbol
|
198
|
+
)
|
199
|
+
QUALITY =
|
200
|
+
T.let(
|
201
|
+
:quality,
|
202
|
+
BrandDev::BrandScreenshotParams::Prioritize::TaggedSymbol
|
203
|
+
)
|
204
|
+
|
205
|
+
sig do
|
206
|
+
override.returns(
|
207
|
+
T::Array[BrandDev::BrandScreenshotParams::Prioritize::TaggedSymbol]
|
208
|
+
)
|
209
|
+
end
|
210
|
+
def self.values
|
211
|
+
end
|
212
|
+
end
|
103
213
|
end
|
104
214
|
end
|
105
215
|
end
|
@@ -16,6 +16,24 @@ module BrandDev
|
|
16
16
|
sig { returns(String) }
|
17
17
|
attr_accessor :domain
|
18
18
|
|
19
|
+
# Optional parameter to prioritize screenshot capture for styleguide extraction.
|
20
|
+
# If 'speed', optimizes for faster capture with basic quality. If 'quality',
|
21
|
+
# optimizes for higher quality with longer wait times. Defaults to 'speed' if not
|
22
|
+
# provided.
|
23
|
+
sig do
|
24
|
+
returns(
|
25
|
+
T.nilable(BrandDev::BrandStyleguideParams::Prioritize::OrSymbol)
|
26
|
+
)
|
27
|
+
end
|
28
|
+
attr_reader :prioritize
|
29
|
+
|
30
|
+
sig do
|
31
|
+
params(
|
32
|
+
prioritize: BrandDev::BrandStyleguideParams::Prioritize::OrSymbol
|
33
|
+
).void
|
34
|
+
end
|
35
|
+
attr_writer :prioritize
|
36
|
+
|
19
37
|
# Optional timeout in milliseconds for the request. If the request takes longer
|
20
38
|
# than this value, it will be aborted with a 408 status code. Maximum allowed
|
21
39
|
# value is 300000ms (5 minutes).
|
@@ -28,6 +46,7 @@ module BrandDev
|
|
28
46
|
sig do
|
29
47
|
params(
|
30
48
|
domain: String,
|
49
|
+
prioritize: BrandDev::BrandStyleguideParams::Prioritize::OrSymbol,
|
31
50
|
timeout_ms: Integer,
|
32
51
|
request_options: BrandDev::RequestOptions::OrHash
|
33
52
|
).returns(T.attached_class)
|
@@ -36,6 +55,11 @@ module BrandDev
|
|
36
55
|
# Domain name to extract styleguide from (e.g., 'example.com', 'google.com'). The
|
37
56
|
# domain will be automatically normalized and validated.
|
38
57
|
domain:,
|
58
|
+
# Optional parameter to prioritize screenshot capture for styleguide extraction.
|
59
|
+
# If 'speed', optimizes for faster capture with basic quality. If 'quality',
|
60
|
+
# optimizes for higher quality with longer wait times. Defaults to 'speed' if not
|
61
|
+
# provided.
|
62
|
+
prioritize: nil,
|
39
63
|
# Optional timeout in milliseconds for the request. If the request takes longer
|
40
64
|
# than this value, it will be aborted with a 408 status code. Maximum allowed
|
41
65
|
# value is 300000ms (5 minutes).
|
@@ -48,6 +72,7 @@ module BrandDev
|
|
48
72
|
override.returns(
|
49
73
|
{
|
50
74
|
domain: String,
|
75
|
+
prioritize: BrandDev::BrandStyleguideParams::Prioritize::OrSymbol,
|
51
76
|
timeout_ms: Integer,
|
52
77
|
request_options: BrandDev::RequestOptions
|
53
78
|
}
|
@@ -55,6 +80,39 @@ module BrandDev
|
|
55
80
|
end
|
56
81
|
def to_hash
|
57
82
|
end
|
83
|
+
|
84
|
+
# Optional parameter to prioritize screenshot capture for styleguide extraction.
|
85
|
+
# If 'speed', optimizes for faster capture with basic quality. If 'quality',
|
86
|
+
# optimizes for higher quality with longer wait times. Defaults to 'speed' if not
|
87
|
+
# provided.
|
88
|
+
module Prioritize
|
89
|
+
extend BrandDev::Internal::Type::Enum
|
90
|
+
|
91
|
+
TaggedSymbol =
|
92
|
+
T.type_alias do
|
93
|
+
T.all(Symbol, BrandDev::BrandStyleguideParams::Prioritize)
|
94
|
+
end
|
95
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
96
|
+
|
97
|
+
SPEED =
|
98
|
+
T.let(
|
99
|
+
:speed,
|
100
|
+
BrandDev::BrandStyleguideParams::Prioritize::TaggedSymbol
|
101
|
+
)
|
102
|
+
QUALITY =
|
103
|
+
T.let(
|
104
|
+
:quality,
|
105
|
+
BrandDev::BrandStyleguideParams::Prioritize::TaggedSymbol
|
106
|
+
)
|
107
|
+
|
108
|
+
sig do
|
109
|
+
override.returns(
|
110
|
+
T::Array[BrandDev::BrandStyleguideParams::Prioritize::TaggedSymbol]
|
111
|
+
)
|
112
|
+
end
|
113
|
+
def self.values
|
114
|
+
end
|
115
|
+
end
|
58
116
|
end
|
59
117
|
end
|
60
118
|
end
|
@@ -157,13 +157,16 @@ module BrandDev
|
|
157
157
|
end
|
158
158
|
|
159
159
|
# Beta feature: Capture a screenshot of a website. Supports both viewport
|
160
|
-
# (standard browser view) and full-page screenshots.
|
161
|
-
#
|
160
|
+
# (standard browser view) and full-page screenshots. Can also screenshot specific
|
161
|
+
# page types (login, pricing, etc.) by using heuristics to find the appropriate
|
162
|
+
# URL. Returns a URL to the uploaded screenshot image hosted on our CDN.
|
162
163
|
sig do
|
163
164
|
params(
|
164
165
|
domain: String,
|
165
166
|
full_screenshot:
|
166
167
|
BrandDev::BrandScreenshotParams::FullScreenshot::OrSymbol,
|
168
|
+
page: BrandDev::BrandScreenshotParams::Page::OrSymbol,
|
169
|
+
prioritize: BrandDev::BrandScreenshotParams::Prioritize::OrSymbol,
|
167
170
|
request_options: BrandDev::RequestOptions::OrHash
|
168
171
|
).returns(BrandDev::Models::BrandScreenshotResponse)
|
169
172
|
end
|
@@ -175,6 +178,15 @@ module BrandDev
|
|
175
178
|
# screenshot capturing all content. If 'false' or not provided, takes a viewport
|
176
179
|
# screenshot (standard browser view).
|
177
180
|
full_screenshot: nil,
|
181
|
+
# Optional parameter to specify which page type to screenshot. If provided, the
|
182
|
+
# system will scrape the domain's links and use heuristics to find the most
|
183
|
+
# appropriate URL for the specified page type (30 supported languages). If not
|
184
|
+
# provided, screenshots the main domain landing page.
|
185
|
+
page: nil,
|
186
|
+
# Optional parameter to prioritize screenshot capture. If 'speed', optimizes for
|
187
|
+
# faster capture with basic quality. If 'quality', optimizes for higher quality
|
188
|
+
# with longer wait times. Defaults to 'quality' if not provided.
|
189
|
+
prioritize: nil,
|
178
190
|
request_options: {}
|
179
191
|
)
|
180
192
|
end
|
@@ -185,6 +197,7 @@ module BrandDev
|
|
185
197
|
sig do
|
186
198
|
params(
|
187
199
|
domain: String,
|
200
|
+
prioritize: BrandDev::BrandStyleguideParams::Prioritize::OrSymbol,
|
188
201
|
timeout_ms: Integer,
|
189
202
|
request_options: BrandDev::RequestOptions::OrHash
|
190
203
|
).returns(BrandDev::Models::BrandStyleguideResponse)
|
@@ -193,6 +206,11 @@ module BrandDev
|
|
193
206
|
# Domain name to extract styleguide from (e.g., 'example.com', 'google.com'). The
|
194
207
|
# domain will be automatically normalized and validated.
|
195
208
|
domain:,
|
209
|
+
# Optional parameter to prioritize screenshot capture for styleguide extraction.
|
210
|
+
# If 'speed', optimizes for faster capture with basic quality. If 'quality',
|
211
|
+
# optimizes for higher quality with longer wait times. Defaults to 'speed' if not
|
212
|
+
# provided.
|
213
|
+
prioritize: nil,
|
196
214
|
# Optional timeout in milliseconds for the request. If the request takes longer
|
197
215
|
# than this value, it will be aborted with a 408 status code. Maximum allowed
|
198
216
|
# value is 300000ms (5 minutes).
|
@@ -3,7 +3,9 @@ module BrandDev
|
|
3
3
|
type brand_screenshot_params =
|
4
4
|
{
|
5
5
|
domain: String,
|
6
|
-
full_screenshot: BrandDev::Models::BrandScreenshotParams::full_screenshot
|
6
|
+
full_screenshot: BrandDev::Models::BrandScreenshotParams::full_screenshot,
|
7
|
+
page: BrandDev::Models::BrandScreenshotParams::page,
|
8
|
+
prioritize: BrandDev::Models::BrandScreenshotParams::prioritize
|
7
9
|
}
|
8
10
|
& BrandDev::Internal::Type::request_parameters
|
9
11
|
|
@@ -19,15 +21,31 @@ module BrandDev
|
|
19
21
|
BrandDev::Models::BrandScreenshotParams::full_screenshot
|
20
22
|
) -> BrandDev::Models::BrandScreenshotParams::full_screenshot
|
21
23
|
|
24
|
+
attr_reader page: BrandDev::Models::BrandScreenshotParams::page?
|
25
|
+
|
26
|
+
def page=: (
|
27
|
+
BrandDev::Models::BrandScreenshotParams::page
|
28
|
+
) -> BrandDev::Models::BrandScreenshotParams::page
|
29
|
+
|
30
|
+
attr_reader prioritize: BrandDev::Models::BrandScreenshotParams::prioritize?
|
31
|
+
|
32
|
+
def prioritize=: (
|
33
|
+
BrandDev::Models::BrandScreenshotParams::prioritize
|
34
|
+
) -> BrandDev::Models::BrandScreenshotParams::prioritize
|
35
|
+
|
22
36
|
def initialize: (
|
23
37
|
domain: String,
|
24
38
|
?full_screenshot: BrandDev::Models::BrandScreenshotParams::full_screenshot,
|
39
|
+
?page: BrandDev::Models::BrandScreenshotParams::page,
|
40
|
+
?prioritize: BrandDev::Models::BrandScreenshotParams::prioritize,
|
25
41
|
?request_options: BrandDev::request_opts
|
26
42
|
) -> void
|
27
43
|
|
28
44
|
def to_hash: -> {
|
29
45
|
domain: String,
|
30
46
|
full_screenshot: BrandDev::Models::BrandScreenshotParams::full_screenshot,
|
47
|
+
page: BrandDev::Models::BrandScreenshotParams::page,
|
48
|
+
prioritize: BrandDev::Models::BrandScreenshotParams::prioritize,
|
31
49
|
request_options: BrandDev::RequestOptions
|
32
50
|
}
|
33
51
|
|
@@ -41,6 +59,42 @@ module BrandDev
|
|
41
59
|
|
42
60
|
def self?.values: -> ::Array[BrandDev::Models::BrandScreenshotParams::full_screenshot]
|
43
61
|
end
|
62
|
+
|
63
|
+
type page =
|
64
|
+
:login
|
65
|
+
| :signup
|
66
|
+
| :blog
|
67
|
+
| :careers
|
68
|
+
| :pricing
|
69
|
+
| :terms
|
70
|
+
| :privacy
|
71
|
+
| :contact
|
72
|
+
|
73
|
+
module Page
|
74
|
+
extend BrandDev::Internal::Type::Enum
|
75
|
+
|
76
|
+
LOGIN: :login
|
77
|
+
SIGNUP: :signup
|
78
|
+
BLOG: :blog
|
79
|
+
CAREERS: :careers
|
80
|
+
PRICING: :pricing
|
81
|
+
TERMS: :terms
|
82
|
+
PRIVACY: :privacy
|
83
|
+
CONTACT: :contact
|
84
|
+
|
85
|
+
def self?.values: -> ::Array[BrandDev::Models::BrandScreenshotParams::page]
|
86
|
+
end
|
87
|
+
|
88
|
+
type prioritize = :speed | :quality
|
89
|
+
|
90
|
+
module Prioritize
|
91
|
+
extend BrandDev::Internal::Type::Enum
|
92
|
+
|
93
|
+
SPEED: :speed
|
94
|
+
QUALITY: :quality
|
95
|
+
|
96
|
+
def self?.values: -> ::Array[BrandDev::Models::BrandScreenshotParams::prioritize]
|
97
|
+
end
|
44
98
|
end
|
45
99
|
end
|
46
100
|
end
|
@@ -1,7 +1,11 @@
|
|
1
1
|
module BrandDev
|
2
2
|
module Models
|
3
3
|
type brand_styleguide_params =
|
4
|
-
{
|
4
|
+
{
|
5
|
+
domain: String,
|
6
|
+
prioritize: BrandDev::Models::BrandStyleguideParams::prioritize,
|
7
|
+
timeout_ms: Integer
|
8
|
+
}
|
5
9
|
& BrandDev::Internal::Type::request_parameters
|
6
10
|
|
7
11
|
class BrandStyleguideParams < BrandDev::Internal::Type::BaseModel
|
@@ -10,21 +14,40 @@ module BrandDev
|
|
10
14
|
|
11
15
|
attr_accessor domain: String
|
12
16
|
|
17
|
+
attr_reader prioritize: BrandDev::Models::BrandStyleguideParams::prioritize?
|
18
|
+
|
19
|
+
def prioritize=: (
|
20
|
+
BrandDev::Models::BrandStyleguideParams::prioritize
|
21
|
+
) -> BrandDev::Models::BrandStyleguideParams::prioritize
|
22
|
+
|
13
23
|
attr_reader timeout_ms: Integer?
|
14
24
|
|
15
25
|
def timeout_ms=: (Integer) -> Integer
|
16
26
|
|
17
27
|
def initialize: (
|
18
28
|
domain: String,
|
29
|
+
?prioritize: BrandDev::Models::BrandStyleguideParams::prioritize,
|
19
30
|
?timeout_ms: Integer,
|
20
31
|
?request_options: BrandDev::request_opts
|
21
32
|
) -> void
|
22
33
|
|
23
34
|
def to_hash: -> {
|
24
35
|
domain: String,
|
36
|
+
prioritize: BrandDev::Models::BrandStyleguideParams::prioritize,
|
25
37
|
timeout_ms: Integer,
|
26
38
|
request_options: BrandDev::RequestOptions
|
27
39
|
}
|
40
|
+
|
41
|
+
type prioritize = :speed | :quality
|
42
|
+
|
43
|
+
module Prioritize
|
44
|
+
extend BrandDev::Internal::Type::Enum
|
45
|
+
|
46
|
+
SPEED: :speed
|
47
|
+
QUALITY: :quality
|
48
|
+
|
49
|
+
def self?.values: -> ::Array[BrandDev::Models::BrandStyleguideParams::prioritize]
|
50
|
+
end
|
28
51
|
end
|
29
52
|
end
|
30
53
|
end
|
@@ -46,11 +46,14 @@ module BrandDev
|
|
46
46
|
def screenshot: (
|
47
47
|
domain: String,
|
48
48
|
?full_screenshot: BrandDev::Models::BrandScreenshotParams::full_screenshot,
|
49
|
+
?page: BrandDev::Models::BrandScreenshotParams::page,
|
50
|
+
?prioritize: BrandDev::Models::BrandScreenshotParams::prioritize,
|
49
51
|
?request_options: BrandDev::request_opts
|
50
52
|
) -> BrandDev::Models::BrandScreenshotResponse
|
51
53
|
|
52
54
|
def styleguide: (
|
53
55
|
domain: String,
|
56
|
+
?prioritize: BrandDev::Models::BrandStyleguideParams::prioritize,
|
54
57
|
?timeout_ms: Integer,
|
55
58
|
?request_options: BrandDev::request_opts
|
56
59
|
) -> BrandDev::Models::BrandStyleguideResponse
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: brand.dev
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.6.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Brand Dev
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2025-09-
|
11
|
+
date: 2025-09-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: connection_pool
|
@@ -25,7 +25,7 @@ dependencies:
|
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: '0'
|
27
27
|
description:
|
28
|
-
email:
|
28
|
+
email: hello@brand.dev
|
29
29
|
executables: []
|
30
30
|
extensions: []
|
31
31
|
extra_rdoc_files:
|