Class: ContextDev::Models::WebWebScrapeImagesParams

Inherits:
Internal::Type::BaseModel show all
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

See Also:

  • ContextDev::Resources::Web#web_scrape_images

Defined Under Namespace

Modules: Action, Dedupe Classes: Enrichment

Constant Summary

Constants included from Internal::Type::RequestParameters

Internal::Type::RequestParameters::ContextDev

Instance Attribute Summary collapse

Attributes included from Internal::Type::RequestParameters

#request_options

Class Method Summary collapse

Instance Method Summary collapse

Methods included from Internal::Type::RequestParameters::Converter

dump_request

Methods included from Internal::Type::RequestParameters

included

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.

Parameters:

  • action (String)
  • do_ (Symbol, :perform) (defaults to: :perform)


# File 'lib/context_dev/models/web_web_scrape_images_params.rb', line 82

Instance Attribute Details

#actionsArray<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.

Parameters:

  • value (::Array[ContextDev::Models::WebWebScrapeImagesParams::action], nil)

Returns:



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

#dedupeBoolean, ...

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.

Returns:



35
# File 'lib/context_dev/models/web_web_scrape_images_params.rb', line 35

optional :dedupe, union: -> { ContextDev::WebWebScrapeImagesParams::Dedupe }

#enrichmentContextDev::Models::WebWebScrapeImagesParams::Enrichment?

Optional per-image processing, sent as deep-object query params such as enrichment=true.

Parameters:

  • value (ContextDev::WebWebScrapeImagesParams::Enrichment, nil)

Returns:



42
# File 'lib/context_dev/models/web_web_scrape_images_params.rb', line 42

optional :enrichment, -> { ContextDev::WebWebScrapeImagesParams::Enrichment }, nil?: true

#headersHash{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.

Parameters:

  • (::Hash[Symbol, String])

Returns:

  • (Hash{Symbol=>String}, nil)


50
# File 'lib/context_dev/models/web_web_scrape_images_params.rb', line 50

optional :headers, ContextDev::Internal::Type::HashOf[String]

#max_age_msInteger?

Reuse a cached result this many milliseconds old or newer. Default: 86400000 (1 day). Set to 0 to bypass cache. Maximum: 2592000000 (30 days).

Parameters:

  • value (Integer, nil)

Returns:

  • (Integer, nil)


57
# File 'lib/context_dev/models/web_web_scrape_images_params.rb', line 57

optional :max_age_ms, Integer, nil?: true

#tagsArray<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.

Parameters:

  • (::Array[String])

Returns:

  • (Array<String>, nil)


65
# File 'lib/context_dev/models/web_web_scrape_images_params.rb', line 65

optional :tags, ContextDev::Internal::Type::ArrayOf[String]

#timeout_msInteger?

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).

Parameters:

  • (Integer)

Returns:

  • (Integer, nil)


73
# File 'lib/context_dev/models/web_web_scrape_images_params.rb', line 73

optional :timeout_ms, Integer

#urlString

Page URL to inspect. Must include http:// or https://.

Parameters:

  • value (String)

Returns:

  • (String)


14
# File 'lib/context_dev/models/web_web_scrape_images_params.rb', line 14

required :url, String

#wait_for_msInteger?

Optional browser wait time in milliseconds after initial page load before collecting images. Min: 0. Max: 30000 (30 seconds).

Parameters:

  • value (Integer, nil)

Returns:

  • (Integer, nil)


80
# File 'lib/context_dev/models/web_web_scrape_images_params.rb', line 80

optional :wait_for_ms, Integer, nil?: true

Instance Method Details

#to_hash{

Returns:

  • ({)


62
# File 'sig/context_dev/models/web_web_scrape_images_params.rbs', line 62

def to_hash: -> {