Skip to content

Commit bcd965b

Browse files
authored
Merge pull request #59 from context-dot-dev/release-please--branches--main--changes--next
release: 2.8.0
2 parents 5cee9f4 + 17d8d2f commit bcd965b

20 files changed

Lines changed: 525 additions & 8 deletions

‎.release-please-manifest.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
{
2-
".": "2.7.0"
2+
".": "2.8.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: 37
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/context-dev/context.dev-758c3a2fbd5b7be61c8e6e0ad2e6a5ec30695747bb675960d888c497647d13d7.yml
3-
openapi_spec_hash: 00002d90bde02f67e174368ae470c597
4-
config_hash: 2bea1743c84d63bd61f8501a6ea63065
1+
configured_endpoints: 38
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/context-dev/context.dev-155e4761d62255841349c0f8a01b0a9c463ea1d1f2d6c4fd8d1a75c8bef6f226.yml
3+
openapi_spec_hash: ab91f77e7c9d992400cbc7fc8a9e76c1
4+
config_hash: bff282047fafdad771fb7ec685f56944

‎CHANGELOG.md‎

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

3+
## 2.8.0 (2026-08-05)
4+
5+
Full Changelog: [v2.7.0...v2.8.0](https://github.com/context-dot-dev/context-ruby-sdk/compare/v2.7.0...v2.8.0)
6+
7+
### Features
8+
9+
* **api:** manual updates ([054713e](https://github.com/context-dot-dev/context-ruby-sdk/commit/054713ecd7a6c12c29a2aaf0df0ea0eeb0ff61fc))
10+
311
## 2.7.0 (2026-08-01)
412

513
Full Changelog: [v2.6.0...v2.7.0](https://github.com/context-dot-dev/context-ruby-sdk/compare/v2.6.0...v2.7.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-
context.dev (2.7.0)
14+
context.dev (2.8.0)
1515
cgi
1616
connection_pool
1717

‎README.md‎

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

2828
```ruby
29-
gem "context.dev", "~> 2.7.0"
29+
gem "context.dev", "~> 2.8.0"
3030
```
3131

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

‎lib/context_dev.rb‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,8 @@
7070
require_relative "context_dev/models/brand_retrieve_response"
7171
require_relative "context_dev/models/brand_retrieve_simplified_params"
7272
require_relative "context_dev/models/brand_retrieve_simplified_response"
73+
require_relative "context_dev/models/brand_search_params"
74+
require_relative "context_dev/models/brand_search_response"
7375
require_relative "context_dev/models/crawl_controls"
7476
require_relative "context_dev/models/failure"
7577
require_relative "context_dev/models/industry_retrieve_naics_params"

‎lib/context_dev/models.rb‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,8 @@ module ContextDev
5757

5858
BrandRetrieveSimplifiedParams = ContextDev::Models::BrandRetrieveSimplifiedParams
5959

60+
BrandSearchParams = ContextDev::Models::BrandSearchParams
61+
6062
CrawlControls = ContextDev::Models::CrawlControls
6163

6264
Failure = ContextDev::Models::Failure
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 ContextDev
4+
module Models
5+
# @see ContextDev::Resources::Brand#search
6+
class BrandSearchParams < ContextDev::Internal::Type::BaseModel
7+
extend ContextDev::Internal::Type::RequestParameters::Converter
8+
include ContextDev::Internal::Type::RequestParameters
9+
10+
# @!attribute query
11+
# Search term, matched against brand names and domains by prefix (e.g. 'nike',
12+
# 'nike.com', 'nik').
13+
#
14+
# @return [String]
15+
required :query, String
16+
17+
# @!attribute tags
18+
# Optional comma-separated caller-defined tags for tracking this request. Tags are
19+
# recorded on the request's usage log and can be used to filter usage on the
20+
# dashboard usage page. Up to 20 tags, each 1-50 characters.
21+
#
22+
# @return [Array<String>, nil]
23+
optional :tags, ContextDev::Internal::Type::ArrayOf[String]
24+
25+
# @!method initialize(query:, tags: nil, request_options: {})
26+
# Some parameter documentations has been truncated, see
27+
# {ContextDev::Models::BrandSearchParams} for more details.
28+
#
29+
# @param query [String] Search term, matched against brand names and domains by prefix (e.g. 'nike', 'ni
30+
#
31+
# @param tags [Array<String>] Optional comma-separated caller-defined tags for tracking this request. Tags are
32+
#
33+
# @param request_options [ContextDev::RequestOptions, Hash{Symbol=>Object}]
34+
end
35+
end
36+
end
Lines changed: 84 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,84 @@
1+
# frozen_string_literal: true
2+
3+
module ContextDev
4+
module Models
5+
# @see ContextDev::Resources::Brand#search
6+
class BrandSearchResponse < ContextDev::Internal::Type::BaseModel
7+
# @!attribute results
8+
# Up to 10 matching brands, most popular first. Empty when nothing matches.
9+
#
10+
# @return [Array<ContextDev::Models::BrandSearchResponse::Result>]
11+
required :results,
12+
-> { ContextDev::Internal::Type::ArrayOf[ContextDev::Models::BrandSearchResponse::Result] }
13+
14+
# @!attribute key_metadata
15+
# Metadata about the API key used for the request. Included in every response
16+
# whenever a valid API key is provided, even when the response status is not 200.
17+
#
18+
# @return [ContextDev::Models::BrandSearchResponse::KeyMetadata, nil]
19+
optional :key_metadata, -> { ContextDev::Models::BrandSearchResponse::KeyMetadata }
20+
21+
# @!method initialize(results:, key_metadata: nil)
22+
# Some parameter documentations has been truncated, see
23+
# {ContextDev::Models::BrandSearchResponse} for more details.
24+
#
25+
# @param results [Array<ContextDev::Models::BrandSearchResponse::Result>] Up to 10 matching brands, most popular first. Empty when nothing matches.
26+
#
27+
# @param key_metadata [ContextDev::Models::BrandSearchResponse::KeyMetadata] Metadata about the API key used for the request. Included in every response when
28+
29+
class Result < ContextDev::Internal::Type::BaseModel
30+
# @!attribute domain
31+
# The brand's domain.
32+
#
33+
# @return [String]
34+
required :domain, String
35+
36+
# @!attribute logo
37+
# Logo link URL that serves the brand's logo, generated per request for the
38+
# calling organization.
39+
#
40+
# @return [String]
41+
required :logo, String
42+
43+
# @!attribute name
44+
# The brand's name. Empty string when unknown.
45+
#
46+
# @return [String]
47+
required :name, String
48+
49+
# @!method initialize(domain:, logo:, name:)
50+
# Some parameter documentations has been truncated, see
51+
# {ContextDev::Models::BrandSearchResponse::Result} for more details.
52+
#
53+
# @param domain [String] The brand's domain.
54+
#
55+
# @param logo [String] Logo link URL that serves the brand's logo, generated per request for the callin
56+
#
57+
# @param name [String] The brand's name. Empty string when unknown.
58+
end
59+
60+
# @see ContextDev::Models::BrandSearchResponse#key_metadata
61+
class KeyMetadata < ContextDev::Internal::Type::BaseModel
62+
# @!attribute credits_consumed
63+
# The number of credits consumed by this request.
64+
#
65+
# @return [Integer]
66+
required :credits_consumed, Integer
67+
68+
# @!attribute credits_remaining
69+
# The number of credits remaining for your organization after this request.
70+
#
71+
# @return [Integer]
72+
required :credits_remaining, Integer
73+
74+
# @!method initialize(credits_consumed:, credits_remaining:)
75+
# Metadata about the API key used for the request. Included in every response
76+
# whenever a valid API key is provided, even when the response status is not 200.
77+
#
78+
# @param credits_consumed [Integer] The number of credits consumed by this request.
79+
#
80+
# @param credits_remaining [Integer] The number of credits remaining for your organization after this request.
81+
end
82+
end
83+
end
84+
end

‎lib/context_dev/resources/brand.rb‎

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,40 @@ def retrieve_simplified(params)
6565
)
6666
end
6767

68+
# Some parameter documentations has been truncated, see
69+
# {ContextDev::Models::BrandSearchParams} for more details.
70+
#
71+
# Search brands by name or domain and get back up to 10 lightweight matches
72+
# (domain, name, logo), most popular first: by Tranco rank, then market cap for
73+
# brands outside the Tranco list, with text relevance breaking ties. Matching is
74+
# prefix-based with no typo tolerance, so it is suited to autocomplete. Only
75+
# brands already in the Context.dev index are returned — use /brand/retrieve to
76+
# fetch (and index) a specific domain. Free on Pro and Scale plans; costs 1 credit
77+
# per request on the Free and Starter plans.
78+
#
79+
# @overload search(query:, tags: nil, request_options: {})
80+
#
81+
# @param query [String] Search term, matched against brand names and domains by prefix (e.g. 'nike', 'ni
82+
#
83+
# @param tags [Array<String>] Optional comma-separated caller-defined tags for tracking this request. Tags are
84+
#
85+
# @param request_options [ContextDev::RequestOptions, Hash{Symbol=>Object}, nil]
86+
#
87+
# @return [ContextDev::Models::BrandSearchResponse]
88+
#
89+
# @see ContextDev::Models::BrandSearchParams
90+
def search(params)
91+
parsed, options = ContextDev::BrandSearchParams.dump_request(params)
92+
query = ContextDev::Internal::Util.encode_query_params(parsed)
93+
@client.request(
94+
method: :get,
95+
path: "brand/search",
96+
query: query,
97+
model: ContextDev::Models::BrandSearchResponse,
98+
options: options
99+
)
100+
end
101+
68102
# @api private
69103
#
70104
# @param client [ContextDev::Client]

0 commit comments

Comments
 (0)