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 @@
{
".": "0.1.0-alpha.21"
".": "0.1.0-alpha.22"
}
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
# Changelog

## 0.1.0-alpha.22 (2025-06-30)

Full Changelog: [v0.1.0-alpha.21...v0.1.0-alpha.22](https://github.com/Finch-API/finch-api-ruby/compare/v0.1.0-alpha.21...v0.1.0-alpha.22)

### Chores

* **internal:** allow streams to also be unwrapped on a per-row basis ([4146224](https://github.com/Finch-API/finch-api-ruby/commit/41462243c425627d1bcd8473c3fd7bea38edb3cd))
* **internal:** version bump ([89516f1](https://github.com/Finch-API/finch-api-ruby/commit/89516f1e431dc0a56f324fd3c72b1c2e4c240d05))

## 0.1.0-alpha.21 (2025-06-27)

Full Changelog: [v0.1.0-alpha.20...v0.1.0-alpha.21](https://github.com/Finch-API/finch-api-ruby/compare/v0.1.0-alpha.20...v0.1.0-alpha.21)
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:
finch-api (0.1.0.pre.alpha.20)
finch-api (0.1.0.pre.alpha.21)
connection_pool

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

```ruby
gem "finch-api", "~> 0.1.0.pre.alpha.21"
gem "finch-api", "~> 0.1.0.pre.alpha.22"
```

<!-- x-release-please-end -->
Expand Down
12 changes: 10 additions & 2 deletions lib/finch_api/internal/transport/base_client.rb
Original file line number Diff line number Diff line change
Expand Up @@ -471,6 +471,7 @@ def request(req)
self.class.validate!(req)
model = req.fetch(:model) { FinchAPI::Internal::Type::Unknown }
opts = req[:options].to_h
unwrap = req[:unwrap]
FinchAPI::RequestOptions.validate!(opts)
request = build_request(req.except(:options), opts)
url = request.fetch(:url)
Expand All @@ -487,11 +488,18 @@ def request(req)
decoded = FinchAPI::Internal::Util.decode_content(response, stream: stream)
case req
in {stream: Class => st}
st.new(model: model, url: url, status: status, response: response, stream: decoded)
st.new(
model: model,
url: url,
status: status,
response: response,
unwrap: unwrap,
stream: decoded
)
in {page: Class => page}
page.new(client: self, req: req, headers: response, page_data: decoded)
else
unwrapped = FinchAPI::Internal::Util.dig(decoded, req[:unwrap])
unwrapped = FinchAPI::Internal::Util.dig(decoded, unwrap)
FinchAPI::Internal::Type::Converter.coerce(model, unwrapped)
end
end
Expand Down
2 changes: 1 addition & 1 deletion lib/finch_api/version.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# frozen_string_literal: true

module FinchAPI
VERSION = "0.1.0.pre.alpha.21"
VERSION = "0.1.0.pre.alpha.22"
end