context.dev 1.14.0 → 1.16.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (37) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +16 -0
  3. data/README.md +1 -1
  4. data/lib/context_dev/models/brand_retrieve_by_email_params.rb +12 -1
  5. data/lib/context_dev/models/brand_retrieve_by_isin_params.rb +12 -1
  6. data/lib/context_dev/models/brand_retrieve_by_name_params.rb +12 -1
  7. data/lib/context_dev/models/brand_retrieve_by_ticker_params.rb +12 -1
  8. data/lib/context_dev/models/brand_retrieve_params.rb +12 -1
  9. data/lib/context_dev/models/brand_retrieve_simplified_params.rb +12 -1
  10. data/lib/context_dev/models/web_screenshot_params.rb +40 -1
  11. data/lib/context_dev/models/web_screenshot_response.rb +17 -1
  12. data/lib/context_dev/models/web_web_scrape_images_params.rb +2 -2
  13. data/lib/context_dev/resources/brand.rb +24 -12
  14. data/lib/context_dev/resources/web.rb +10 -2
  15. data/lib/context_dev/version.rb +1 -1
  16. data/rbi/context_dev/models/brand_retrieve_by_email_params.rbi +17 -0
  17. data/rbi/context_dev/models/brand_retrieve_by_isin_params.rbi +17 -0
  18. data/rbi/context_dev/models/brand_retrieve_by_name_params.rbi +17 -0
  19. data/rbi/context_dev/models/brand_retrieve_by_ticker_params.rbi +17 -0
  20. data/rbi/context_dev/models/brand_retrieve_params.rbi +17 -0
  21. data/rbi/context_dev/models/brand_retrieve_simplified_params.rbi +17 -0
  22. data/rbi/context_dev/models/web_screenshot_params.rbi +68 -0
  23. data/rbi/context_dev/models/web_screenshot_response.rbi +25 -3
  24. data/rbi/context_dev/models/web_web_scrape_images_params.rbi +2 -2
  25. data/rbi/context_dev/resources/brand.rbi +36 -0
  26. data/rbi/context_dev/resources/web.rbi +8 -0
  27. data/sig/context_dev/models/brand_retrieve_by_email_params.rbs +7 -0
  28. data/sig/context_dev/models/brand_retrieve_by_isin_params.rbs +7 -0
  29. data/sig/context_dev/models/brand_retrieve_by_name_params.rbs +7 -0
  30. data/sig/context_dev/models/brand_retrieve_by_ticker_params.rbs +7 -0
  31. data/sig/context_dev/models/brand_retrieve_params.rbs +7 -0
  32. data/sig/context_dev/models/brand_retrieve_simplified_params.rbs +7 -1
  33. data/sig/context_dev/models/web_screenshot_params.rbs +33 -1
  34. data/sig/context_dev/models/web_screenshot_response.rbs +17 -3
  35. data/sig/context_dev/resources/brand.rbs +6 -0
  36. data/sig/context_dev/resources/web.rbs +2 -0
  37. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 836fab0c1e0cb715edaeaf7f7206d4a0be107d9a8971ff6afba657ba13e8bf49
4
- data.tar.gz: 9ece48b1e97a2d806adb38a9c16df4d94cba3448f892435b8096904fd27f513d
3
+ metadata.gz: 6ba57da748751f653f87b57407326a40a8af9b31dc9c10364c61e536a7eb57a6
4
+ data.tar.gz: b10761a87783d8544bae6dd0bad6c3f3275af2fd2c39e734e61709d89de8cd9e
5
5
  SHA512:
6
- metadata.gz: 0d5018e385aa2664e995f451b8e020894d98af98ec9f06a8962d11da56e43c448cbe5c184a24d5a9310d5cd0b8f6c43009829809a75de0770749388fbd06a012
7
- data.tar.gz: 01ab4b2ef6367f3d5c5a5e71d98a42f6d4db0fc17eb850c061e16355056c53dcca45b58ee836fadacd9ac2033e95ef0875aaaedea715d58c5d66cdae35956eba
6
+ metadata.gz: 53f3f7978e24bcac14e388d76f2ba02b1410354b536264a14074306ce6464725d5741ebf6d59b1d280eeb8b2babc1980c35397c45175213645d38fdbcd89a5c5
7
+ data.tar.gz: 4d9aa2a1af255cd2352c613bfd3fbbef1532d9ab6eb396d8e9e33d1a41f7b4eabd3601c6406a68d3688a338b1f588f3cf76bc7d17b8966ddff0b358dd1cc6d72
data/CHANGELOG.md CHANGED
@@ -1,5 +1,21 @@
1
1
  # Changelog
2
2
 
