Class: ContextDev::Models::WebWebScrapeImagesParams
- Inherits:
-
Internal::Type::BaseModel
- Object
- Internal::Type::BaseModel
- ContextDev::Models::WebWebScrapeImagesParams
- Extended by:
- Internal::Type::RequestParameters::Converter
- Includes:
- Internal::Type::RequestParameters
- Defined in:
- lib/context_dev/models/web_web_scrape_images_params.rb,
sig/context_dev/models/web_web_scrape_images_params.rbs
Overview
Defined Under Namespace
Modules: Action, Dedupe Classes: Enrichment
Constant Summary
Constants included from Internal::Type::RequestParameters
Internal::Type::RequestParameters::ContextDev
Instance Attribute Summary collapse
-
#actions ⇒ Array<ContextDev::Models::WebWebScrapeImagesParams::Action::Wait, ContextDev::Models::WebWebScrapeImagesParams::Action::Perform>?
Optional browser actions executed in array order after the page loads and before content is captured.
-
#dedupe ⇒ Boolean, ...
When true, visually duplicate images are removed: every image is loaded and perceptually hashed, and only the highest-resolution copy of each duplicate group is kept.
-
#enrichment ⇒ ContextDev::Models::WebWebScrapeImagesParams::Enrichment?
Optional per-image processing, sent as deep-object query params such as enrichment=true.
-
#headers ⇒ Hash{Symbol=>String}?
Optional outbound HTTP headers forwarded only to the target URL, sent as deep-object query params such as headers=value.
-
#max_age_ms ⇒ Integer?
Reuse a cached result this many milliseconds old or newer.
-
#tags ⇒ Array<String>?
Optional comma-separated caller-defined tags for tracking this request.
-
#timeout_ms ⇒ Integer?
Optional timeout in milliseconds for the request.
-
#url ⇒ String
Page URL to inspect.
-
#wait_for_ms ⇒ Integer?
Optional browser wait time in milliseconds after initial page load before collecting images.
Attributes included from Internal::Type::RequestParameters
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(action:, do_: :perform) ⇒ Object
constructor
Resolve and perform one natural-language browser action.
- #to_hash ⇒ {
Methods included from Internal::Type::RequestParameters::Converter
Methods included from Internal::Type::RequestParameters
Methods inherited from Internal::Type::BaseModel
==, #==, #[], coerce, #deconstruct_keys, #deep_to_h, dump, fields, hash, #hash, inherited, inspect, #inspect, known_fields, optional, recursively_to_h, required, #to_h, #to_json, #to_s, to_sorbet_type, #to_yaml
Methods included from Internal::Type::Converter
#coerce, coerce, #dump, dump, #inspect, inspect, meta_info, new_coerce_state, type_info
Methods included from Internal::Util::SorbetRuntimeSupport
#const_missing, #define_sorbet_constant!, #sorbet_constant_defined?, #to_sorbet_type, to_sorbet_type
Constructor Details
#initialize(action:, do_: :perform) ⇒ Object
Resolve and perform one natural-language browser action.
|
|
# File 'lib/context_dev/models/web_web_scrape_images_params.rb', line 82
|
Instance Attribute Details
#actions ⇒ Array<ContextDev::Models::WebWebScrapeImagesParams::Action::Wait, ContextDev::Models::WebWebScrapeImagesParams::Action::Perform>?
Optional browser actions executed in array order after the page loads and before content is captured. Requires a paid plan. Send a JSON array in the query parameter. Maximum: 5 actions.
22 23 24 25 26 |
# File 'lib/context_dev/models/web_web_scrape_images_params.rb', line 22 optional :actions, -> { ContextDev::Internal::Type::ArrayOf[union: ContextDev::WebWebScrapeImagesParams::Action] }, nil?: true |
#dedupe ⇒ Boolean, ...
When true, visually duplicate images are removed: every image is loaded and perceptually hashed, and only the highest-resolution copy of each duplicate group is kept. Images that cannot be downloaded or hashed are kept. Default: false.
35 |
# File 'lib/context_dev/models/web_web_scrape_images_params.rb', line 35 optional :dedupe, union: -> { ContextDev::WebWebScrapeImagesParams::Dedupe } |
#enrichment ⇒ ContextDev::Models::WebWebScrapeImagesParams::Enrichment?
Optional per-image processing, sent as deep-object query params such as enrichment=true.
42 |
# File 'lib/context_dev/models/web_web_scrape_images_params.rb', line 42 optional :enrichment, -> { ContextDev::WebWebScrapeImagesParams::Enrichment }, nil?: true |
#headers ⇒ Hash{Symbol=>String}?
Optional outbound HTTP headers forwarded only to the target URL, sent as deep-object query params such as headers=value. When provided, caching is bypassed: the result is neither read from nor written to cache.
50 |
# File 'lib/context_dev/models/web_web_scrape_images_params.rb', line 50 optional :headers, ContextDev::Internal::Type::HashOf[String] |
#max_age_ms ⇒ Integer?
Reuse a cached result this many milliseconds old or newer. Default: 86400000 (1 day). Set to 0 to bypass cache. Maximum: 2592000000 (30 days).
57 |
# File 'lib/context_dev/models/web_web_scrape_images_params.rb', line 57 optional :max_age_ms, Integer, nil?: true |
#tags ⇒ Array<String>?
Optional comma-separated caller-defined tags for tracking this request. Tags are recorded on the request's usage log and can be used to filter usage on the dashboard usage page. Up to 20 tags, each 1-50 characters.
65 |
# File 'lib/context_dev/models/web_web_scrape_images_params.rb', line 65 optional :tags, ContextDev::Internal::Type::ArrayOf[String] |
#timeout_ms ⇒ Integer?
Optional timeout in milliseconds for the request. If the request takes longer than this value, it will be aborted with a 408 status code. Maximum allowed value is 300000ms (5 minutes).
73 |
# File 'lib/context_dev/models/web_web_scrape_images_params.rb', line 73 optional :timeout_ms, Integer |
#url ⇒ String
Page URL to inspect. Must include http:// or https://.
14 |
# File 'lib/context_dev/models/web_web_scrape_images_params.rb', line 14 required :url, String |
#wait_for_ms ⇒ Integer?
Optional browser wait time in milliseconds after initial page load before collecting images. Min: 0. Max: 30000 (30 seconds).
80 |
# File 'lib/context_dev/models/web_web_scrape_images_params.rb', line 80 optional :wait_for_ms, Integer, nil?: true |
Class Method Details
.variants ⇒ Array(ContextDev::Models::WebWebScrapeImagesParams::Action::Wait, ContextDev::Models::WebWebScrapeImagesParams::Action::Perform)
|
|
# File 'lib/context_dev/models/web_web_scrape_images_params.rb', line 155
|
Instance Method Details
#to_hash ⇒ {
62 |
# File 'sig/context_dev/models/web_web_scrape_images_params.rbs', line 62
def to_hash: -> {
|