context.dev 1.12.0 → 1.14.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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +16 -0
- data/README.md +3 -3
- data/lib/context_dev/models/web_web_scrape_images_params.rb +66 -3
- data/lib/context_dev/models/web_web_scrape_images_response.rb +91 -18
- data/lib/context_dev/resources/web.rb +14 -6
- data/lib/context_dev/version.rb +1 -1
- data/rbi/context_dev/models/web_web_scrape_images_params.rbi +113 -3
- data/rbi/context_dev/models/web_web_scrape_images_response.rbi +205 -20
- data/rbi/context_dev/resources/web.rbi +13 -4
- data/sig/context_dev/models/web_web_scrape_images_params.rbs +60 -1
- data/sig/context_dev/models/web_web_scrape_images_response.rbs +86 -3
- data/sig/context_dev/resources/web.rbs +2 -0
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 836fab0c1e0cb715edaeaf7f7206d4a0be107d9a8971ff6afba657ba13e8bf49
|
|
4
|
+
data.tar.gz: 9ece48b1e97a2d806adb38a9c16df4d94cba3448f892435b8096904fd27f513d
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 0d5018e385aa2664e995f451b8e020894d98af98ec9f06a8962d11da56e43c448cbe5c184a24d5a9310d5cd0b8f6c43009829809a75de0770749388fbd06a012
|
|
7
|
+
data.tar.gz: 01ab4b2ef6367f3d5c5a5e71d98a42f6d4db0fc17eb850c061e16355056c53dcca45b58ee836fadacd9ac2033e95ef0875aaaedea715d58c5d66cdae35956eba
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,21 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 1.14.0 (2026-05-06)
|
|
4
|
+
|
|
5
|
+
Full Changelog: [v1.13.0...v1.14.0](https://github.com/context-dot-dev/context-ruby-sdk/compare/v1.13.0...v1.14.0)
|
|
6
|
+
|
|
7
|
+
### Features
|
|
8
|
+
|
|
9
|
+
* **api:** api update ([58cb73a](https://github.com/context-dot-dev/context-ruby-sdk/commit/58cb73a109e20f296f6a5f256a94d690b1203f70))
|
|
10
|
+
|
|
11
|
+
## 1.13.0 (2026-05-05)
|
|
12
|
+
|
|
13
|
+
Full Changelog: [v1.12.0...v1.13.0](https://github.com/context-dot-dev/context-ruby-sdk/compare/v1.12.0...v1.13.0)
|
|
14
|
+
|
|
15
|
+
### Features
|
|
16
|
+
|
|
17
|
+
* **api:** manual updates ([1017ae4](https://github.com/context-dot-dev/context-ruby-sdk/commit/1017ae4d595beb2e5b466326a4db19c78ce6db51))
|
|
18
|
+
|
|
3
19
|
## 1.12.0 (2026-05-01)
|
|
4
20
|
|
|
5
21
|
Full Changelog: [v1.11.0...v1.12.0](https://github.com/context-dot-dev/context-ruby-sdk/compare/v1.11.0...v1.12.0)
|
data/README.md
CHANGED
|
@@ -8,8 +8,8 @@ It is generated with [Stainless](https://www.stainless.com/).
|
|
|
8
8
|
|
|
9
9
|
Use the Context Dev MCP Server to enable AI assistants to interact with this API, allowing them to explore endpoints, make test requests, and use documentation to help integrate this SDK into your application.
|
|
10
10
|
|
|
11
|
-
[](https://cursor.com/en-US/install-mcp?name=context
|
|
12
|
-
[](https://vscode.stainless.com/mcp/%7B%22name%22%3A%22context
|
|
11
|
+
[](https://cursor.com/en-US/install-mcp?name=context.dev-mcp&config=eyJuYW1lIjoiY29udGV4dC5kZXYtbWNwIiwidHJhbnNwb3J0IjoiaHR0cCIsInVybCI6Imh0dHBzOi8vY29udGV4dC1kZXYuc3RsbWNwLmNvbSIsImhlYWRlcnMiOnsieC1jb250ZXh0LWRldi1hcGkta2V5IjoiTXkgQVBJIEtleSJ9fQ)
|
|
12
|
+
[](https://vscode.stainless.com/mcp/%7B%22name%22%3A%22context.dev-mcp%22%2C%22type%22%3A%22http%22%2C%22url%22%3A%22https%3A%2F%2Fcontext-dev.stlmcp.com%22%2C%22headers%22%3A%7B%22x-context-dev-api-key%22%3A%22My%20API%20Key%22%7D%7D)
|
|
13
13
|
|
|
14
14
|
> Note: You may need to set environment variables in your MCP client.
|
|
15
15
|
|
|
@@ -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.
|
|
29
|
+
gem "context.dev", "~> 1.14.0"
|
|
30
30
|
```
|
|
31
31
|
|
|
32
32
|
<!-- x-release-please-end -->
|
|
@@ -8,15 +8,78 @@ module ContextDev
|
|
|
8
8
|
include ContextDev::Internal::Type::RequestParameters
|
|
9
9
|
|
|
10
10
|
# @!attribute url
|
|
11
|
-
#
|
|
11
|
+
# Page URL to inspect. Must include http:// or https://.
|
|
12
12
|
#
|
|
13
13
|
# @return [String]
|
|
14
14
|
required :url, String
|
|
15
15
|
|
|
16
|
-
# @!
|
|
17
|
-
#
|
|
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: 6000. 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: 6000. 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
|
-
#
|
|
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
|
-
#
|
|
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
|
-
#
|
|
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>]
|
|
27
|
+
# @param images [Array<ContextDev::Models::WebWebScrapeImagesResponse::Image>] Images found on the page.
|
|
28
28
|
#
|
|
29
|
-
# @param success [Boolean, ContextDev::Models::WebWebScrapeImagesResponse::Success]
|
|
29
|
+
# @param success [Boolean, ContextDev::Models::WebWebScrapeImagesResponse::Success] Always true on success.
|
|
30
30
|
#
|
|
31
|
-
# @param url [String]
|
|
31
|
+
# @param url [String] Page URL that was scraped.
|
|
32
32
|
|
|
33
33
|
class Image < ContextDev::Internal::Type::BaseModel
|
|
34
34
|
# @!attribute alt
|
|
35
|
-
#
|
|
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
|
-
#
|
|
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
|
-
#
|
|
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
|
-
#
|
|
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
|
-
# @!
|
|
59
|
-
#
|
|
58
|
+
# @!attribute enrichment
|
|
59
|
+
# Requested metadata for images that could be processed.
|
|
60
60
|
#
|
|
61
|
-
# @
|
|
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
|
|
71
|
+
# @param type [Symbol, ContextDev::Models::WebWebScrapeImagesResponse::Image::Type] Format of src.
|
|
64
72
|
#
|
|
65
|
-
# @param
|
|
73
|
+
# @param enrichment [ContextDev::Models::WebWebScrapeImagesResponse::Image::Enrichment] Requested metadata for images that could be processed.
|
|
66
74
|
|
|
67
|
-
#
|
|
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
|
-
#
|
|
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
|
-
#
|
|
175
|
+
# Always true on success.
|
|
103
176
|
#
|
|
104
177
|
# @see ContextDev::Models::WebWebScrapeImagesResponse#success
|
|
105
178
|
module Success
|
|
@@ -183,13 +183,21 @@ module ContextDev
|
|
|
183
183
|
)
|
|
184
184
|
end
|
|
185
185
|
|
|
186
|
-
#
|
|
187
|
-
#
|
|
188
|
-
#
|
|
186
|
+
# Some parameter documentations has been truncated, see
|
|
187
|
+
# {ContextDev::Models::WebWebScrapeImagesParams} for more details.
|
|
188
|
+
#
|
|
189
|
+
# Extract image assets from a web page, including standard URLs, inline SVGs, data
|
|
190
|
+
# URIs, responsive image sources, metadata, CSS backgrounds, video posters, and
|
|
191
|
+
# embeds. The base request costs 1 credit; enrichment costs 1 credit per returned
|
|
192
|
+
# image.
|
|
193
|
+
#
|
|
194
|
+
# @overload web_scrape_images(url:, enrichment: nil, max_age_ms: nil, request_options: {})
|
|
195
|
+
#
|
|
196
|
+
# @param url [String] Page URL to inspect. Must include http:// or https://.
|
|
189
197
|
#
|
|
190
|
-
# @
|
|
198
|
+
# @param enrichment [ContextDev::Models::WebWebScrapeImagesParams::Enrichment] Optional per-image processing, sent as deep-object query params such as enrichme
|
|
191
199
|
#
|
|
192
|
-
# @param
|
|
200
|
+
# @param max_age_ms [Integer] Reuse a cached result this many milliseconds old or newer. Default: 86400000 (1
|
|
193
201
|
#
|
|
194
202
|
# @param request_options [ContextDev::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
195
203
|
#
|
|
@@ -202,7 +210,7 @@ module ContextDev
|
|
|
202
210
|
@client.request(
|
|
203
211
|
method: :get,
|
|
204
212
|
path: "web/scrape/images",
|
|
205
|
-
query: query,
|
|
213
|
+
query: query.transform_keys(max_age_ms: "maxAgeMs"),
|
|
206
214
|
model: ContextDev::Models::WebWebScrapeImagesResponse,
|
|
207
215
|
options: options
|
|
208
216
|
)
|
data/lib/context_dev/version.rb
CHANGED
|
@@ -14,30 +14,140 @@ module ContextDev
|
|
|
14
14
|
)
|
|
15
15
|
end
|
|
16
16
|
|
|
17
|
-
#
|
|
17
|
+
# Page URL to inspect. Must include http:// or https://.
|
|
18
18
|
sig { returns(String) }
|
|
19
19
|
attr_accessor :url
|
|
20
20
|
|
|
21
|
+
# Optional per-image processing, sent as deep-object query params such as
|
|
22
|
+
# enrichment[resolution]=true.
|
|
23
|
+
sig do
|
|
24
|
+
returns(T.nilable(ContextDev::WebWebScrapeImagesParams::Enrichment))
|
|
25
|
+
end
|
|
26
|
+
attr_reader :enrichment
|
|
27
|
+
|
|
28
|
+
sig do
|
|
29
|
+
params(
|
|
30
|
+
enrichment: ContextDev::WebWebScrapeImagesParams::Enrichment::OrHash
|
|
31
|
+
).void
|
|
32
|
+
end
|
|
33
|
+
attr_writer :enrichment
|
|
34
|
+
|
|
35
|
+
# Reuse a cached result this many milliseconds old or newer. Default: 86400000 (1
|
|
36
|
+
# day). Set to 0 to bypass cache. Maximum: 2592000000 (30 days).
|
|
37
|
+
sig { returns(T.nilable(Integer)) }
|
|
38
|
+
attr_reader :max_age_ms
|
|
39
|
+
|
|
40
|
+
sig { params(max_age_ms: Integer).void }
|
|
41
|
+
attr_writer :max_age_ms
|
|
42
|
+
|
|
21
43
|
sig do
|
|
22
44
|
params(
|
|
23
45
|
url: String,
|
|
46
|
+
enrichment: ContextDev::WebWebScrapeImagesParams::Enrichment::OrHash,
|
|
47
|
+
max_age_ms: Integer,
|
|
24
48
|
request_options: ContextDev::RequestOptions::OrHash
|
|
25
49
|
).returns(T.attached_class)
|
|
26
50
|
end
|
|
27
51
|
def self.new(
|
|
28
|
-
#
|
|
52
|
+
# Page URL to inspect. Must include http:// or https://.
|
|
29
53
|
url:,
|
|
54
|
+
# Optional per-image processing, sent as deep-object query params such as
|
|
55
|
+
# enrichment[resolution]=true.
|
|
56
|
+
enrichment: nil,
|
|
57
|
+
# Reuse a cached result this many milliseconds old or newer. Default: 86400000 (1
|
|
58
|
+
# day). Set to 0 to bypass cache. Maximum: 2592000000 (30 days).
|
|
59
|
+
max_age_ms: nil,
|
|
30
60
|
request_options: {}
|
|
31
61
|
)
|
|
32
62
|
end
|
|
33
63
|
|
|
34
64
|
sig do
|
|
35
65
|
override.returns(
|
|
36
|
-
{
|
|
66
|
+
{
|
|
67
|
+
url: String,
|
|
68
|
+
enrichment: ContextDev::WebWebScrapeImagesParams::Enrichment,
|
|
69
|
+
max_age_ms: Integer,
|
|
70
|
+
request_options: ContextDev::RequestOptions
|
|
71
|
+
}
|
|
37
72
|
)
|
|
38
73
|
end
|
|
39
74
|
def to_hash
|
|
40
75
|
end
|
|
76
|
+
|
|
77
|
+
class Enrichment < ContextDev::Internal::Type::BaseModel
|
|
78
|
+
OrHash =
|
|
79
|
+
T.type_alias do
|
|
80
|
+
T.any(
|
|
81
|
+
ContextDev::WebWebScrapeImagesParams::Enrichment,
|
|
82
|
+
ContextDev::Internal::AnyHash
|
|
83
|
+
)
|
|
84
|
+
end
|
|
85
|
+
|
|
86
|
+
# Classify each image by visual asset type.
|
|
87
|
+
sig { returns(T.nilable(T::Boolean)) }
|
|
88
|
+
attr_reader :classification
|
|
89
|
+
|
|
90
|
+
sig { params(classification: T::Boolean).void }
|
|
91
|
+
attr_writer :classification
|
|
92
|
+
|
|
93
|
+
# Host materializable images on the Brand.dev CDN and return their URL and MIME
|
|
94
|
+
# type.
|
|
95
|
+
sig { returns(T.nilable(T::Boolean)) }
|
|
96
|
+
attr_reader :hosted_url
|
|
97
|
+
|
|
98
|
+
sig { params(hosted_url: T::Boolean).void }
|
|
99
|
+
attr_writer :hosted_url
|
|
100
|
+
|
|
101
|
+
# Per-image enrichment timeout in milliseconds. Default: 6000. Maximum: 60000.
|
|
102
|
+
sig { returns(T.nilable(Integer)) }
|
|
103
|
+
attr_reader :max_time_per_ms
|
|
104
|
+
|
|
105
|
+
sig { params(max_time_per_ms: Integer).void }
|
|
106
|
+
attr_writer :max_time_per_ms
|
|
107
|
+
|
|
108
|
+
# Measure image width and height when possible.
|
|
109
|
+
sig { returns(T.nilable(T::Boolean)) }
|
|
110
|
+
attr_reader :resolution
|
|
111
|
+
|
|
112
|
+
sig { params(resolution: T::Boolean).void }
|
|
113
|
+
attr_writer :resolution
|
|
114
|
+
|
|
115
|
+
# Optional per-image processing, sent as deep-object query params such as
|
|
116
|
+
# enrichment[resolution]=true.
|
|
117
|
+
sig do
|
|
118
|
+
params(
|
|
119
|
+
classification: T::Boolean,
|
|
120
|
+
hosted_url: T::Boolean,
|
|
121
|
+
max_time_per_ms: Integer,
|
|
122
|
+
resolution: T::Boolean
|
|
123
|
+
).returns(T.attached_class)
|
|
124
|
+
end
|
|
125
|
+
def self.new(
|
|
126
|
+
# Classify each image by visual asset type.
|
|
127
|
+
classification: nil,
|
|
128
|
+
# Host materializable images on the Brand.dev CDN and return their URL and MIME
|
|
129
|
+
# type.
|
|
130
|
+
hosted_url: nil,
|
|
131
|
+
# Per-image enrichment timeout in milliseconds. Default: 6000. Maximum: 60000.
|
|
132
|
+
max_time_per_ms: nil,
|
|
133
|
+
# Measure image width and height when possible.
|
|
134
|
+
resolution: nil
|
|
135
|
+
)
|
|
136
|
+
end
|
|
137
|
+
|
|
138
|
+
sig do
|
|
139
|
+
override.returns(
|
|
140
|
+
{
|
|
141
|
+
classification: T::Boolean,
|
|
142
|
+
hosted_url: T::Boolean,
|
|
143
|
+
max_time_per_ms: Integer,
|
|
144
|
+
resolution: T::Boolean
|
|
145
|
+
}
|
|
146
|
+
)
|
|
147
|
+
end
|
|
148
|
+
def to_hash
|
|
149
|
+
end
|
|
150
|
+
end
|
|
41
151
|
end
|
|
42
152
|
end
|
|
43
153
|
end
|
|
@@ -11,13 +11,13 @@ module ContextDev
|
|
|
11
11
|
)
|
|
12
12
|
end
|
|
13
13
|
|
|
14
|
-
#
|
|
14
|
+
# Images found on the page.
|
|
15
15
|
sig do
|
|
16
16
|
returns(T::Array[ContextDev::Models::WebWebScrapeImagesResponse::Image])
|
|
17
17
|
end
|
|
18
18
|
attr_accessor :images
|
|
19
19
|
|
|
20
|
-
#
|
|
20
|
+
# Always true on success.
|
|
21
21
|
sig do
|
|
22
22
|
returns(
|
|
23
23
|
ContextDev::Models::WebWebScrapeImagesResponse::Success::TaggedBoolean
|
|
@@ -25,7 +25,7 @@ module ContextDev
|
|
|
25
25
|
end
|
|
26
26
|
attr_accessor :success
|
|
27
27
|
|
|
28
|
-
#
|
|
28
|
+
# Page URL that was scraped.
|
|
29
29
|
sig { returns(String) }
|
|
30
30
|
attr_accessor :url
|
|
31
31
|
|
|
@@ -41,11 +41,11 @@ module ContextDev
|
|
|
41
41
|
).returns(T.attached_class)
|
|
42
42
|
end
|
|
43
43
|
def self.new(
|
|
44
|
-
#
|
|
44
|
+
# Images found on the page.
|
|
45
45
|
images:,
|
|
46
|
-
#
|
|
46
|
+
# Always true on success.
|
|
47
47
|
success:,
|
|
48
|
-
#
|
|
48
|
+
# Page URL that was scraped.
|
|
49
49
|
url:
|
|
50
50
|
)
|
|
51
51
|
end
|
|
@@ -73,11 +73,11 @@ module ContextDev
|
|
|
73
73
|
)
|
|
74
74
|
end
|
|
75
75
|
|
|
76
|
-
#
|
|
76
|
+
# Image alt text, or null when unavailable.
|
|
77
77
|
sig { returns(T.nilable(String)) }
|
|
78
78
|
attr_accessor :alt
|
|
79
79
|
|
|
80
|
-
#
|
|
80
|
+
# Where the image was found.
|
|
81
81
|
sig do
|
|
82
82
|
returns(
|
|
83
83
|
ContextDev::Models::WebWebScrapeImagesResponse::Image::Element::TaggedSymbol
|
|
@@ -85,11 +85,11 @@ module ContextDev
|
|
|
85
85
|
end
|
|
86
86
|
attr_accessor :element
|
|
87
87
|
|
|
88
|
-
#
|
|
88
|
+
# Original image value: URL, inline SVG or HTML, or base64 data URI.
|
|
89
89
|
sig { returns(String) }
|
|
90
90
|
attr_accessor :src
|
|
91
91
|
|
|
92
|
-
#
|
|
92
|
+
# Format of src.
|
|
93
93
|
sig do
|
|
94
94
|
returns(
|
|
95
95
|
ContextDev::Models::WebWebScrapeImagesResponse::Image::Type::TaggedSymbol
|
|
@@ -97,6 +97,24 @@ module ContextDev
|
|
|
97
97
|
end
|
|
98
98
|
attr_accessor :type
|
|
99
99
|
|
|
100
|
+
# Requested metadata for images that could be processed.
|
|
101
|
+
sig do
|
|
102
|
+
returns(
|
|
103
|
+
T.nilable(
|
|
104
|
+
ContextDev::Models::WebWebScrapeImagesResponse::Image::Enrichment
|
|
105
|
+
)
|
|
106
|
+
)
|
|
107
|
+
end
|
|
108
|
+
attr_reader :enrichment
|
|
109
|
+
|
|
110
|
+
sig do
|
|
111
|
+
params(
|
|
112
|
+
enrichment:
|
|
113
|
+
ContextDev::Models::WebWebScrapeImagesResponse::Image::Enrichment::OrHash
|
|
114
|
+
).void
|
|
115
|
+
end
|
|
116
|
+
attr_writer :enrichment
|
|
117
|
+
|
|
100
118
|
sig do
|
|
101
119
|
params(
|
|
102
120
|
alt: T.nilable(String),
|
|
@@ -104,18 +122,22 @@ module ContextDev
|
|
|
104
122
|
ContextDev::Models::WebWebScrapeImagesResponse::Image::Element::OrSymbol,
|
|
105
123
|
src: String,
|
|
106
124
|
type:
|
|
107
|
-
ContextDev::Models::WebWebScrapeImagesResponse::Image::Type::OrSymbol
|
|
125
|
+
ContextDev::Models::WebWebScrapeImagesResponse::Image::Type::OrSymbol,
|
|
126
|
+
enrichment:
|
|
127
|
+
ContextDev::Models::WebWebScrapeImagesResponse::Image::Enrichment::OrHash
|
|
108
128
|
).returns(T.attached_class)
|
|
109
129
|
end
|
|
110
130
|
def self.new(
|
|
111
|
-
#
|
|
131
|
+
# Image alt text, or null when unavailable.
|
|
112
132
|
alt:,
|
|
113
|
-
#
|
|
133
|
+
# Where the image was found.
|
|
114
134
|
element:,
|
|
115
|
-
#
|
|
135
|
+
# Original image value: URL, inline SVG or HTML, or base64 data URI.
|
|
116
136
|
src:,
|
|
117
|
-
#
|
|
118
|
-
type
|
|
137
|
+
# Format of src.
|
|
138
|
+
type:,
|
|
139
|
+
# Requested metadata for images that could be processed.
|
|
140
|
+
enrichment: nil
|
|
119
141
|
)
|
|
120
142
|
end
|
|
121
143
|
|
|
@@ -127,14 +149,16 @@ module ContextDev
|
|
|
127
149
|
ContextDev::Models::WebWebScrapeImagesResponse::Image::Element::TaggedSymbol,
|
|
128
150
|
src: String,
|
|
129
151
|
type:
|
|
130
|
-
ContextDev::Models::WebWebScrapeImagesResponse::Image::Type::TaggedSymbol
|
|
152
|
+
ContextDev::Models::WebWebScrapeImagesResponse::Image::Type::TaggedSymbol,
|
|
153
|
+
enrichment:
|
|
154
|
+
ContextDev::Models::WebWebScrapeImagesResponse::Image::Enrichment
|
|
131
155
|
}
|
|
132
156
|
)
|
|
133
157
|
end
|
|
134
158
|
def to_hash
|
|
135
159
|
end
|
|
136
160
|
|
|
137
|
-
#
|
|
161
|
+
# Where the image was found.
|
|
138
162
|
module Element
|
|
139
163
|
extend ContextDev::Internal::Type::Enum
|
|
140
164
|
|
|
@@ -204,7 +228,7 @@ module ContextDev
|
|
|
204
228
|
end
|
|
205
229
|
end
|
|
206
230
|
|
|
207
|
-
#
|
|
231
|
+
# Format of src.
|
|
208
232
|
module Type
|
|
209
233
|
extend ContextDev::Internal::Type::Enum
|
|
210
234
|
|
|
@@ -243,9 +267,170 @@ module ContextDev
|
|
|
243
267
|
def self.values
|
|
244
268
|
end
|
|
245
269
|
end
|
|
270
|
+
|
|
271
|
+
class Enrichment < ContextDev::Internal::Type::BaseModel
|
|
272
|
+
OrHash =
|
|
273
|
+
T.type_alias do
|
|
274
|
+
T.any(
|
|
275
|
+
ContextDev::Models::WebWebScrapeImagesResponse::Image::Enrichment,
|
|
276
|
+
ContextDev::Internal::AnyHash
|
|
277
|
+
)
|
|
278
|
+
end
|
|
279
|
+
|
|
280
|
+
# Image height in pixels, when measured.
|
|
281
|
+
sig { returns(T.nilable(Integer)) }
|
|
282
|
+
attr_reader :height
|
|
283
|
+
|
|
284
|
+
sig { params(height: Integer).void }
|
|
285
|
+
attr_writer :height
|
|
286
|
+
|
|
287
|
+
# Detected MIME type, when hosted.
|
|
288
|
+
sig { returns(T.nilable(String)) }
|
|
289
|
+
attr_reader :mimetype
|
|
290
|
+
|
|
291
|
+
sig { params(mimetype: String).void }
|
|
292
|
+
attr_writer :mimetype
|
|
293
|
+
|
|
294
|
+
# Visual asset category, when classified.
|
|
295
|
+
sig do
|
|
296
|
+
returns(
|
|
297
|
+
T.nilable(
|
|
298
|
+
ContextDev::Models::WebWebScrapeImagesResponse::Image::Enrichment::Type::TaggedSymbol
|
|
299
|
+
)
|
|
300
|
+
)
|
|
301
|
+
end
|
|
302
|
+
attr_reader :type
|
|
303
|
+
|
|
304
|
+
sig do
|
|
305
|
+
params(
|
|
306
|
+
type:
|
|
307
|
+
ContextDev::Models::WebWebScrapeImagesResponse::Image::Enrichment::Type::OrSymbol
|
|
308
|
+
).void
|
|
309
|
+
end
|
|
310
|
+
attr_writer :type
|
|
311
|
+
|
|
312
|
+
# Brand.dev CDN URL, when hosted.
|
|
313
|
+
sig { returns(T.nilable(String)) }
|
|
314
|
+
attr_reader :url
|
|
315
|
+
|
|
316
|
+
sig { params(url: String).void }
|
|
317
|
+
attr_writer :url
|
|
318
|
+
|
|
319
|
+
# Image width in pixels, when measured.
|
|
320
|
+
sig { returns(T.nilable(Integer)) }
|
|
321
|
+
attr_reader :width
|
|
322
|
+
|
|
323
|
+
sig { params(width: Integer).void }
|
|
324
|
+
attr_writer :width
|
|
325
|
+
|
|
326
|
+
# Requested metadata for images that could be processed.
|
|
327
|
+
sig do
|
|
328
|
+
params(
|
|
329
|
+
height: Integer,
|
|
330
|
+
mimetype: String,
|
|
331
|
+
type:
|
|
332
|
+
ContextDev::Models::WebWebScrapeImagesResponse::Image::Enrichment::Type::OrSymbol,
|
|
333
|
+
url: String,
|
|
334
|
+
width: Integer
|
|
335
|
+
).returns(T.attached_class)
|
|
336
|
+
end
|
|
337
|
+
def self.new(
|
|
338
|
+
# Image height in pixels, when measured.
|
|
339
|
+
height: nil,
|
|
340
|
+
# Detected MIME type, when hosted.
|
|
341
|
+
mimetype: nil,
|
|
342
|
+
# Visual asset category, when classified.
|
|
343
|
+
type: nil,
|
|
344
|
+
# Brand.dev CDN URL, when hosted.
|
|
345
|
+
url: nil,
|
|
346
|
+
# Image width in pixels, when measured.
|
|
347
|
+
width: nil
|
|
348
|
+
)
|
|
349
|
+
end
|
|
350
|
+
|
|
351
|
+
sig do
|
|
352
|
+
override.returns(
|
|
353
|
+
{
|
|
354
|
+
height: Integer,
|
|
355
|
+
mimetype: String,
|
|
356
|
+
type:
|
|
357
|
+
ContextDev::Models::WebWebScrapeImagesResponse::Image::Enrichment::Type::TaggedSymbol,
|
|
358
|
+
url: String,
|
|
359
|
+
width: Integer
|
|
360
|
+
}
|
|
361
|
+
)
|
|
362
|
+
end
|
|
363
|
+
def to_hash
|
|
364
|
+
end
|
|
365
|
+
|
|
366
|
+
# Visual asset category, when classified.
|
|
367
|
+
module Type
|
|
368
|
+
extend ContextDev::Internal::Type::Enum
|
|
369
|
+
|
|
370
|
+
TaggedSymbol =
|
|
371
|
+
T.type_alias do
|
|
372
|
+
T.all(
|
|
373
|
+
Symbol,
|
|
374
|
+
ContextDev::Models::WebWebScrapeImagesResponse::Image::Enrichment::Type
|
|
375
|
+
)
|
|
376
|
+
end
|
|
377
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
378
|
+
|
|
379
|
+
PHOTOGRAPHY =
|
|
380
|
+
T.let(
|
|
381
|
+
:photography,
|
|
382
|
+
ContextDev::Models::WebWebScrapeImagesResponse::Image::Enrichment::Type::TaggedSymbol
|
|
383
|
+
)
|
|
384
|
+
ILLUSTRATION =
|
|
385
|
+
T.let(
|
|
386
|
+
:illustration,
|
|
387
|
+
ContextDev::Models::WebWebScrapeImagesResponse::Image::Enrichment::Type::TaggedSymbol
|
|
388
|
+
)
|
|
389
|
+
LOGO =
|
|
390
|
+
T.let(
|
|
391
|
+
:logo,
|
|
392
|
+
ContextDev::Models::WebWebScrapeImagesResponse::Image::Enrichment::Type::TaggedSymbol
|
|
393
|
+
)
|
|
394
|
+
WORDMARK =
|
|
395
|
+
T.let(
|
|
396
|
+
:wordmark,
|
|
397
|
+
ContextDev::Models::WebWebScrapeImagesResponse::Image::Enrichment::Type::TaggedSymbol
|
|
398
|
+
)
|
|
399
|
+
ICON =
|
|
400
|
+
T.let(
|
|
401
|
+
:icon,
|
|
402
|
+
ContextDev::Models::WebWebScrapeImagesResponse::Image::Enrichment::Type::TaggedSymbol
|
|
403
|
+
)
|
|
404
|
+
PATTERN =
|
|
405
|
+
T.let(
|
|
406
|
+
:pattern,
|
|
407
|
+
ContextDev::Models::WebWebScrapeImagesResponse::Image::Enrichment::Type::TaggedSymbol
|
|
408
|
+
)
|
|
409
|
+
GRAPHIC =
|
|
410
|
+
T.let(
|
|
411
|
+
:graphic,
|
|
412
|
+
ContextDev::Models::WebWebScrapeImagesResponse::Image::Enrichment::Type::TaggedSymbol
|
|
413
|
+
)
|
|
414
|
+
OTHER =
|
|
415
|
+
T.let(
|
|
416
|
+
:other,
|
|
417
|
+
ContextDev::Models::WebWebScrapeImagesResponse::Image::Enrichment::Type::TaggedSymbol
|
|
418
|
+
)
|
|
419
|
+
|
|
420
|
+
sig do
|
|
421
|
+
override.returns(
|
|
422
|
+
T::Array[
|
|
423
|
+
ContextDev::Models::WebWebScrapeImagesResponse::Image::Enrichment::Type::TaggedSymbol
|
|
424
|
+
]
|
|
425
|
+
)
|
|
426
|
+
end
|
|
427
|
+
def self.values
|
|
428
|
+
end
|
|
429
|
+
end
|
|
430
|
+
end
|
|
246
431
|
end
|
|
247
432
|
|
|
248
|
-
#
|
|
433
|
+
# Always true on success.
|
|
249
434
|
module Success
|
|
250
435
|
extend ContextDev::Internal::Type::Enum
|
|
251
436
|
|
|
@@ -180,18 +180,27 @@ module ContextDev
|
|
|
180
180
|
)
|
|
181
181
|
end
|
|
182
182
|
|
|
183
|
-
#
|
|
184
|
-
#
|
|
185
|
-
#
|
|
183
|
+
# Extract image assets from a web page, including standard URLs, inline SVGs, data
|
|
184
|
+
# URIs, responsive image sources, metadata, CSS backgrounds, video posters, and
|
|
185
|
+
# embeds. The base request costs 1 credit; enrichment costs 1 credit per returned
|
|
186
|
+
# image.
|
|
186
187
|
sig do
|
|
187
188
|
params(
|
|
188
189
|
url: String,
|
|
190
|
+
enrichment: ContextDev::WebWebScrapeImagesParams::Enrichment::OrHash,
|
|
191
|
+
max_age_ms: Integer,
|
|
189
192
|
request_options: ContextDev::RequestOptions::OrHash
|
|
190
193
|
).returns(ContextDev::Models::WebWebScrapeImagesResponse)
|
|
191
194
|
end
|
|
192
195
|
def web_scrape_images(
|
|
193
|
-
#
|
|
196
|
+
# Page URL to inspect. Must include http:// or https://.
|
|
194
197
|
url:,
|
|
198
|
+
# Optional per-image processing, sent as deep-object query params such as
|
|
199
|
+
# enrichment[resolution]=true.
|
|
200
|
+
enrichment: nil,
|
|
201
|
+
# Reuse a cached result this many milliseconds old or newer. Default: 86400000 (1
|
|
202
|
+
# day). Set to 0 to bypass cache. Maximum: 2592000000 (30 days).
|
|
203
|
+
max_age_ms: nil,
|
|
195
204
|
request_options: {}
|
|
196
205
|
)
|
|
197
206
|
end
|
|
@@ -1,7 +1,12 @@
|
|
|
1
1
|
module ContextDev
|
|
2
2
|
module Models
|
|
3
3
|
type web_web_scrape_images_params =
|
|
4
|
-
{
|
|
4
|
+
{
|
|
5
|
+
url: String,
|
|
6
|
+
enrichment: ContextDev::WebWebScrapeImagesParams::Enrichment,
|
|
7
|
+
max_age_ms: Integer
|
|
8
|
+
}
|
|
9
|
+
& ContextDev::Internal::Type::request_parameters
|
|
5
10
|
|
|
6
11
|
class WebWebScrapeImagesParams < ContextDev::Internal::Type::BaseModel
|
|
7
12
|
extend ContextDev::Internal::Type::RequestParameters::Converter
|
|
@@ -9,15 +14,69 @@ module ContextDev
|
|
|
9
14
|
|
|
10
15
|
attr_accessor url: String
|
|
11
16
|
|
|
17
|
+
attr_reader enrichment: ContextDev::WebWebScrapeImagesParams::Enrichment?
|
|
18
|
+
|
|
19
|
+
def enrichment=: (
|
|
20
|
+
ContextDev::WebWebScrapeImagesParams::Enrichment
|
|
21
|
+
) -> ContextDev::WebWebScrapeImagesParams::Enrichment
|
|
22
|
+
|
|
23
|
+
attr_reader max_age_ms: Integer?
|
|
24
|
+
|
|
25
|
+
def max_age_ms=: (Integer) -> Integer
|
|
26
|
+
|
|
12
27
|
def initialize: (
|
|
13
28
|
url: String,
|
|
29
|
+
?enrichment: ContextDev::WebWebScrapeImagesParams::Enrichment,
|
|
30
|
+
?max_age_ms: Integer,
|
|
14
31
|
?request_options: ContextDev::request_opts
|
|
15
32
|
) -> void
|
|
16
33
|
|
|
17
34
|
def to_hash: -> {
|
|
18
35
|
url: String,
|
|
36
|
+
enrichment: ContextDev::WebWebScrapeImagesParams::Enrichment,
|
|
37
|
+
max_age_ms: Integer,
|
|
19
38
|
request_options: ContextDev::RequestOptions
|
|
20
39
|
}
|
|
40
|
+
|
|
41
|
+
type enrichment =
|
|
42
|
+
{
|
|
43
|
+
classification: bool,
|
|
44
|
+
hosted_url: bool,
|
|
45
|
+
max_time_per_ms: Integer,
|
|
46
|
+
resolution: bool
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
class Enrichment < ContextDev::Internal::Type::BaseModel
|
|
50
|
+
attr_reader classification: bool?
|
|
51
|
+
|
|
52
|
+
def classification=: (bool) -> bool
|
|
53
|
+
|
|
54
|
+
attr_reader hosted_url: bool?
|
|
55
|
+
|
|
56
|
+
def hosted_url=: (bool) -> bool
|
|
57
|
+
|
|
58
|
+
attr_reader max_time_per_ms: Integer?
|
|
59
|
+
|
|
60
|
+
def max_time_per_ms=: (Integer) -> Integer
|
|
61
|
+
|
|
62
|
+
attr_reader resolution: bool?
|
|
63
|
+
|
|
64
|
+
def resolution=: (bool) -> bool
|
|
65
|
+
|
|
66
|
+
def initialize: (
|
|
67
|
+
?classification: bool,
|
|
68
|
+
?hosted_url: bool,
|
|
69
|
+
?max_time_per_ms: Integer,
|
|
70
|
+
?resolution: bool
|
|
71
|
+
) -> void
|
|
72
|
+
|
|
73
|
+
def to_hash: -> {
|
|
74
|
+
classification: bool,
|
|
75
|
+
hosted_url: bool,
|
|
76
|
+
max_time_per_ms: Integer,
|
|
77
|
+
resolution: bool
|
|
78
|
+
}
|
|
79
|
+
end
|
|
21
80
|
end
|
|
22
81
|
end
|
|
23
82
|
end
|
|
@@ -31,7 +31,8 @@ module ContextDev
|
|
|
31
31
|
alt: String?,
|
|
32
32
|
element: ContextDev::Models::WebWebScrapeImagesResponse::Image::element,
|
|
33
33
|
src: String,
|
|
34
|
-
type: ContextDev::Models::WebWebScrapeImagesResponse::Image::type_
|
|
34
|
+
type: ContextDev::Models::WebWebScrapeImagesResponse::Image::type_,
|
|
35
|
+
enrichment: ContextDev::Models::WebWebScrapeImagesResponse::Image::Enrichment
|
|
35
36
|
}
|
|
36
37
|
|
|
37
38
|
class Image < ContextDev::Internal::Type::BaseModel
|
|
@@ -43,18 +44,26 @@ module ContextDev
|
|
|
43
44
|
|
|
44
45
|
attr_accessor type: ContextDev::Models::WebWebScrapeImagesResponse::Image::type_
|
|
45
46
|
|
|
47
|
+
attr_reader enrichment: ContextDev::Models::WebWebScrapeImagesResponse::Image::Enrichment?
|
|
48
|
+
|
|
49
|
+
def enrichment=: (
|
|
50
|
+
ContextDev::Models::WebWebScrapeImagesResponse::Image::Enrichment
|
|
51
|
+
) -> ContextDev::Models::WebWebScrapeImagesResponse::Image::Enrichment
|
|
52
|
+
|
|
46
53
|
def initialize: (
|
|
47
54
|
alt: String?,
|
|
48
55
|
element: ContextDev::Models::WebWebScrapeImagesResponse::Image::element,
|
|
49
56
|
src: String,
|
|
50
|
-
type: ContextDev::Models::WebWebScrapeImagesResponse::Image::type_
|
|
57
|
+
type: ContextDev::Models::WebWebScrapeImagesResponse::Image::type_,
|
|
58
|
+
?enrichment: ContextDev::Models::WebWebScrapeImagesResponse::Image::Enrichment
|
|
51
59
|
) -> void
|
|
52
60
|
|
|
53
61
|
def to_hash: -> {
|
|
54
62
|
alt: String?,
|
|
55
63
|
element: ContextDev::Models::WebWebScrapeImagesResponse::Image::element,
|
|
56
64
|
src: String,
|
|
57
|
-
type: ContextDev::Models::WebWebScrapeImagesResponse::Image::type_
|
|
65
|
+
type: ContextDev::Models::WebWebScrapeImagesResponse::Image::type_,
|
|
66
|
+
enrichment: ContextDev::Models::WebWebScrapeImagesResponse::Image::Enrichment
|
|
58
67
|
}
|
|
59
68
|
|
|
60
69
|
type element =
|
|
@@ -95,6 +104,80 @@ module ContextDev
|
|
|
95
104
|
|
|
96
105
|
def self?.values: -> ::Array[ContextDev::Models::WebWebScrapeImagesResponse::Image::type_]
|
|
97
106
|
end
|
|
107
|
+
|
|
108
|
+
type enrichment =
|
|
109
|
+
{
|
|
110
|
+
height: Integer,
|
|
111
|
+
mimetype: String,
|
|
112
|
+
type: ContextDev::Models::WebWebScrapeImagesResponse::Image::Enrichment::type_,
|
|
113
|
+
url: String,
|
|
114
|
+
width: Integer
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
class Enrichment < ContextDev::Internal::Type::BaseModel
|
|
118
|
+
attr_reader height: Integer?
|
|
119
|
+
|
|
120
|
+
def height=: (Integer) -> Integer
|
|
121
|
+
|
|
122
|
+
attr_reader mimetype: String?
|
|
123
|
+
|
|
124
|
+
def mimetype=: (String) -> String
|
|
125
|
+
|
|
126
|
+
attr_reader type: ContextDev::Models::WebWebScrapeImagesResponse::Image::Enrichment::type_?
|
|
127
|
+
|
|
128
|
+
def type=: (
|
|
129
|
+
ContextDev::Models::WebWebScrapeImagesResponse::Image::Enrichment::type_
|
|
130
|
+
) -> ContextDev::Models::WebWebScrapeImagesResponse::Image::Enrichment::type_
|
|
131
|
+
|
|
132
|
+
attr_reader url: String?
|
|
133
|
+
|
|
134
|
+
def url=: (String) -> String
|
|
135
|
+
|
|
136
|
+
attr_reader width: Integer?
|
|
137
|
+
|
|
138
|
+
def width=: (Integer) -> Integer
|
|
139
|
+
|
|
140
|
+
def initialize: (
|
|
141
|
+
?height: Integer,
|
|
142
|
+
?mimetype: String,
|
|
143
|
+
?type: ContextDev::Models::WebWebScrapeImagesResponse::Image::Enrichment::type_,
|
|
144
|
+
?url: String,
|
|
145
|
+
?width: Integer
|
|
146
|
+
) -> void
|
|
147
|
+
|
|
148
|
+
def to_hash: -> {
|
|
149
|
+
height: Integer,
|
|
150
|
+
mimetype: String,
|
|
151
|
+
type: ContextDev::Models::WebWebScrapeImagesResponse::Image::Enrichment::type_,
|
|
152
|
+
url: String,
|
|
153
|
+
width: Integer
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
type type_ =
|
|
157
|
+
:photography
|
|
158
|
+
| :illustration
|
|
159
|
+
| :logo
|
|
160
|
+
| :wordmark
|
|
161
|
+
| :icon
|
|
162
|
+
| :pattern
|
|
163
|
+
| :graphic
|
|
164
|
+
| :other
|
|
165
|
+
|
|
166
|
+
module Type
|
|
167
|
+
extend ContextDev::Internal::Type::Enum
|
|
168
|
+
|
|
169
|
+
PHOTOGRAPHY: :photography
|
|
170
|
+
ILLUSTRATION: :illustration
|
|
171
|
+
LOGO: :logo
|
|
172
|
+
WORDMARK: :wordmark
|
|
173
|
+
ICON: :icon
|
|
174
|
+
PATTERN: :pattern
|
|
175
|
+
GRAPHIC: :graphic
|
|
176
|
+
OTHER: :other
|
|
177
|
+
|
|
178
|
+
def self?.values: -> ::Array[ContextDev::Models::WebWebScrapeImagesResponse::Image::Enrichment::type_]
|
|
179
|
+
end
|
|
180
|
+
end
|
|
98
181
|
end
|
|
99
182
|
|
|
100
183
|
type success = true
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: context.dev
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.
|
|
4
|
+
version: 1.14.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Context Dev
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2026-05-
|
|
11
|
+
date: 2026-05-06 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: cgi
|