Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
".": "1.23.0"
".": "1.24.0"
}
6 changes: 3 additions & 3 deletions .stats.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
configured_endpoints: 23
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/context-dev/context.dev-65a744f4c7f4e0a4e92ff201092cf48901757824d7eb32e79cd6e36919284c10.yml
openapi_spec_hash: 88c222227b33b3cba5898fd55782cce9
config_hash: f481fca4de4b1657023180d4fc47ef22
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/context-dev/context.dev-079e4949baaeab93254aa8a651f4e9976e95387b1633002e925114ce36f29013.yml
openapi_spec_hash: 331f27b62376aaf9c311af03a21d31b8
config_hash: ada0970327c433e075b4ceef583e0755
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# Changelog

## 1.24.0 (2026-05-30)

Full Changelog: [v1.23.0...v1.24.0](https://github.com/context-dot-dev/context-ruby-sdk/compare/v1.23.0...v1.24.0)

### Features

* **api:** api update ([7948cbf](https://github.com/context-dot-dev/context-ruby-sdk/commit/7948cbf296742dd0fea7c08c148962a35ed88c20))

## 1.23.0 (2026-05-19)

Full Changelog: [v1.22.0...v1.23.0](https://github.com/context-dot-dev/context-ruby-sdk/compare/v1.22.0...v1.23.0)
Expand Down
2 changes: 1 addition & 1 deletion Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ GIT
PATH
remote: .
specs:
context.dev (1.23.0)
context.dev (1.24.0)
cgi
connection_pool

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ To use this gem, install via Bundler by adding the following to your application
<!-- x-release-please-start-version -->

```ruby
gem "context.dev", "~> 1.23.0"
gem "context.dev", "~> 1.24.0"
```

<!-- x-release-please-end -->
Expand Down
13 changes: 12 additions & 1 deletion lib/context_dev/models/web_extract_fonts_params.rb
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,15 @@ class WebExtractFontsParams < ContextDev::Internal::Type::BaseModel
# @return [String, nil]
optional :domain, String

# @!attribute max_age_ms
# Maximum age in milliseconds for cached data before the API performs a hard
# refresh. Defaults to 3 months (7776000000 ms). Values below 1 day (86400000 ms)
# are clamped to 1 day; values above 1 year (31536000000 ms) are clamped to 1
# year.
#
# @return [Integer, nil]
optional :max_age_ms, Integer

# @!attribute timeout_ms
# Optional timeout in milliseconds for the request. If the request takes longer
# than this value, it will be aborted with a 408 status code. Maximum allowed
Expand All @@ -31,14 +40,16 @@ class WebExtractFontsParams < ContextDev::Internal::Type::BaseModel
# @return [Integer, nil]
optional :timeout_ms, Integer

# @!method initialize(direct_url: nil, domain: nil, timeout_ms: nil, request_options: {})
# @!method initialize(direct_url: nil, domain: nil, max_age_ms: nil, timeout_ms: nil, request_options: {})
# Some parameter documentations has been truncated, see
# {ContextDev::Models::WebExtractFontsParams} for more details.
#
# @param direct_url [String] A specific URL to fetch fonts from directly, bypassing domain resolution (e.g.,
#
# @param domain [String] Domain name to extract fonts from (e.g., 'example.com', 'google.com'). The domai
#
# @param max_age_ms [Integer] Maximum age in milliseconds for cached data before the API performs a hard refre
#
# @param timeout_ms [Integer] Optional timeout in milliseconds for the request. If the request takes longer th
#
# @param request_options [ContextDev::RequestOptions, Hash{Symbol=>Object}]
Expand Down
13 changes: 12 additions & 1 deletion lib/context_dev/models/web_extract_styleguide_params.rb
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,15 @@ class WebExtractStyleguideParams < ContextDev::Internal::Type::BaseModel
# @return [String, nil]
optional :domain, String

# @!attribute max_age_ms
# Maximum age in milliseconds for cached data before the API performs a hard
# refresh. Defaults to 3 months (7776000000 ms). Values below 1 day (86400000 ms)
# are clamped to 1 day; values above 1 year (31536000000 ms) are clamped to 1
# year.
#
# @return [Integer, nil]
optional :max_age_ms, Integer

# @!attribute timeout_ms
# Optional timeout in milliseconds for the request. If the request takes longer
# than this value, it will be aborted with a 408 status code. Maximum allowed
Expand All @@ -32,14 +41,16 @@ class WebExtractStyleguideParams < ContextDev::Internal::Type::BaseModel
# @return [Integer, nil]
optional :timeout_ms, Integer

# @!method initialize(direct_url: nil, domain: nil, timeout_ms: nil, request_options: {})
# @!method initialize(direct_url: nil, domain: nil, max_age_ms: nil, timeout_ms: nil, request_options: {})
# Some parameter documentations has been truncated, see
# {ContextDev::Models::WebExtractStyleguideParams} for more details.
#
# @param direct_url [String] A specific URL to fetch the styleguide from directly, bypassing domain resolutio
#
# @param domain [String] Domain name to extract styleguide from (e.g., 'example.com', 'google.com'). The
#
# @param max_age_ms [Integer] Maximum age in milliseconds for cached data before the API performs a hard refre
#
# @param timeout_ms [Integer] Optional timeout in milliseconds for the request. If the request takes longer th
#
# @param request_options [ContextDev::RequestOptions, Hash{Symbol=>Object}]
Expand Down
20 changes: 16 additions & 4 deletions lib/context_dev/resources/web.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,14 @@ class Web
# Scrape font information from a website including font families, usage
# statistics, fallbacks, and element/word counts.
#
# @overload extract_fonts(direct_url: nil, domain: nil, timeout_ms: nil, request_options: {})
# @overload extract_fonts(direct_url: nil, domain: nil, max_age_ms: nil, timeout_ms: nil, request_options: {})
#
# @param direct_url [String] A specific URL to fetch fonts from directly, bypassing domain resolution (e.g.,
#
# @param domain [String] Domain name to extract fonts from (e.g., 'example.com', 'google.com'). The domai
#
# @param max_age_ms [Integer] Maximum age in milliseconds for cached data before the API performs a hard refre
#
# @param timeout_ms [Integer] Optional timeout in milliseconds for the request. If the request takes longer th
#
# @param request_options [ContextDev::RequestOptions, Hash{Symbol=>Object}, nil]
Expand All @@ -28,7 +30,11 @@ def extract_fonts(params = {})
@client.request(
method: :get,
path: "web/fonts",
query: query.transform_keys(direct_url: "directUrl", timeout_ms: "timeoutMS"),
query: query.transform_keys(
direct_url: "directUrl",
max_age_ms: "maxAgeMs",
timeout_ms: "timeoutMS"
),
model: ContextDev::Models::WebExtractFontsResponse,
options: options
)
Expand All @@ -40,12 +46,14 @@ def extract_fonts(params = {})
# Extract a comprehensive design system from a website including colors,
# typography, spacing, shadows, and UI components.
#
# @overload extract_styleguide(direct_url: nil, domain: nil, timeout_ms: nil, request_options: {})
# @overload extract_styleguide(direct_url: nil, domain: nil, max_age_ms: nil, timeout_ms: nil, request_options: {})
#
# @param direct_url [String] A specific URL to fetch the styleguide from directly, bypassing domain resolutio
#
# @param domain [String] Domain name to extract styleguide from (e.g., 'example.com', 'google.com'). The
#
# @param max_age_ms [Integer] Maximum age in milliseconds for cached data before the API performs a hard refre
#
# @param timeout_ms [Integer] Optional timeout in milliseconds for the request. If the request takes longer th
#
# @param request_options [ContextDev::RequestOptions, Hash{Symbol=>Object}, nil]
Expand All @@ -59,7 +67,11 @@ def extract_styleguide(params = {})
@client.request(
method: :get,
path: "web/styleguide",
query: query.transform_keys(direct_url: "directUrl", timeout_ms: "timeoutMS"),
query: query.transform_keys(
direct_url: "directUrl",
max_age_ms: "maxAgeMs",
timeout_ms: "timeoutMS"
),
model: ContextDev::Models::WebExtractStyleguideResponse,
options: options
)
Expand Down
2 changes: 1 addition & 1 deletion lib/context_dev/version.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# frozen_string_literal: true

module ContextDev
VERSION = "1.23.0"
VERSION = "1.24.0"
end
17 changes: 17 additions & 0 deletions rbi/context_dev/models/web_extract_fonts_params.rbi
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,16 @@ module ContextDev
sig { params(domain: String).void }
attr_writer :domain

# Maximum age in milliseconds for cached data before the API performs a hard
# refresh. Defaults to 3 months (7776000000 ms). Values below 1 day (86400000 ms)
# are clamped to 1 day; values above 1 year (31536000000 ms) are clamped to 1
# year.
sig { returns(T.nilable(Integer)) }
attr_reader :max_age_ms

sig { params(max_age_ms: Integer).void }
attr_writer :max_age_ms

# Optional timeout in milliseconds for the request. If the request takes longer
# than this value, it will be aborted with a 408 status code. Maximum allowed
# value is 300000ms (5 minutes).
Expand All @@ -45,6 +55,7 @@ module ContextDev
params(
direct_url: String,
domain: String,
max_age_ms: Integer,
timeout_ms: Integer,
request_options: ContextDev::RequestOptions::OrHash
).returns(T.attached_class)
Expand All @@ -58,6 +69,11 @@ module ContextDev
# domain will be automatically normalized and validated. You must provide either
# 'domain' or 'directUrl', but not both.
domain: nil,
# Maximum age in milliseconds for cached data before the API performs a hard
# refresh. Defaults to 3 months (7776000000 ms). Values below 1 day (86400000 ms)
# are clamped to 1 day; values above 1 year (31536000000 ms) are clamped to 1
# year.
max_age_ms: nil,
# Optional timeout in milliseconds for the request. If the request takes longer
# than this value, it will be aborted with a 408 status code. Maximum allowed
# value is 300000ms (5 minutes).
Expand All @@ -71,6 +87,7 @@ module ContextDev
{
direct_url: String,
domain: String,
max_age_ms: Integer,
timeout_ms: Integer,
request_options: ContextDev::RequestOptions
}
Expand Down
17 changes: 17 additions & 0 deletions rbi/context_dev/models/web_extract_styleguide_params.rbi
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,16 @@ module ContextDev
sig { params(domain: String).void }
attr_writer :domain

# Maximum age in milliseconds for cached data before the API performs a hard
# refresh. Defaults to 3 months (7776000000 ms). Values below 1 day (86400000 ms)
# are clamped to 1 day; values above 1 year (31536000000 ms) are clamped to 1
# year.
sig { returns(T.nilable(Integer)) }
attr_reader :max_age_ms

sig { params(max_age_ms: Integer).void }
attr_writer :max_age_ms

# Optional timeout in milliseconds for the request. If the request takes longer
# than this value, it will be aborted with a 408 status code. Maximum allowed
# value is 300000ms (5 minutes).
Expand All @@ -46,6 +56,7 @@ module ContextDev
params(
direct_url: String,
domain: String,
max_age_ms: Integer,
timeout_ms: Integer,
request_options: ContextDev::RequestOptions::OrHash
).returns(T.attached_class)
Expand All @@ -60,6 +71,11 @@ module ContextDev
# domain will be automatically normalized and validated. You must provide either
# 'domain' or 'directUrl', but not both.
domain: nil,
# Maximum age in milliseconds for cached data before the API performs a hard
# refresh. Defaults to 3 months (7776000000 ms). Values below 1 day (86400000 ms)
# are clamped to 1 day; values above 1 year (31536000000 ms) are clamped to 1
# year.
max_age_ms: nil,
# Optional timeout in milliseconds for the request. If the request takes longer
# than this value, it will be aborted with a 408 status code. Maximum allowed
# value is 300000ms (5 minutes).
Expand All @@ -73,6 +89,7 @@ module ContextDev
{
direct_url: String,
domain: String,
max_age_ms: Integer,
timeout_ms: Integer,
request_options: ContextDev::RequestOptions
}
Expand Down
12 changes: 12 additions & 0 deletions rbi/context_dev/resources/web.rbi
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ module ContextDev
params(
direct_url: String,
domain: String,
max_age_ms: Integer,
timeout_ms: Integer,
request_options: ContextDev::RequestOptions::OrHash
).returns(ContextDev::Models::WebExtractFontsResponse)
Expand All @@ -22,6 +23,11 @@ module ContextDev
# domain will be automatically normalized and validated. You must provide either
# 'domain' or 'directUrl', but not both.
domain: nil,
# Maximum age in milliseconds for cached data before the API performs a hard
# refresh. Defaults to 3 months (7776000000 ms). Values below 1 day (86400000 ms)
# are clamped to 1 day; values above 1 year (31536000000 ms) are clamped to 1
# year.
max_age_ms: nil,
# Optional timeout in milliseconds for the request. If the request takes longer
# than this value, it will be aborted with a 408 status code. Maximum allowed
# value is 300000ms (5 minutes).
Expand All @@ -36,6 +42,7 @@ module ContextDev
params(
direct_url: String,
domain: String,
max_age_ms: Integer,
timeout_ms: Integer,
request_options: ContextDev::RequestOptions::OrHash
).returns(ContextDev::Models::WebExtractStyleguideResponse)
Expand All @@ -50,6 +57,11 @@ module ContextDev
# domain will be automatically normalized and validated. You must provide either
# 'domain' or 'directUrl', but not both.
domain: nil,
# Maximum age in milliseconds for cached data before the API performs a hard
# refresh. Defaults to 3 months (7776000000 ms). Values below 1 day (86400000 ms)
# are clamped to 1 day; values above 1 year (31536000000 ms) are clamped to 1
# year.
max_age_ms: nil,
# Optional timeout in milliseconds for the request. If the request takes longer
# than this value, it will be aborted with a 408 status code. Maximum allowed
# value is 300000ms (5 minutes).
Expand Down
13 changes: 12 additions & 1 deletion sig/context_dev/models/web_extract_fonts_params.rbs
Original file line number Diff line number Diff line change
@@ -1,7 +1,12 @@
module ContextDev
module Models
type web_extract_fonts_params =
{ direct_url: String, domain: String, timeout_ms: Integer }
{
direct_url: String,
domain: String,
max_age_ms: Integer,
timeout_ms: Integer
}
& ContextDev::Internal::Type::request_parameters

class WebExtractFontsParams < ContextDev::Internal::Type::BaseModel
Expand All @@ -16,20 +21,26 @@ module ContextDev

def domain=: (String) -> String

attr_reader max_age_ms: Integer?

def max_age_ms=: (Integer) -> Integer

attr_reader timeout_ms: Integer?

def timeout_ms=: (Integer) -> Integer

def initialize: (
?direct_url: String,
?domain: String,
?max_age_ms: Integer,
?timeout_ms: Integer,
?request_options: ContextDev::request_opts
) -> void

def to_hash: -> {
direct_url: String,
domain: String,
max_age_ms: Integer,
timeout_ms: Integer,
request_options: ContextDev::RequestOptions
}
Expand Down
13 changes: 12 additions & 1 deletion sig/context_dev/models/web_extract_styleguide_params.rbs
Original file line number Diff line number Diff line change
@@ -1,7 +1,12 @@
module ContextDev
module Models
type web_extract_styleguide_params =
{ direct_url: String, domain: String, timeout_ms: Integer }
{
direct_url: String,
domain: String,
max_age_ms: Integer,
timeout_ms: Integer
}
& ContextDev::Internal::Type::request_parameters

class WebExtractStyleguideParams < ContextDev::Internal::Type::BaseModel
Expand All @@ -16,20 +21,26 @@ module ContextDev

def domain=: (String) -> String

attr_reader max_age_ms: Integer?

def max_age_ms=: (Integer) -> Integer

attr_reader timeout_ms: Integer?

def timeout_ms=: (Integer) -> Integer

def initialize: (
?direct_url: String,
?domain: String,
?max_age_ms: Integer,
?timeout_ms: Integer,
?request_options: ContextDev::request_opts
) -> void

def to_hash: -> {
direct_url: String,
domain: String,
max_age_ms: Integer,
timeout_ms: Integer,
request_options: ContextDev::RequestOptions
}
Expand Down
Loading
Loading