Class: ContextDev::Models::WebExtractParams::Action::Scroll

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/context_dev/models/web_extract_params.rb,
sig/context_dev/models/web_extract_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::WebExtractParams::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:

  • amount (Integer, Symbol, ContextDev::Models::WebExtractParams::Action::Scroll::Amount) (defaults to: nil)

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

  • container (String) (defaults to: nil)

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

  • direction (Symbol, ContextDev::Models::WebExtractParams::Action::Scroll::Direction) (defaults to: nil)

    Direction to scroll. Defaults to down.

  • max_scrolls (Integer) (defaults to: nil)

    Maximum scroll iterations. Stops early when scrolling and scrollable extent stop

  • do_ (Symbol, :scroll) (defaults to: :scroll)


# File 'lib/context_dev/models/web_extract_params.rb', line 250

Instance Attribute Details

#amountInteger, ...

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



229
# File 'lib/context_dev/models/web_extract_params.rb', line 229

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

#containerString?

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

Parameters:

  • (String)

Returns:

  • (String, nil)


235
# File 'lib/context_dev/models/web_extract_params.rb', line 235

optional :container, String

#directionSymbol, ...

Direction to scroll. Defaults to down.



241
# File 'lib/context_dev/models/web_extract_params.rb', line 241

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

#do_Symbol, :scroll

Parameters:

  • value (:scroll)

Returns:

  • (Symbol, :scroll)


222
# File 'lib/context_dev/models/web_extract_params.rb', line 222

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)


248
# File 'lib/context_dev/models/web_extract_params.rb', line 248

optional :max_scrolls, Integer, api_name: :maxScrolls

Instance Method Details

#to_hash{

Returns:

  • ({)


204
# File 'sig/context_dev/models/web_extract_params.rbs', line 204

def to_hash: -> {