Skip to content

Commit 558bf61

Browse files
authored
Merge pull request #36 from brand-dot-dev/release-please--branches--main--changes--next
release: 0.15.0
2 parents 01729f9 + dc4a651 commit 558bf61

File tree

20 files changed

+553
-8
lines changed

20 files changed

+553
-8
lines changed

.release-please-manifest.json

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

.stats.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
configured_endpoints: 12
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/brand-dev%2Fbrand.dev-fff3572a2d6f3a8461fbf52fb74882e1f4ae4a2b31a75673dcae230b336911d2.yml
3-
openapi_spec_hash: b04ce3c7879b31f1e38cd76372e8e652
4-
config_hash: 86160e220c81f47769a71c9343e486d8
1+
configured_endpoints: 13
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/brand-dev%2Fbrand.dev-f69782c2c4296df9db6b41a3a7359a9e4910f59e34901b9f0e8045cec3f9ca69.yml
3+
openapi_spec_hash: f06c3956a6fc7e57614b120910339747
4+
config_hash: 6aaf0fe6f8877c9c5d9af95597123cb4

CHANGELOG.md

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

3+
## 0.15.0 (2025-11-29)
4+
5+
Full Changelog: [v0.14.0...v0.15.0](https://github.com/brand-dot-dev/ruby-sdk/compare/v0.14.0...v0.15.0)
6+
7+
### Features
8+
9+
* **api:** manual updates ([1586ca9](https://github.com/brand-dot-dev/ruby-sdk/commit/1586ca9407bc0c7821563fb93b640c1e7308528d))
10+
311
## 0.14.0 (2025-11-24)
412

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

Gemfile.lock

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ GIT
1111
PATH
1212
remote: .
1313
specs:
14-
brand.dev (0.14.0)
14+
brand.dev (0.15.0)
1515
connection_pool
1616

1717
GEM

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ To use this gem, install via Bundler by adding the following to your application
1717
<!-- x-release-please-start-version -->
1818

1919
```ruby
20-
gem "brand.dev", "~> 0.14.0"
20+
gem "brand.dev", "~> 0.15.0"
2121
```
2222

2323
<!-- x-release-please-end -->

lib/brand_dev.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,8 @@
5454
require_relative "brand_dev/client"
5555
require_relative "brand_dev/models/brand_ai_query_params"
5656
require_relative "brand_dev/models/brand_ai_query_response"
57+
require_relative "brand_dev/models/brand_fonts_params"
58+
require_relative "brand_dev/models/brand_fonts_response"
5759
require_relative "brand_dev/models/brand_identify_from_transaction_params"
5860
require_relative "brand_dev/models/brand_identify_from_transaction_response"
5961
require_relative "brand_dev/models/brand_prefetch_params"

lib/brand_dev/models.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,8 @@ module BrandDev
4141

4242
BrandAIQueryParams = BrandDev::Models::BrandAIQueryParams
4343

44+
BrandFontsParams = BrandDev::Models::BrandFontsParams
45+
4446
BrandIdentifyFromTransactionParams = BrandDev::Models::BrandIdentifyFromTransactionParams
4547

4648
BrandPrefetchParams = BrandDev::Models::BrandPrefetchParams
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
# frozen_string_literal: true
2+
3+
module BrandDev
4+
module Models
5+
# @see BrandDev::Resources::Brand#fonts
6+
class BrandFontsParams < BrandDev::Internal::Type::BaseModel
7+
extend BrandDev::Internal::Type::RequestParameters::Converter
8+
include BrandDev::Internal::Type::RequestParameters
9+
10+
# @!attribute domain
11+
# Domain name to extract fonts from (e.g., 'example.com', 'google.com'). The
12+
# domain will be automatically normalized and validated.
13+
#
14+
# @return [String]
15+
required :domain, String
16+
17+
# @!attribute timeout_ms
18+
# Optional timeout in milliseconds for the request. If the request takes longer
19+
# than this value, it will be aborted with a 408 status code. Maximum allowed
20+
# value is 300000ms (5 minutes).
21+
#
22+
# @return [Integer, nil]
23+
optional :timeout_ms, Integer
24+
25+
# @!method initialize(domain:, timeout_ms: nil, request_options: {})
26+
# Some parameter documentations has been truncated, see
27+
# {BrandDev::Models::BrandFontsParams} for more details.
28+
#
29+
# @param domain [String] Domain name to extract fonts from (e.g., 'example.com', 'google.com'). The domai
30+
#
31+
# @param timeout_ms [Integer] Optional timeout in milliseconds for the request. If the request takes longer th
32+
#
33+
# @param request_options [BrandDev::RequestOptions, Hash{Symbol=>Object}]
34+
end
35+
end
36+
end
Lines changed: 100 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,100 @@
1+
# frozen_string_literal: true
2+
3+
module BrandDev
4+
module Models
5+
# @see BrandDev::Resources::Brand#fonts
6+
class BrandFontsResponse < BrandDev::Internal::Type::BaseModel
7+
# @!attribute code
8+
# HTTP status code, e.g., 200
9+
#
10+
# @return [Integer]
11+
required :code, Integer
12+
13+
# @!attribute domain
14+
# The normalized domain that was processed
15+
#
16+
# @return [String]
17+
required :domain, String
18+
19+
# @!attribute fonts
20+
# Array of font usage information
21+
#
22+
# @return [Array<BrandDev::Models::BrandFontsResponse::Font>]
23+
required :fonts, -> { BrandDev::Internal::Type::ArrayOf[BrandDev::Models::BrandFontsResponse::Font] }
24+
25+
# @!attribute status
26+
# Status of the response, e.g., 'ok'
27+
#
28+
# @return [String]
29+
required :status, String
30+
31+
# @!method initialize(code:, domain:, fonts:, status:)
32+
# @param code [Integer] HTTP status code, e.g., 200
33+
#
34+
# @param domain [String] The normalized domain that was processed
35+
#
36+
# @param fonts [Array<BrandDev::Models::BrandFontsResponse::Font>] Array of font usage information
37+
#
38+
# @param status [String] Status of the response, e.g., 'ok'
39+
40+
class Font < BrandDev::Internal::Type::BaseModel
41+
# @!attribute fallbacks
42+
# Array of fallback font families
43+
#
44+
# @return [Array<String>]
45+
required :fallbacks, BrandDev::Internal::Type::ArrayOf[String]
46+
47+
# @!attribute font
48+
# Font family name
49+
#
50+
# @return [String]
51+
required :font, String
52+
53+
# @!attribute num_elements
54+
# Number of elements using this font
55+
#
56+
# @return [Float]
57+
required :num_elements, Float
58+
59+
# @!attribute num_words
60+
# Number of words using this font
61+
#
62+
# @return [Float]
63+
required :num_words, Float
64+
65+
# @!attribute percent_elements
66+
# Percentage of elements using this font
67+
#
68+
# @return [Float]
69+
required :percent_elements, Float
70+
71+
# @!attribute percent_words
72+
# Percentage of words using this font
73+
#
74+
# @return [Float]
75+
required :percent_words, Float
76+
77+
# @!attribute uses
78+
# Array of CSS selectors or element types where this font is used
79+
#
80+
# @return [Array<String>]
81+
required :uses, BrandDev::Internal::Type::ArrayOf[String]
82+
83+
# @!method initialize(fallbacks:, font:, num_elements:, num_words:, percent_elements:, percent_words:, uses:)
84+
# @param fallbacks [Array<String>] Array of fallback font families
85+
#
86+
# @param font [String] Font family name
87+
#
88+
# @param num_elements [Float] Number of elements using this font
89+
#
90+
# @param num_words [Float] Number of words using this font
91+
#
92+
# @param percent_elements [Float] Percentage of elements using this font
93+
#
94+
# @param percent_words [Float] Percentage of words using this font
95+
#
96+
# @param uses [Array<String>] Array of CSS selectors or element types where this font is used
97+
end
98+
end
99+
end
100+
end

lib/brand_dev/resources/brand.rb

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,34 @@ def ai_query(params)
6868
)
6969
end
7070

71+
# Some parameter documentations has been truncated, see
72+
# {BrandDev::Models::BrandFontsParams} for more details.
73+
#
74+
# Beta feature: Extract font information from a brand's website including font
75+
# families, usage statistics, fallbacks, and element/word counts.
76+
#
77+
# @overload fonts(domain:, timeout_ms: nil, request_options: {})
78+
#
79+
# @param domain [String] Domain name to extract fonts from (e.g., 'example.com', 'google.com'). The domai
80+
#
81+
# @param timeout_ms [Integer] Optional timeout in milliseconds for the request. If the request takes longer th
82+
#
83+
# @param request_options [BrandDev::RequestOptions, Hash{Symbol=>Object}, nil]
84+
#
85+
# @return [BrandDev::Models::BrandFontsResponse]
86+
#
87+
# @see BrandDev::Models::BrandFontsParams
88+
def fonts(params)
89+
parsed, options = BrandDev::BrandFontsParams.dump_request(params)
90+
@client.request(
91+
method: :get,
92+
path: "brand/fonts",
93+
query: parsed.transform_keys(timeout_ms: "timeoutMS"),
94+
model: BrandDev::Models::BrandFontsResponse,
95+
options: options
96+
)
97+
end
98+
7199
# Some parameter documentations has been truncated, see
72100
# {BrandDev::Models::BrandIdentifyFromTransactionParams} for more details.
73101
#

0 commit comments

Comments
 (0)