3
+ ## 1.16.0 (2026-05-07)
4
+
5
+ Full Changelog: [v1.15.0...v1.16.0](https://github.com/context-dot-dev/context-ruby-sdk/compare/v1.15.0...v1.16.0)
6
+
7
+ ### Features
8
+
9
+ * **api:** api update ([f0b1f3a](https://github.com/context-dot-dev/context-ruby-sdk/commit/f0b1f3afd885c44cb464393b57d944fa27a6c0b5))
10
+
11
+ ## 1.15.0 (2026-05-06)
12
+
13
+ Full Changelog: [v1.14.0...v1.15.0](https://github.com/context-dot-dev/context-ruby-sdk/compare/v1.14.0...v1.15.0)
14
+
15
+ ### Features
16
+
17
+ * **api:** api update ([42c8282](https://github.com/context-dot-dev/context-ruby-sdk/commit/42c8282f18c421ca317b51c640ea42cc04c61230))
18
+
3
19
  ## 1.14.0 (2026-05-06)
4
20
 
5
21
  Full Changelog: [v1.13.0...v1.14.0](https://github.com/context-dot-dev/context-ruby-sdk/compare/v1.13.0...v1.14.0)
data/README.md CHANGED
@@ -26,7 +26,7 @@ To use this gem, install via Bundler by adding the following to your application
26
26
  <!-- x-release-please-start-version -->
27
27
 
28
28
  ```ruby
29
- gem "context.dev", "~> 1.14.0"
29
+ gem "context.dev", "~> 1.16.0"
30
30
  ```
31
31
 
32
32
  <!-- x-release-please-end -->
@@ -21,6 +21,15 @@ module ContextDev
21
21
  # @return [Symbol, ContextDev::Models::BrandRetrieveByEmailParams::ForceLanguage, nil]
22
22
  optional :force_language, enum: -> { ContextDev::BrandRetrieveByEmailParams::ForceLanguage }
23
23
 
24
+ # @!attribute max_age_ms
25
+ # Maximum age in milliseconds for cached brand data before the API performs a hard
26
+ # refresh. Defaults to 3 months (7776000000 ms). Values below 1 day (86400000 ms)
27
+ # are clamped to 1 day; values above 1 year (31536000000 ms) are clamped to 1
28
+ # year.
29
+ #
30
+ # @return [Integer, nil]
31
+ optional :max_age_ms, Integer
32
+
24
33
  # @!attribute max_speed
25
34
  # Optional parameter to optimize the API call for maximum speed. When set to true,
26
35
  # the API will skip time-consuming operations for faster response at the cost of
@@ -37,7 +46,7 @@ module ContextDev
37
46
  # @return [Integer, nil]
38
47
  optional :timeout_ms, Integer
39
48
 
40
- # @!method initialize(email:, force_language: nil, max_speed: nil, timeout_ms: nil, request_options: {})
49
+ # @!method initialize(email:, force_language: nil, max_age_ms: nil, max_speed: nil, timeout_ms: nil, request_options: {})
41
50
  # Some parameter documentations has been truncated, see
42
51
  # {ContextDev::Models::BrandRetrieveByEmailParams} for more details.
43
52
  #
@@ -45,6 +54,8 @@ module ContextDev
45
54
  #
46
55
  # @param force_language [Symbol, ContextDev::Models::BrandRetrieveByEmailParams::ForceLanguage] Optional parameter to force the language of the retrieved brand data.
47
56
  #
57
+ # @param max_age_ms [Integer] Maximum age in milliseconds for cached brand data before the API performs a hard
58
+ #
48
59
  # @param max_speed [Boolean] Optional parameter to optimize the API call for maximum speed. When set to true,
49
60
  #
50
61
  # @param timeout_ms [Integer] Optional timeout in milliseconds for the request. If the request takes longer th
@@ -21,6 +21,15 @@ module ContextDev
21
21
  # @return [Symbol, ContextDev::Models::BrandRetrieveByIsinParams::ForceLanguage, nil]
22
22
  optional :force_language, enum: -> { ContextDev::BrandRetrieveByIsinParams::ForceLanguage }
23
23
 
24
+ # @!attribute max_age_ms
25
+ # Maximum age in milliseconds for cached brand data before the API performs a hard
26
+ # refresh. Defaults to 3 months (7776000000 ms). Values below 1 day (86400000 ms)
27
+ # are clamped to 1 day; values above 1 year (31536000000 ms) are clamped to 1
28
+ # year.
29
+ #
30
+ # @return [Integer, nil]
31
+ optional :max_age_ms, Integer
32
+
24
33
  # @!attribute max_speed
25
34
  # Optional parameter to optimize the API call for maximum speed. When set to true,
26
35
  # the API will skip time-consuming operations for faster response at the cost of
@@ -37,7 +46,7 @@ module ContextDev
37
46
  # @return [Integer, nil]
38
47
  optional :timeout_ms, Integer
39
48
 
40
- # @!method initialize(isin:, force_language: nil, max_speed: nil, timeout_ms: nil, request_options: {})
49
+ # @!method initialize(isin:, force_language: nil, max_age_ms: nil, max_speed: nil, timeout_ms: nil, request_options: {})
41
50
  # Some parameter documentations has been truncated, see
42
51
  # {ContextDev::Models::BrandRetrieveByIsinParams} for more details.
43
52
  #
@@ -45,6 +54,8 @@ module ContextDev
45
54
  #
46
55
  # @param force_language [Symbol, ContextDev::Models::BrandRetrieveByIsinParams::ForceLanguage] Optional parameter to force the language of the retrieved brand data.
47
56
  #
57
+ # @param max_age_ms [Integer] Maximum age in milliseconds for cached brand data before the API performs a hard
58
+ #
48
59
  # @param max_speed [Boolean] Optional parameter to optimize the API call for maximum speed. When set to true,
49
60
  #
50
61
  # @param timeout_ms [Integer] Optional timeout in milliseconds for the request. If the request takes longer th
@@ -27,6 +27,15 @@ module ContextDev
27
27
  # @return [Symbol, ContextDev::Models::BrandRetrieveByNameParams::ForceLanguage, nil]
28
28
  optional :force_language, enum: -> { ContextDev::BrandRetrieveByNameParams::ForceLanguage }
29
29
 
30
+ # @!attribute max_age_ms
31
+ # Maximum age in milliseconds for cached brand data before the API performs a hard
32
+ # refresh. Defaults to 3 months (7776000000 ms). Values below 1 day (86400000 ms)
33
+ # are clamped to 1 day; values above 1 year (31536000000 ms) are clamped to 1
34
+ # year.
35
+ #
36
+ # @return [Integer, nil]
37
+ optional :max_age_ms, Integer
38
+
30
39
  # @!attribute max_speed
31
40
  # Optional parameter to optimize the API call for maximum speed. When set to true,
32
41
  # the API will skip time-consuming operations for faster response at the cost of
@@ -43,7 +52,7 @@ module ContextDev
43
52
  # @return [Integer, nil]
44
53
  optional :timeout_ms, Integer
45
54
 
46
- # @!method initialize(name:, country_gl: nil, force_language: nil, max_speed: nil, timeout_ms: nil, request_options: {})
55
+ # @!method initialize(name:, country_gl: nil, force_language: nil, max_age_ms: nil, max_speed: nil, timeout_ms: nil, request_options: {})
47
56
  # Some parameter documentations has been truncated, see
48
57
  # {ContextDev::Models::BrandRetrieveByNameParams} for more details.
49
58
  #
@@ -53,6 +62,8 @@ module ContextDev
53
62
  #
54
63
  # @param force_language [Symbol, ContextDev::Models::BrandRetrieveByNameParams::ForceLanguage] Optional parameter to force the language of the retrieved brand data.
55
64
  #
65
+ # @param max_age_ms [Integer] Maximum age in milliseconds for cached brand data before the API performs a hard
66
+ #
56
67
  # @param max_speed [Boolean] Optional parameter to optimize the API call for maximum speed. When set to true,
57
68
  #
58
69
  # @param timeout_ms [Integer] Optional timeout in milliseconds for the request. If the request takes longer th
@@ -20,6 +20,15 @@ module ContextDev
20
20
  # @return [Symbol, ContextDev::Models::BrandRetrieveByTickerParams::ForceLanguage, nil]
21
21
  optional :force_language, enum: -> { ContextDev::BrandRetrieveByTickerParams::ForceLanguage }
22
22
 
23
+ # @!attribute max_age_ms
24
+ # Maximum age in milliseconds for cached brand data before the API performs a hard
25
+ # refresh. Defaults to 3 months (7776000000 ms). Values below 1 day (86400000 ms)
26
+ # are clamped to 1 day; values above 1 year (31536000000 ms) are clamped to 1
27
+ # year.
28
+ #
29
+ # @return [Integer, nil]
30
+ optional :max_age_ms, Integer
31
+
23
32
  # @!attribute max_speed
24
33
  # Optional parameter to optimize the API call for maximum speed. When set to true,
25
34
  # the API will skip time-consuming operations for faster response at the cost of
@@ -42,7 +51,7 @@ module ContextDev
42
51
  # @return [Integer, nil]
43
52
  optional :timeout_ms, Integer
44
53
 
45
- # @!method initialize(ticker:, force_language: nil, max_speed: nil, ticker_exchange: nil, timeout_ms: nil, request_options: {})
54
+ # @!method initialize(ticker:, force_language: nil, max_age_ms: nil, max_speed: nil, ticker_exchange: nil, timeout_ms: nil, request_options: {})
46
55
  # Some parameter documentations has been truncated, see
47
56
  # {ContextDev::Models::BrandRetrieveByTickerParams} for more details.
48
57
  #
@@ -50,6 +59,8 @@ module ContextDev
50
59
  #
51
60
  # @param force_language [Symbol, ContextDev::Models::BrandRetrieveByTickerParams::ForceLanguage] Optional parameter to force the language of the retrieved brand data.
52
61
  #
62
+ # @param max_age_ms [Integer] Maximum age in milliseconds for cached brand data before the API performs a hard
63
+ #
53
64
  # @param max_speed [Boolean] Optional parameter to optimize the API call for maximum speed. When set to true,
54
65
  #
55
66
  # @param ticker_exchange [Symbol, ContextDev::Models::BrandRetrieveByTickerParams::TickerExchange] Optional stock exchange for the ticker. Defaults to NASDAQ if not specified.
@@ -20,6 +20,15 @@ module ContextDev
20
20
  # @return [Symbol, ContextDev::Models::BrandRetrieveParams::ForceLanguage, nil]
21
21
  optional :force_language, enum: -> { ContextDev::BrandRetrieveParams::ForceLanguage }
22
22
 
23
+ # @!attribute max_age_ms
24
+ # Maximum age in milliseconds for cached brand data before the API performs a hard
25
+ # refresh. Defaults to 3 months (7776000000 ms). Values below 1 day (86400000 ms)
26
+ # are clamped to 1 day; values above 1 year (31536000000 ms) are clamped to 1
27
+ # year.
28
+ #
29
+ # @return [Integer, nil]
30
+ optional :max_age_ms, Integer
31
+
23
32
  # @!attribute max_speed
24
33
  # Optional parameter to optimize the API call for maximum speed. When set to true,
25
34
  # the API will skip time-consuming operations for faster response at the cost of
@@ -36,7 +45,7 @@ module ContextDev
36
45
  # @return [Integer, nil]
37
46
  optional :timeout_ms, Integer
38
47
 
39
- # @!method initialize(domain:, force_language: nil, max_speed: nil, timeout_ms: nil, request_options: {})
48
+ # @!method initialize(domain:, force_language: nil, max_age_ms: nil, max_speed: nil, timeout_ms: nil, request_options: {})
40
49
  # Some parameter documentations has been truncated, see
41
50
  # {ContextDev::Models::BrandRetrieveParams} for more details.
42
51
  #
@@ -44,6 +53,8 @@ module ContextDev
44
53
  #
45
54
  # @param force_language [Symbol, ContextDev::Models::BrandRetrieveParams::ForceLanguage] Optional parameter to force the language of the retrieved brand data.
46
55
  #
56
+ # @param max_age_ms [Integer] Maximum age in milliseconds for cached brand data before the API performs a hard
57
+ #
47
58
  # @param max_speed [Boolean] Optional parameter to optimize the API call for maximum speed. When set to true,
48
59
  #
49
60
  # @param timeout_ms [Integer] Optional timeout in milliseconds for the request. If the request takes longer th
@@ -13,6 +13,15 @@ module ContextDev
13
13
  # @return [String]
14
14
  required :domain, String
15
15
 
16
+ # @!attribute max_age_ms
17
+ # Maximum age in milliseconds for cached brand data before the API performs a hard
18
+ # refresh. Defaults to 3 months (7776000000 ms). Values below 1 day (86400000 ms)
19
+ # are clamped to 1 day; values above 1 year (31536000000 ms) are clamped to 1
20
+ # year.
21
+ #
22
+ # @return [Integer, nil]
23
+ optional :max_age_ms, Integer
24
+
16
25
  # @!attribute timeout_ms
17
26
  # Optional timeout in milliseconds for the request. If the request takes longer
18
27
  # than this value, it will be aborted with a 408 status code. Maximum allowed
@@ -21,12 +30,14 @@ module ContextDev
21
30
  # @return [Integer, nil]
22
31
  optional :timeout_ms, Integer
23
32
 
24
- # @!method initialize(domain:, timeout_ms: nil, request_options: {})
33
+ # @!method initialize(domain:, max_age_ms: nil, timeout_ms: nil, request_options: {})
25
34
  # Some parameter documentations has been truncated, see
26
35
  # {ContextDev::Models::BrandRetrieveSimplifiedParams} for more details.
27
36
  #
28
37
  # @param domain [String] Domain name to retrieve simplified brand data for
29
38
  #
39
+ # @param max_age_ms [Integer] Maximum age in milliseconds for cached brand data before the API performs a hard
40
+ #
30
41
  # @param timeout_ms [Integer] Optional timeout in milliseconds for the request. If the request takes longer th
31
42
  #
32
43
  # @param request_options [ContextDev::RequestOptions, Hash{Symbol=>Object}]
@@ -31,6 +31,14 @@ module ContextDev
31
31
  # @return [Symbol, ContextDev::Models::WebScreenshotParams::FullScreenshot, nil]
32
32
  optional :full_screenshot, enum: -> { ContextDev::WebScreenshotParams::FullScreenshot }
33
33
 
34
+ # @!attribute max_age_ms
35
+ # Return a cached screenshot if a prior screenshot for the same parameters exists
36
+ # and is younger than this many milliseconds. Defaults to 1 day (86400000 ms) when
37
+ # omitted. Max is 30 days (2592000000 ms). Set to 0 to always capture fresh.
38
+ #
39
+ # @return [Integer, nil]
40
+ optional :max_age_ms, Integer
41
+
34
42
  # @!attribute page
35
43
  # Optional parameter to specify which page type to screenshot. If provided, the
36
44
  # system will scrape the domain's links and use heuristics to find the most
@@ -49,7 +57,13 @@ module ContextDev
49
57
  # @return [Symbol, ContextDev::Models::WebScreenshotParams::Prioritize, nil]
50
58
  optional :prioritize, enum: -> { ContextDev::WebScreenshotParams::Prioritize }
51
59
 
52
- # @!method initialize(direct_url: nil, domain: nil, full_screenshot: nil, page: nil, prioritize: nil, request_options: {})
60
+ # @!attribute viewport
61
+ # Optional browser viewport dimensions for the screenshot. Defaults to 1920x1080.
62
+ #
63
+ # @return [ContextDev::Models::WebScreenshotParams::Viewport, nil]
64
+ optional :viewport, -> { ContextDev::WebScreenshotParams::Viewport }
65
+
66
+ # @!method initialize(direct_url: nil, domain: nil, full_screenshot: nil, max_age_ms: nil, page: nil, prioritize: nil, viewport: nil, request_options: {})
53
67
  # Some parameter documentations has been truncated, see
54
68
  # {ContextDev::Models::WebScreenshotParams} for more details.
55
69
  #
@@ -59,10 +73,14 @@ module ContextDev
59
73
  #
60
74
  # @param full_screenshot [Symbol, ContextDev::Models::WebScreenshotParams::FullScreenshot] Optional parameter to determine screenshot type. If 'true', takes a full page sc
61
75
  #
76
+ # @param max_age_ms [Integer] Return a cached screenshot if a prior screenshot for the same parameters exists
77
+ #
62
78
  # @param page [Symbol, ContextDev::Models::WebScreenshotParams::Page] Optional parameter to specify which page type to screenshot. If provided, the sy
63
79
  #
64
80
  # @param prioritize [Symbol, ContextDev::Models::WebScreenshotParams::Prioritize] Optional parameter to prioritize screenshot capture. If 'speed', optimizes for f
65
81
  #
82
+ # @param viewport [ContextDev::Models::WebScreenshotParams::Viewport] Optional browser viewport dimensions for the screenshot. Defaults to 1920x1080.
83
+ #
66
84
  # @param request_options [ContextDev::RequestOptions, Hash{Symbol=>Object}]
67
85
 
68
86
  # Optional parameter to determine screenshot type. If 'true', takes a full page
@@ -111,6 +129,27 @@ module ContextDev
111
129
  # @!method self.values
112
130
  # @return [Array<Symbol>]
113
131
  end
132
+
133
+ class Viewport < ContextDev::Internal::Type::BaseModel
134
+ # @!attribute height
135
+ # Viewport height in pixels.
136
+ #
137
+ # @return [Integer, nil]
138
+ optional :height, Integer
139
+
140
+ # @!attribute width
141
+ # Viewport width in pixels.
142
+ #
143
+ # @return [Integer, nil]
144
+ optional :width, Integer
145
+
146
+ # @!method initialize(height: nil, width: nil)
147
+ # Optional browser viewport dimensions for the screenshot. Defaults to 1920x1080.
148
+ #
149
+ # @param height [Integer] Viewport height in pixels.
150
+ #
151
+ # @param width [Integer] Viewport width in pixels.
152
+ end
114
153
  end
115
154
  end
116
155
  end
@@ -16,6 +16,12 @@ module ContextDev
16
16
  # @return [String, nil]
17
17
  optional :domain, String
18
18
 
19
+ # @!attribute height
20
+ # Height in pixels of the returned screenshot image
21
+ #
22
+ # @return [Integer, nil]
23
+ optional :height, Integer
24
+
19
25
  # @!attribute screenshot
20
26
  # Public URL of the uploaded screenshot image
21
27
  #
@@ -36,16 +42,26 @@ module ContextDev
36
42
  # @return [String, nil]
37
43
  optional :status, String
38
44
 
39
- # @!method initialize(code: nil, domain: nil, screenshot: nil, screenshot_type: nil, status: nil)
45
+ # @!attribute width
46
+ # Width in pixels of the returned screenshot image
47
+ #
48
+ # @return [Integer, nil]
49
+ optional :width, Integer
50
+
51
+ # @!method initialize(code: nil, domain: nil, height: nil, screenshot: nil, screenshot_type: nil, status: nil, width: nil)
40
52
  # @param code [Integer] HTTP status code
41
53
  #
42
54
  # @param domain [String] The normalized domain that was processed
43
55
  #
56
+ # @param height [Integer] Height in pixels of the returned screenshot image
57
+ #
44
58
  # @param screenshot [String] Public URL of the uploaded screenshot image
45
59
  #
46
60
  # @param screenshot_type [Symbol, ContextDev::Models::WebScreenshotResponse::ScreenshotType] Type of screenshot that was captured
47
61
  #
48
62
  # @param status [String] Status of the response, e.g., 'ok'
63
+ #
64
+ # @param width [Integer] Width in pixels of the returned screenshot image
49
65
 
50
66
  # Type of screenshot that was captured
51
67
  #
@@ -54,7 +54,7 @@ module ContextDev
54
54
  optional :hosted_url, ContextDev::Internal::Type::Boolean, api_name: :hostedUrl
55
55
 
56
56
  # @!attribute max_time_per_ms
57
- # Per-image enrichment timeout in milliseconds. Default: 6000. Maximum: 60000.
57
+ # Per-image enrichment timeout in milliseconds. Default: 30000. Maximum: 60000.
58
58
  #
59
59
  # @return [Integer, nil]
60
60
  optional :max_time_per_ms, Integer, api_name: :maxTimePerMs
@@ -76,7 +76,7 @@ module ContextDev
76
76
  #
77
77
  # @param hosted_url [Boolean] Host materializable images on the Brand.dev CDN and return their URL and MIME ty
78
78
  #
79
- # @param max_time_per_ms [Integer] Per-image enrichment timeout in milliseconds. Default: 6000. Maximum: 60000.
79
+ # @param max_time_per_ms [Integer] Per-image enrichment timeout in milliseconds. Default: 30000. Maximum: 60000.
80
80
  #
81
81
  # @param resolution [Boolean] Measure image width and height when possible.
82
82
  end
@@ -9,12 +9,14 @@ module ContextDev
9
9
  # Retrieve logos, backdrops, colors, industry, description, and more from any
10
10
  # domain
11
11
  #
12
- # @overload retrieve(domain:, force_language: nil, max_speed: nil, timeout_ms: nil, request_options: {})
12
+ # @overload retrieve(domain:, force_language: nil, max_age_ms: nil, max_speed: nil, timeout_ms: nil, request_options: {})
13
13
  #
14
14
  # @param domain [String] Domain name to retrieve brand data for (e.g., 'example.com', 'google.com'). Cann
15
15
  #
16
16
  # @param force_language [Symbol, ContextDev::Models::BrandRetrieveParams::ForceLanguage] Optional parameter to force the language of the retrieved brand data.
17
17
  #
18
+ # @param max_age_ms [Integer] Maximum age in milliseconds for cached brand data before the API performs a hard
19
+ #
18
20
  # @param max_speed [Boolean] Optional parameter to optimize the API call for maximum speed. When set to true,
19
21
  #
20
22
  # @param timeout_ms [Integer] Optional timeout in milliseconds for the request. If the request takes longer th
@@ -30,7 +32,7 @@ module ContextDev
30
32
  @client.request(
31
33
  method: :get,
32
34
  path: "brand/retrieve",
33
- query: query.transform_keys(max_speed: "maxSpeed", timeout_ms: "timeoutMS"),
35
+ query: query.transform_keys(max_age_ms: "maxAgeMs", max_speed: "maxSpeed", timeout_ms: "timeoutMS"),
34
36
  model: ContextDev::Models::BrandRetrieveResponse,
35
37
  options: options
36
38
  )
@@ -86,12 +88,14 @@ module ContextDev
86
88
  # free email addresses. Disposable and free email addresses (like gmail.com,
87
89
  # yahoo.com) will throw a 422 error.
88
90
  #
89
- # @overload retrieve_by_email(email:, force_language: nil, max_speed: nil, timeout_ms: nil, request_options: {})
91
+ # @overload retrieve_by_email(email:, force_language: nil, max_age_ms: nil, max_speed: nil, timeout_ms: nil, request_options: {})
90
92
  #
91
93
  # @param email [String] Email address to retrieve brand data for (e.g., 'contact@example.com'). The doma
92
94
  #
93
95
  # @param force_language [Symbol, ContextDev::Models::BrandRetrieveByEmailParams::ForceLanguage] Optional parameter to force the language of the retrieved brand data.
94
96
  #
97
+ # @param max_age_ms [Integer] Maximum age in milliseconds for cached brand data before the API performs a hard
98
+ #
95
99
  # @param max_speed [Boolean] Optional parameter to optimize the API call for maximum speed. When set to true,
96
100
  #
97
101
  # @param timeout_ms [Integer] Optional timeout in milliseconds for the request. If the request takes longer th
@@ -107,7 +111,7 @@ module ContextDev
107
111
  @client.request(
108
112
  method: :get,
109
113
  path: "brand/retrieve-by-email",
110
- query: query.transform_keys(max_speed: "maxSpeed", timeout_ms: "timeoutMS"),
114
+ query: query.transform_keys(max_age_ms: "maxAgeMs", max_speed: "maxSpeed", timeout_ms: "timeoutMS"),
111
115
  model: ContextDev::Models::BrandRetrieveByEmailResponse,
112
116
  options: options
113
117
  )
@@ -119,12 +123,14 @@ module ContextDev
119
123
  # Retrieve brand information using an ISIN (International Securities
120
124
  # Identification Number).
121
125
  #
122
- # @overload retrieve_by_isin(isin:, force_language: nil, max_speed: nil, timeout_ms: nil, request_options: {})
126
+ # @overload retrieve_by_isin(isin:, force_language: nil, max_age_ms: nil, max_speed: nil, timeout_ms: nil, request_options: {})
123
127
  #
124
128
  # @param isin [String] ISIN (International Securities Identification Number) to retrieve brand data for
125
129
  #
126
130
  # @param force_language [Symbol, ContextDev::Models::BrandRetrieveByIsinParams::ForceLanguage] Optional parameter to force the language of the retrieved brand data.
127
131
  #
132
+ # @param max_age_ms [Integer] Maximum age in milliseconds for cached brand data before the API performs a hard
133
+ #
128
134
  # @param max_speed [Boolean] Optional parameter to optimize the API call for maximum speed. When set to true,
129
135
  #
130
136
  # @param timeout_ms [Integer] Optional timeout in milliseconds for the request. If the request takes longer th
@@ -140,7 +146,7 @@ module ContextDev
140
146
  @client.request(
141
147
  method: :get,
142
148
  path: "brand/retrieve-by-isin",
143
- query: query.transform_keys(max_speed: "maxSpeed", timeout_ms: "timeoutMS"),
149
+ query: query.transform_keys(max_age_ms: "maxAgeMs", max_speed: "maxSpeed", timeout_ms: "timeoutMS"),
144
150
  model: ContextDev::Models::BrandRetrieveByIsinResponse,
145
151
  options: options
146
152
  )
@@ -151,7 +157,7 @@ module ContextDev
151
157
  #
152
158
  # Retrieve brand information using a company name.
153
159
  #
154
- # @overload retrieve_by_name(name:, country_gl: nil, force_language: nil, max_speed: nil, timeout_ms: nil, request_options: {})
160
+ # @overload retrieve_by_name(name:, country_gl: nil, force_language: nil, max_age_ms: nil, max_speed: nil, timeout_ms: nil, request_options: {})
155
161
  #
156
162
  # @param name [String] Company name to retrieve brand data for (e.g., 'Apple Inc', 'Microsoft Corporati
157
163
  #
@@ -159,6 +165,8 @@ module ContextDev
159
165
  #
160
166
  # @param force_language [Symbol, ContextDev::Models::BrandRetrieveByNameParams::ForceLanguage] Optional parameter to force the language of the retrieved brand data.
161
167
  #
168
+ # @param max_age_ms [Integer] Maximum age in milliseconds for cached brand data before the API performs a hard
169
+ #
162
170
  # @param max_speed [Boolean] Optional parameter to optimize the API call for maximum speed. When set to true,
163
171
  #
164
172
  # @param timeout_ms [Integer] Optional timeout in milliseconds for the request. If the request takes longer th
@@ -174,7 +182,7 @@ module ContextDev
174
182
  @client.request(
175
183
  method: :get,
176
184
  path: "brand/retrieve-by-name",
177
- query: query.transform_keys(max_speed: "maxSpeed", timeout_ms: "timeoutMS"),
185
+ query: query.transform_keys(max_age_ms: "maxAgeMs", max_speed: "maxSpeed", timeout_ms: "timeoutMS"),
178
186
  model: ContextDev::Models::BrandRetrieveByNameResponse,
179
187
  options: options
180
188
  )
@@ -185,12 +193,14 @@ module ContextDev
185
193
  #
186
194
  # Retrieve brand information using a stock ticker symbol.
187
195
  #
188
- # @overload retrieve_by_ticker(ticker:, force_language: nil, max_speed: nil, ticker_exchange: nil, timeout_ms: nil, request_options: {})
196
+ # @overload retrieve_by_ticker(ticker:, force_language: nil, max_age_ms: nil, max_speed: nil, ticker_exchange: nil, timeout_ms: nil, request_options: {})
189
197
  #
190
198
  # @param ticker [String] Stock ticker symbol to retrieve brand data for (e.g., 'AAPL', 'GOOGL', 'BRK.A').
191
199
  #
192
200
  # @param force_language [Symbol, ContextDev::Models::BrandRetrieveByTickerParams::ForceLanguage] Optional parameter to force the language of the retrieved brand data.
193
201
  #
202
+ # @param max_age_ms [Integer] Maximum age in milliseconds for cached brand data before the API performs a hard
203
+ #
194
204
  # @param max_speed [Boolean] Optional parameter to optimize the API call for maximum speed. When set to true,
195
205
  #
196
206
  # @param ticker_exchange [Symbol, ContextDev::Models::BrandRetrieveByTickerParams::TickerExchange] Optional stock exchange for the ticker. Defaults to NASDAQ if not specified.
@@ -208,7 +218,7 @@ module ContextDev
208
218
  @client.request(
209
219
  method: :get,
210
220
  path: "brand/retrieve-by-ticker",
211
- query: query.transform_keys(max_speed: "maxSpeed", timeout_ms: "timeoutMS"),
221
+ query: query.transform_keys(max_age_ms: "maxAgeMs", max_speed: "maxSpeed", timeout_ms: "timeoutMS"),
212
222
  model: ContextDev::Models::BrandRetrieveByTickerResponse,
213
223
  options: options
214
224
  )
@@ -221,10 +231,12 @@ module ContextDev
221
231
  # information: domain, title, colors, logos, and backdrops. Optimized for faster
222
232
  # responses and reduced data transfer.
223
233
  #
224
- # @overload retrieve_simplified(domain:, timeout_ms: nil, request_options: {})
234
+ # @overload retrieve_simplified(domain:, max_age_ms: nil, timeout_ms: nil, request_options: {})
225
235
  #
226
236
  # @param domain [String] Domain name to retrieve simplified brand data for
227
237
  #
238
+ # @param max_age_ms [Integer] Maximum age in milliseconds for cached brand data before the API performs a hard
239
+ #
228
240
  # @param timeout_ms [Integer] Optional timeout in milliseconds for the request. If the request takes longer th
229
241
  #
230
242
  # @param request_options [ContextDev::RequestOptions, Hash{Symbol=>Object}, nil]
@@ -238,7 +250,7 @@ module ContextDev
238
250
  @client.request(
239
251
  method: :get,
240
252
  path: "brand/retrieve-simplified",
241
- query: query.transform_keys(timeout_ms: "timeoutMS"),
253
+ query: query.transform_keys(max_age_ms: "maxAgeMs", timeout_ms: "timeoutMS"),
242
254
  model: ContextDev::Models::BrandRetrieveSimplifiedResponse,
243
255
  options: options
244
256
  )
@@ -70,7 +70,7 @@ module ContextDev
70
70
  #
71
71
  # Capture a screenshot of a website.
72
72
  #
73
- # @overload screenshot(direct_url: nil, domain: nil, full_screenshot: nil, page: nil, prioritize: nil, request_options: {})
73
+ # @overload screenshot(direct_url: nil, domain: nil, full_screenshot: nil, max_age_ms: nil, page: nil, prioritize: nil, viewport: nil, request_options: {})
74
74
  #
75
75
  # @param direct_url [String] A specific URL to screenshot directly, bypassing domain resolution (e.g., 'https
76
76
  #
@@ -78,10 +78,14 @@ module ContextDev
78
78
  #
79
79
  # @param full_screenshot [Symbol, ContextDev::Models::WebScreenshotParams::FullScreenshot] Optional parameter to determine screenshot type. If 'true', takes a full page sc
80
80
  #
81
+ # @param max_age_ms [Integer] Return a cached screenshot if a prior screenshot for the same parameters exists
82
+ #
81
83
  # @param page [Symbol, ContextDev::Models::WebScreenshotParams::Page] Optional parameter to specify which page type to screenshot. If provided, the sy
82
84
  #
83
85
  # @param prioritize [Symbol, ContextDev::Models::WebScreenshotParams::Prioritize] Optional parameter to prioritize screenshot capture. If 'speed', optimizes for f
84
86
  #
87
+ # @param viewport [ContextDev::Models::WebScreenshotParams::Viewport] Optional browser viewport dimensions for the screenshot. Defaults to 1920x1080.
88
+ #
85
89
  # @param request_options [ContextDev::RequestOptions, Hash{Symbol=>Object}, nil]
86
90
  #
87
91
  # @return [ContextDev::Models::WebScreenshotResponse]
@@ -93,7 +97,11 @@ module ContextDev
93
97
  @client.request(
94
98
  method: :get,
95
99
  path: "web/screenshot",
96
- query: query.transform_keys(direct_url: "directUrl", full_screenshot: "fullScreenshot"),
100
+ query: query.transform_keys(
101
+ direct_url: "directUrl",
102
+ full_screenshot: "fullScreenshot",
103
+ max_age_ms: "maxAgeMs"
104
+ ),
97
105
  model: ContextDev::Models::WebScreenshotResponse,
98
106
  options: options
99
107
  )
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module ContextDev
4
- VERSION = "1.14.0"
4
+ VERSION = "1.16.0"
5
5
  end
@@ -38,6 +38,16 @@ module ContextDev
38
38
  end
39
39
  attr_writer :force_language
40
40
 
41
+ # Maximum age in milliseconds for cached brand data before the API performs a hard
42
+ # refresh. Defaults to 3 months (7776000000 ms). Values below 1 day (86400000 ms)
43
+ # are clamped to 1 day; values above 1 year (31536000000 ms) are clamped to 1
44
+ # year.
45
+ sig { returns(T.nilable(Integer)) }
46
+ attr_reader :max_age_ms
47
+
48
+ sig { params(max_age_ms: Integer).void }
49
+ attr_writer :max_age_ms
50
+
41
51
  # Optional parameter to optimize the API call for maximum speed. When set to true,
42
52
  # the API will skip time-consuming operations for faster response at the cost of
43
53
  # less comprehensive data.
@@ -61,6 +71,7 @@ module ContextDev
61
71
  email: String,
62
72
  force_language:
63
73
  ContextDev::BrandRetrieveByEmailParams::ForceLanguage::OrSymbol,
74
+ max_age_ms: Integer,
64
75
  max_speed: T::Boolean,
65
76
  timeout_ms: Integer,
66
77
  request_options: ContextDev::RequestOptions::OrHash
@@ -73,6 +84,11 @@ module ContextDev
73
84
  email:,
74
85
  # Optional parameter to force the language of the retrieved brand data.
75
86
  force_language: nil,
87
+ # Maximum age in milliseconds for cached brand data before the API performs a hard
88
+ # refresh. Defaults to 3 months (7776000000 ms). Values below 1 day (86400000 ms)
89
+ # are clamped to 1 day; values above 1 year (31536000000 ms) are clamped to 1
90
+ # year.
91
+ max_age_ms: nil,
76
92
  # Optional parameter to optimize the API call for maximum speed. When set to true,
77
93
  # the API will skip time-consuming operations for faster response at the cost of
78
94
  # less comprehensive data.
@@ -91,6 +107,7 @@ module ContextDev
91
107
  email: String,
92
108
  force_language:
93
109
  ContextDev::BrandRetrieveByEmailParams::ForceLanguage::OrSymbol,
110
+ max_age_ms: Integer,
94
111
  max_speed: T::Boolean,
95
112
  timeout_ms: Integer,
96
113
  request_options: ContextDev::RequestOptions