context.dev 1.13.0 → 1.15.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 (35) 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_web_scrape_images_params.rb +66 -3
  11. data/lib/context_dev/models/web_web_scrape_images_response.rb +91 -18
  12. data/lib/context_dev/resources/brand.rb +24 -12
  13. data/lib/context_dev/resources/web.rb +14 -6
  14. data/lib/context_dev/version.rb +1 -1
  15. data/rbi/context_dev/models/brand_retrieve_by_email_params.rbi +17 -0
  16. data/rbi/context_dev/models/brand_retrieve_by_isin_params.rbi +17 -0
  17. data/rbi/context_dev/models/brand_retrieve_by_name_params.rbi +17 -0
  18. data/rbi/context_dev/models/brand_retrieve_by_ticker_params.rbi +17 -0
  19. data/rbi/context_dev/models/brand_retrieve_params.rbi +17 -0
  20. data/rbi/context_dev/models/brand_retrieve_simplified_params.rbi +17 -0
  21. data/rbi/context_dev/models/web_web_scrape_images_params.rbi +113 -3
  22. data/rbi/context_dev/models/web_web_scrape_images_response.rbi +205 -20
  23. data/rbi/context_dev/resources/brand.rbi +36 -0
  24. data/rbi/context_dev/resources/web.rbi +13 -4
  25. data/sig/context_dev/models/brand_retrieve_by_email_params.rbs +7 -0
  26. data/sig/context_dev/models/brand_retrieve_by_isin_params.rbs +7 -0
  27. data/sig/context_dev/models/brand_retrieve_by_name_params.rbs +7 -0
  28. data/sig/context_dev/models/brand_retrieve_by_ticker_params.rbs +7 -0
  29. data/sig/context_dev/models/brand_retrieve_params.rbs +7 -0
  30. data/sig/context_dev/models/brand_retrieve_simplified_params.rbs +7 -1
  31. data/sig/context_dev/models/web_web_scrape_images_params.rbs +60 -1
  32. data/sig/context_dev/models/web_web_scrape_images_response.rbs +86 -3
  33. data/sig/context_dev/resources/brand.rbs +6 -0
  34. data/sig/context_dev/resources/web.rbs +2 -0
  35. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 77ed16d717d86dba3bde7aa2b1e5262ee7dc1e9dc522daee067dcc82c8551942
4
- data.tar.gz: 5e80361d8778dc08fb2ba658f1c00e84db050a2675e8465242d25d3af5ddbedf
3
+ metadata.gz: 84cc2c8157b82ddbf49757ced0e0f6bbc55fb1cf67ffe3db1725bdbf7db89c46
4
+ data.tar.gz: a1783d6a9fb36f14a61d4c201066e25986249ca36d64f4bfa06e3acfb400ab33
5
5
  SHA512:
6
- metadata.gz: f709379d128f514ac2ade54ee59c6f1a322f57e763a488d7071fd53e2a651216ab1fa00b1949b6209223a06b2916f1a1bc64976e45dad5e6ed65b826af364e59
7
- data.tar.gz: 5dea40e6f474fb5bd0159677850b363dff7c547b02e471f98f85c461d148e158c6305d5df8d2394b4e2019ba1534109f9ffeffbfe8162ec8ac09336011f5965f
6
+ metadata.gz: c76dc1a666b1765f26e679707344ef82ffc004850e0fa8d1fa9565571a0784a2cfb408c110c3463f4dcd75a2df86d7036178694cd17c39e1d0c93f41a6db2cfa
7
+ data.tar.gz: 7babec26bd5a654a9c10e2da55ebf39835c2078c8e06ce0f54fd3d1022adb6f65008b7a007594d8ba8547292dc75597bf184a1d499b175936a6f50df1245db0a
data/CHANGELOG.md CHANGED
@@ -1,5 +1,21 @@
1
1
  # Changelog
2
2
 
