Class: ContextDev::Models::WebWebScrapeHTMLParams::Action::Scroll

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/context_dev/models/web_web_scrape_html_params.rb,
sig/context_dev/models/web_web_scrape_html_params.rbs

Defined Under Namespace

Modules: Amount, Direction

Instance Attribute Summary collapse

Instance Method Summary collapse

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(amount: nil, container: nil, direction: nil, max_scrolls: nil, do_: :scroll) ⇒ Object

Some parameter documentations has been truncated, see ContextDev::Models::WebWebScrapeHTMLParams::Action::Scroll for more details.

Scroll the page or a selected scrollable container, waiting adaptively for content and dimensions to settle after each iteration.

Parameters:



# File 'lib/context_dev/models/web_web_scrape_html_params.rb', line 245

Instance Attribute Details

#amountInteger, ...

Pixels per scroll, one visible viewport, or the current scroll boundary. Defaults to viewport.



224
# File 'lib/context_dev/models/web_web_scrape_html_params.rb', line 224

optional :amount, union: -> { ContextDev::WebWebScrapeHTMLParams::Action::Scroll::Amount }

#containerString?

CSS selector for the first matching scroll container. Defaults to the page.

Parameters:

  • (String)

Returns:

  • (String, nil)


230
# File 'lib/context_dev/models/web_web_scrape_html_params.rb', line 230

optional :container, String

#directionSymbol, ...

Direction to scroll. Defaults to down.



236
# File 'lib/context_dev/models/web_web_scrape_html_params.rb', line 236

optional :direction, enum: -> { ContextDev::WebWebScrapeHTMLParams::Action::Scroll::Direction }

#do_Symbol, :scroll

Parameters:

  • value (:scroll)

Returns:

  • (Symbol, :scroll)


217
# File 'lib/context_dev/models/web_web_scrape_html_params.rb', line 217

required :do_, const: :scroll, api_name: :do

#max_scrollsInteger?

Maximum scroll iterations. Stops early when scrolling and scrollable extent stop changing. Defaults to 1.

Parameters:

  • (Integer)

Returns:

  • (Integer, nil)


243
# File 'lib/context_dev/models/web_web_scrape_html_params.rb', line 243

optional :max_scrolls, Integer, api_name: :maxScrolls

Instance Method Details

#to_hash{

Returns:

  • ({)


191
# File 'sig/context_dev/models/web_web_scrape_html_params.rbs', line 191

def to_hash: -> {