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
3 changes: 1 addition & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,7 @@ jobs:
runs-on: ${{ github.repository == 'stainless-sdks/brand.dev-ruby' && 'depot-ubuntu-24.04' || 'ubuntu-latest' }}
if: |-
github.repository == 'stainless-sdks/brand.dev-ruby' &&
(github.event_name == 'push' || github.event.pull_request.head.repo.fork) &&
(github.event_name != 'push' || github.event.head_commit.message != 'codegen metadata')
(github.event_name == 'push' || github.event.pull_request.head.repo.fork) && (github.event_name != 'push' || github.event.head_commit.message != 'codegen metadata')
steps:
- uses: actions/checkout@v6
- name: Set up Ruby
Expand Down
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.0.0"
".": "1.1.0"
}
4 changes: 2 additions & 2 deletions .stats.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
configured_endpoints: 20
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/brand-dev%2Fbrand.dev-fb4ca438793aa469ccc6d74266351ce4ad23b90521c62690755940dc7758225b.yml
openapi_spec_hash: caaf8fcba98e886cef121c2845ecbc57
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/brand-dev%2Fbrand.dev-c91b0567307b069c250d073074b7c861b64e632a8380b24925e15d981846bb43.yml
openapi_spec_hash: e479aa097b1283c2acf19d6360787449
config_hash: 91cf2dcefb99c39eb9cd3e98e15d6011
19 changes: 19 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,24 @@
# Changelog

## 1.1.0 (2026-03-28)