3
+ ## 1.15.0 (2026-05-06)
4
+
5
+ Full Changelog: [v1.14.0...v1.15.0](https://github.com/context-dot-dev/context-ruby-sdk/compare/v1.14.0...v1.15.0)
6
+
7
+ ### Features
8
+
9
+ * **api:** api update ([42c8282](https://github.com/context-dot-dev/context-ruby-sdk/commit/42c8282f18c421ca317b51c640ea42cc04c61230))
10
+
11
+ ## 1.14.0 (2026-05-06)
12
+
13
+ Full Changelog: [v1.13.0...v1.14.0](https://github.com/context-dot-dev/context-ruby-sdk/compare/v1.13.0...v1.14.0)
14
+
15
+ ### Features
16
+
17
+ * **api:** api update ([58cb73a](https://github.com/context-dot-dev/context-ruby-sdk/commit/58cb73a109e20f296f6a5f256a94d690b1203f70))
18
+
3
19
  ## 1.13.0 (2026-05-05)
4
20
 
5
21
  Full Changelog: [v1.12.0...v1.13.0](https://github.com/context-dot-dev/context-ruby-sdk/compare/v1.12.0...v1.13.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.13.0"
29
+ gem "context.dev", "~> 1.15.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}]
@@ -8,15 +8,78 @@ module ContextDev
8
8
  include ContextDev::Internal::Type::RequestParameters
9
9
 
10
10
  # @!attribute url
11
- # Full URL to scrape images from (must include http:// or https:// protocol)
11
+ # Page URL to inspect. Must include http:// or https://.
12
12
  #
13
13
  # @return [String]
14
14
  required :url, String
15
15
 
16
- # @!method initialize(url:, request_options: {})
17
- # @param url [String] Full URL to scrape images from (must include http:// or https:// protocol)
16
+ # @!attribute enrichment
17
+ # Optional per-image processing, sent as deep-object query params such as
18
+ # enrichment[resolution]=true.
19
+ #
20
+ # @return [ContextDev::Models::WebWebScrapeImagesParams::Enrichment, nil]
21
+ optional :enrichment, -> { ContextDev::WebWebScrapeImagesParams::Enrichment }
22
+
23
+ # @!attribute max_age_ms
24
+ # Reuse a cached result this many milliseconds old or newer. Default: 86400000 (1
25
+ # day). Set to 0 to bypass cache. Maximum: 2592000000 (30 days).
26
+ #
27
+ # @return [Integer, nil]
28
+ optional :max_age_ms, Integer
29
+
30
+ # @!method initialize(url:, enrichment: nil, max_age_ms: nil, request_options: {})
31
+ # Some parameter documentations has been truncated, see
32
+ # {ContextDev::Models::WebWebScrapeImagesParams} for more details.
33
+ #
34
+ # @param url [String] Page URL to inspect. Must include http:// or https://.
35
+ #
36
+ # @param enrichment [ContextDev::Models::WebWebScrapeImagesParams::Enrichment] Optional per-image processing, sent as deep-object query params such as enrichme
37
+ #
38
+ # @param max_age_ms [Integer] Reuse a cached result this many milliseconds old or newer. Default: 86400000 (1
18
39
  #
19
40
  # @param request_options [ContextDev::RequestOptions, Hash{Symbol=>Object}]
41
+
42
+ class Enrichment < ContextDev::Internal::Type::BaseModel
43
+ # @!attribute classification
44
+ # Classify each image by visual asset type.
45
+ #
46
+ # @return [Boolean, nil]
47
+ optional :classification, ContextDev::Internal::Type::Boolean
48
+
49
+ # @!attribute hosted_url
50
+ # Host materializable images on the Brand.dev CDN and return their URL and MIME
51
+ # type.
52
+ #
53
+ # @return [Boolean, nil]
54
+ optional :hosted_url, ContextDev::Internal::Type::Boolean, api_name: :hostedUrl
55
+
56
+ # @!attribute max_time_per_ms
57
+ # Per-image enrichment timeout in milliseconds. Default: 30000. Maximum: 60000.
58
+ #
59
+ # @return [Integer, nil]
60
+ optional :max_time_per_ms, Integer, api_name: :maxTimePerMs
61
+
62
+ # @!attribute resolution
63
+ # Measure image width and height when possible.
64
+ #
65
+ # @return [Boolean, nil]
66
+ optional :resolution, ContextDev::Internal::Type::Boolean
67
+
68
+ # @!method initialize(classification: nil, hosted_url: nil, max_time_per_ms: nil, resolution: nil)
69
+ # Some parameter documentations has been truncated, see
70
+ # {ContextDev::Models::WebWebScrapeImagesParams::Enrichment} for more details.
71
+ #
72
+ # Optional per-image processing, sent as deep-object query params such as
73
+ # enrichment[resolution]=true.
74
+ #
75
+ # @param classification [Boolean] Classify each image by visual asset type.
76
+ #
77
+ # @param hosted_url [Boolean] Host materializable images on the Brand.dev CDN and return their URL and MIME ty
78
+ #
79
+ # @param max_time_per_ms [Integer] Per-image enrichment timeout in milliseconds. Default: 30000. Maximum: 60000.
80
+ #
81
+ # @param resolution [Boolean] Measure image width and height when possible.
82
+ end
20
83
  end
21
84
  end
22
85
  end
@@ -5,66 +5,74 @@ module ContextDev
5
5
  # @see ContextDev::Resources::Web#web_scrape_images
6
6
  class WebWebScrapeImagesResponse < ContextDev::Internal::Type::BaseModel
7
7
  # @!attribute images
8
- # Array of scraped images
8
+ # Images found on the page.
9
9
  #
10
10
  # @return [Array<ContextDev::Models::WebWebScrapeImagesResponse::Image>]
11
11
  required :images,
12
12
  -> { ContextDev::Internal::Type::ArrayOf[ContextDev::Models::WebWebScrapeImagesResponse::Image] }
13
13
 
14
14
  # @!attribute success
15
- # Indicates success
15
+ # Always true on success.
16
16
  #
17
17
  # @return [Boolean, ContextDev::Models::WebWebScrapeImagesResponse::Success]
18
18
  required :success, enum: -> { ContextDev::Models::WebWebScrapeImagesResponse::Success }
19
19
 
20
20
  # @!attribute url
21
- # The URL that was scraped
21
+ # Page URL that was scraped.
22
22
  #
23
23
  # @return [String]
24
24
  required :url, String
25
25
 
26
26
  # @!method initialize(images:, success:, url:)
27
- # @param images [Array<ContextDev::Models::WebWebScrapeImagesResponse::Image>] Array of scraped images
27
+ # @param images [Array<ContextDev::Models::WebWebScrapeImagesResponse::Image>] Images found on the page.
28
28
  #
29
- # @param success [Boolean, ContextDev::Models::WebWebScrapeImagesResponse::Success] Indicates success
29
+ # @param success [Boolean, ContextDev::Models::WebWebScrapeImagesResponse::Success] Always true on success.
30
30
  #
31
- # @param url [String] The URL that was scraped
31
+ # @param url [String] Page URL that was scraped.
32
32
 
33
33
  class Image < ContextDev::Internal::Type::BaseModel
34
34
  # @!attribute alt
35
- # Alt text of the image, or null if not present
35
+ # Image alt text, or null when unavailable.
36
36
  #
37
37
  # @return [String, nil]
38
38
  required :alt, String, nil?: true
39
39
 
40
40
  # @!attribute element
41
- # The HTML element the image was found in
41
+ # Where the image was found.
42
42
  #
43
43
  # @return [Symbol, ContextDev::Models::WebWebScrapeImagesResponse::Image::Element]
44
44
  required :element, enum: -> { ContextDev::Models::WebWebScrapeImagesResponse::Image::Element }
45
45
 
46
46
  # @!attribute src
47
- # The image source - can be a URL, inline HTML (for SVGs), or a base64 data URI
47
+ # Original image value: URL, inline SVG or HTML, or base64 data URI.
48
48
  #
49
49
  # @return [String]
50
50
  required :src, String
51
51
 
52
52
  # @!attribute type
53
- # The type/format of the src value
53
+ # Format of src.
54
54
  #
55
55
  # @return [Symbol, ContextDev::Models::WebWebScrapeImagesResponse::Image::Type]
56
56
  required :type, enum: -> { ContextDev::Models::WebWebScrapeImagesResponse::Image::Type }
57
57
 
58
- # @!method initialize(alt:, element:, src:, type:)
59
- # @param alt [String, nil] Alt text of the image, or null if not present
58
+ # @!attribute enrichment
59
+ # Requested metadata for images that could be processed.
60
60
  #
61
- # @param element [Symbol, ContextDev::Models::WebWebScrapeImagesResponse::Image::Element] The HTML element the image was found in
61
+ # @return [ContextDev::Models::WebWebScrapeImagesResponse::Image::Enrichment, nil]
62
+ optional :enrichment, -> { ContextDev::Models::WebWebScrapeImagesResponse::Image::Enrichment }
63
+
64
+ # @!method initialize(alt:, element:, src:, type:, enrichment: nil)
65
+ # @param alt [String, nil] Image alt text, or null when unavailable.
66
+ #
67
+ # @param element [Symbol, ContextDev::Models::WebWebScrapeImagesResponse::Image::Element] Where the image was found.
68
+ #
69
+ # @param src [String] Original image value: URL, inline SVG or HTML, or base64 data URI.
62
70
  #
63
- # @param src [String] The image source - can be a URL, inline HTML (for SVGs), or a base64 data URI
71
+ # @param type [Symbol, ContextDev::Models::WebWebScrapeImagesResponse::Image::Type] Format of src.
64
72
  #
65
- # @param type [Symbol, ContextDev::Models::WebWebScrapeImagesResponse::Image::Type] The type/format of the src value
73
+ # @param enrichment [ContextDev::Models::WebWebScrapeImagesResponse::Image::Enrichment] Requested metadata for images that could be processed.
66
74
 
67
- # The HTML element the image was found in
75
+ # Where the image was found.
68
76
  #
69
77
  # @see ContextDev::Models::WebWebScrapeImagesResponse::Image#element
70
78
  module Element
@@ -84,7 +92,7 @@ module ContextDev
84
92
  # @return [Array<Symbol>]
85
93
  end
86
94
 
87
- # The type/format of the src value
95
+ # Format of src.
88
96
  #
89
97
  # @see ContextDev::Models::WebWebScrapeImagesResponse::Image#type
90
98
  module Type
@@ -97,9 +105,74 @@ module ContextDev
97
105
  # @!method self.values
98
106
  # @return [Array<Symbol>]
99
107
  end
108
+
109
+ # @see ContextDev::Models::WebWebScrapeImagesResponse::Image#enrichment
110
+ class Enrichment < ContextDev::Internal::Type::BaseModel
111
+ # @!attribute height
112
+ # Image height in pixels, when measured.
113
+ #
114
+ # @return [Integer, nil]
115
+ optional :height, Integer
116
+
117
+ # @!attribute mimetype
118
+ # Detected MIME type, when hosted.
119
+ #
120
+ # @return [String, nil]
121
+ optional :mimetype, String
122
+
123
+ # @!attribute type
124
+ # Visual asset category, when classified.
125
+ #
126
+ # @return [Symbol, ContextDev::Models::WebWebScrapeImagesResponse::Image::Enrichment::Type, nil]
127
+ optional :type, enum: -> { ContextDev::Models::WebWebScrapeImagesResponse::Image::Enrichment::Type }
128
+
129
+ # @!attribute url
130
+ # Brand.dev CDN URL, when hosted.
131
+ #
132
+ # @return [String, nil]
133
+ optional :url, String
134
+
135
+ # @!attribute width
136
+ # Image width in pixels, when measured.
137
+ #
138
+ # @return [Integer, nil]
139
+ optional :width, Integer
140
+
141
+ # @!method initialize(height: nil, mimetype: nil, type: nil, url: nil, width: nil)
142
+ # Requested metadata for images that could be processed.
143
+ #
144
+ # @param height [Integer] Image height in pixels, when measured.
145
+ #
146
+ # @param mimetype [String] Detected MIME type, when hosted.
147
+ #
148
+ # @param type [Symbol, ContextDev::Models::WebWebScrapeImagesResponse::Image::Enrichment::Type] Visual asset category, when classified.
149
+ #
150
+ # @param url [String] Brand.dev CDN URL, when hosted.
151
+ #
152
+ # @param width [Integer] Image width in pixels, when measured.
153
+
154
+ # Visual asset category, when classified.
155
+ #
156
+ # @see ContextDev::Models::WebWebScrapeImagesResponse::Image::Enrichment#type
157
+ module Type
158
+ extend ContextDev::Internal::Type::Enum
159
+
160
+ PHOTOGRAPHY = :photography
161
+ ILLUSTRATION = :illustration
162
+ LOGO = :logo
163
+ WORDMARK = :wordmark
164
+ ICON = :icon
165
+ PATTERN = :pattern
166
+ GRAPHIC = :graphic
167
+ OTHER = :other
168
+
169
+ # @!method self.values
170
+ # @return [Array<Symbol>]
171
+ end
172
+ end
100
173
  end
101
174
 
102
- # Indicates success
175
+ # Always true on success.
103
176
  #
104
177
  # @see ContextDev::Models::WebWebScrapeImagesResponse#success
105
178
  module Success
@@ -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
  )