Full Changelog: [v1.0.0...v1.1.0](https://github.com/context-dot-dev/deprecated-brand-ruby-sdk/compare/v1.0.0...v1.1.0)

### Features

* **api:** api update ([03558d9](https://github.com/context-dot-dev/deprecated-brand-ruby-sdk/commit/03558d9514387f8e11a927a53a78d97bf38d966a))
* **api:** api update ([f1e52c1](https://github.com/context-dot-dev/deprecated-brand-ruby-sdk/commit/f1e52c1ea2bcc9535493849a5ac5243313e1541b))


### Bug Fixes

* **internal:** correct multipart form field name encoding ([6455f42](https://github.com/context-dot-dev/deprecated-brand-ruby-sdk/commit/6455f428805bd7af12d6d18a54ff64c54cabfbb3))


### Chores

* **ci:** support opting out of skipping builds on metadata-only commits ([efb0a18](https://github.com/context-dot-dev/deprecated-brand-ruby-sdk/commit/efb0a181cf5eef3650a352c3c97b32eb888bdc81))

## 1.0.0 (2026-03-25)

Full Changelog: [v0.32.0...v1.0.0](https://github.com/context-dot-dev/deprecated-brand-ruby-sdk/compare/v0.32.0...v1.0.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:
brand.dev (1.0.0)
brand.dev (1.1.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 "brand.dev", "~> 1.0.0"
gem "brand.dev", "~> 1.1.0"
```

<!-- x-release-please-end -->
Expand Down
3 changes: 1 addition & 2 deletions lib/brand_dev/internal/util.rb
Original file line number Diff line number Diff line change
Expand Up @@ -571,8 +571,7 @@ def encode_query_params(query)
y << "Content-Disposition: form-data"

unless key.nil?
name = ERB::Util.url_encode(key.to_s)
y << "; name=\"#{name}\""
y << "; name=\"#{key}\""
end

case val
Expand Down
4 changes: 4 additions & 0 deletions lib/brand_dev/models/brand_web_scrape_images_response.rb
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,10 @@ module Element
LINK = :link
SOURCE = :source
VIDEO = :video
CSS = :css
OBJECT = :object
META = :meta
BACKGROUND = :background

# @!method self.values
# @return [Array<Symbol>]
Expand Down
11 changes: 10 additions & 1 deletion lib/brand_dev/models/brand_web_scrape_md_params.rb
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,14 @@ class BrandWebScrapeMdParams < BrandDev::Internal::Type::BaseModel
# @return [Boolean, nil]
optional :shorten_base64_images, BrandDev::Internal::Type::Boolean

# @!method initialize(url:, include_images: nil, include_links: nil, shorten_base64_images: nil, request_options: {})
# @!attribute use_main_content_only
# Extract only the main content of the page, excluding headers, footers, sidebars,
# and navigation
#
# @return [Boolean, nil]
optional :use_main_content_only, BrandDev::Internal::Type::Boolean

# @!method initialize(url:, include_images: nil, include_links: nil, shorten_base64_images: nil, use_main_content_only: nil, request_options: {})
# Some parameter documentations has been truncated, see
# {BrandDev::Models::BrandWebScrapeMdParams} for more details.
#
Expand All @@ -44,6 +51,8 @@ class BrandWebScrapeMdParams < BrandDev::Internal::Type::BaseModel
#
# @param shorten_base64_images [Boolean] Shorten base64-encoded image data in the Markdown output
#
# @param use_main_content_only [Boolean] Extract only the main content of the page, excluding headers, footers, sidebars,
#
# @param request_options [BrandDev::RequestOptions, Hash{Symbol=>Object}]
end
end
Expand Down
7 changes: 5 additions & 2 deletions lib/brand_dev/resources/brand.rb
Original file line number Diff line number Diff line change
Expand Up @@ -584,7 +584,7 @@ def web_scrape_images(params)
# Scrapes the given URL, converts the HTML content to Markdown, and returns the
# result.
#
# @overload web_scrape_md(url:, include_images: nil, include_links: nil, shorten_base64_images: nil, request_options: {})
# @overload web_scrape_md(url:, include_images: nil, include_links: nil, shorten_base64_images: nil, use_main_content_only: nil, request_options: {})
#
# @param url [String] Full URL to scrape and convert to markdown (must include http:// or https:// pro
#
Expand All @@ -594,6 +594,8 @@ def web_scrape_images(params)
#
# @param shorten_base64_images [Boolean] Shorten base64-encoded image data in the Markdown output
#
# @param use_main_content_only [Boolean] Extract only the main content of the page, excluding headers, footers, sidebars,
#
# @param request_options [BrandDev::RequestOptions, Hash{Symbol=>Object}, nil]
#
# @return [BrandDev::Models::BrandWebScrapeMdResponse]
Expand All @@ -608,7 +610,8 @@ def web_scrape_md(params)
query: query.transform_keys(
include_images: "includeImages",
include_links: "includeLinks",
shorten_base64_images: "shortenBase64Images"
shorten_base64_images: "shortenBase64Images",
use_main_content_only: "useMainContentOnly"
),
model: BrandDev::Models::BrandWebScrapeMdResponse,
options: options
Expand Down
2 changes: 1 addition & 1 deletion lib/brand_dev/version.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# frozen_string_literal: true

module BrandDev
VERSION = "1.0.0"
VERSION = "1.1.0"
end
20 changes: 20 additions & 0 deletions rbi/brand_dev/models/brand_web_scrape_images_response.rbi
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,26 @@ module BrandDev
:video,
BrandDev::Models::BrandWebScrapeImagesResponse::Image::Element::TaggedSymbol
)
CSS =
T.let(
:css,
BrandDev::Models::BrandWebScrapeImagesResponse::Image::Element::TaggedSymbol
)
OBJECT =
T.let(
:object,
BrandDev::Models::BrandWebScrapeImagesResponse::Image::Element::TaggedSymbol
)
META =
T.let(
:meta,
BrandDev::Models::BrandWebScrapeImagesResponse::Image::Element::TaggedSymbol
)
BACKGROUND =
T.let(
:background,
BrandDev::Models::BrandWebScrapeImagesResponse::Image::Element::TaggedSymbol
)

sig do
override.returns(
Expand Down
13 changes: 13 additions & 0 deletions rbi/brand_dev/models/brand_web_scrape_md_params.rbi
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,21 @@ module BrandDev
sig { params(shorten_base64_images: T::Boolean).void }
attr_writer :shorten_base64_images

# Extract only the main content of the page, excluding headers, footers, sidebars,
# and navigation
sig { returns(T.nilable(T::Boolean)) }
attr_reader :use_main_content_only

sig { params(use_main_content_only: T::Boolean).void }
attr_writer :use_main_content_only

sig do
params(
url: String,
include_images: T::Boolean,
include_links: T::Boolean,
shorten_base64_images: T::Boolean,
use_main_content_only: T::Boolean,
request_options: BrandDev::RequestOptions::OrHash
).returns(T.attached_class)
end
Expand All @@ -56,6 +65,9 @@ module BrandDev
include_links: nil,
# Shorten base64-encoded image data in the Markdown output
shorten_base64_images: nil,
# Extract only the main content of the page, excluding headers, footers, sidebars,
# and navigation
use_main_content_only: nil,
request_options: {}
)
end
Expand All @@ -67,6 +79,7 @@ module BrandDev
include_images: T::Boolean,
include_links: T::Boolean,
shorten_base64_images: T::Boolean,
use_main_content_only: T::Boolean,
request_options: BrandDev::RequestOptions
}
)
Expand Down
4 changes: 4 additions & 0 deletions rbi/brand_dev/resources/brand.rbi
Original file line number Diff line number Diff line change
Expand Up @@ -504,6 +504,7 @@ module BrandDev
include_images: T::Boolean,
include_links: T::Boolean,
shorten_base64_images: T::Boolean,
use_main_content_only: T::Boolean,
request_options: BrandDev::RequestOptions::OrHash
).returns(BrandDev::Models::BrandWebScrapeMdResponse)
end
Expand All @@ -517,6 +518,9 @@ module BrandDev
include_links: nil,
# Shorten base64-encoded image data in the Markdown output
shorten_base64_images: nil,
# Extract only the main content of the page, excluding headers, footers, sidebars,
# and navigation
use_main_content_only: nil,
request_options: {}
)
end
Expand Down
15 changes: 14 additions & 1 deletion sig/brand_dev/models/brand_web_scrape_images_response.rbs
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,16 @@ module BrandDev
type: BrandDev::Models::BrandWebScrapeImagesResponse::Image::type_
}

type element = :img | :svg | :link | :source | :video
type element =
:img
| :svg
| :link
| :source
| :video
| :css
| :object
| :meta
| :background

module Element
extend BrandDev::Internal::Type::Enum
Expand All @@ -67,6 +76,10 @@ module BrandDev
LINK: :link
SOURCE: :source
VIDEO: :video
CSS: :css
OBJECT: :object
META: :meta
BACKGROUND: :background

def self?.values: -> ::Array[BrandDev::Models::BrandWebScrapeImagesResponse::Image::element]
end
Expand Down
9 changes: 8 additions & 1 deletion sig/brand_dev/models/brand_web_scrape_md_params.rbs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ module BrandDev
url: String,
include_images: bool,
include_links: bool,
:shorten_base64_images => bool
:shorten_base64_images => bool,
use_main_content_only: bool
}
& BrandDev::Internal::Type::request_parameters

Expand All @@ -27,11 +28,16 @@ module BrandDev

def shorten_base64_images=: (bool) -> bool

attr_reader use_main_content_only: bool?

def use_main_content_only=: (bool) -> bool

def initialize: (
url: String,
?include_images: bool,
?include_links: bool,
?shorten_base64_images: bool,
?use_main_content_only: bool,
?request_options: BrandDev::request_opts
) -> void

Expand All @@ -40,6 +46,7 @@ module BrandDev
include_images: bool,
include_links: bool,
:shorten_base64_images => bool,
use_main_content_only: bool,
request_options: BrandDev::RequestOptions
}
end
Expand Down
1 change: 1 addition & 0 deletions sig/brand_dev/resources/brand.rbs
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,7 @@ module BrandDev
?include_images: bool,
?include_links: bool,
?shorten_base64_images: bool,
?use_main_content_only: bool,
?request_options: BrandDev::request_opts
) -> BrandDev::Models::BrandWebScrapeMdResponse

Expand Down
Loading